Final Commit

This commit is contained in:
2024-04-24 10:17:18 +05:45
parent b49e06fa93
commit 3502bb0b4f
41 changed files with 1497 additions and 502 deletions

View File

@ -6,8 +6,11 @@ use App\Http\Controllers\Controller;
use App\Mail\CustomMailer;
use App\Models\Agents;
use App\Models\Campaigns;
use App\Models\Campaignarticles;
use App\Models\Testimonials;
use App\Models\Countries;
use App\Models\Leadcategories;
use App\Models\Logos;
use Illuminate\Http\Request;
use App\Models\Registrations;
use App\Models\Sources;
@ -18,6 +21,7 @@ use App\Service\CommonModelService;
use Exception;
use Illuminate\Support\Facades\Mail;
use LMS;
use Illuminate\Support\Facades\View;
use NewRegistrationAdminNotification;
class RegistrationsController extends Controller
@ -26,6 +30,16 @@ class RegistrationsController extends Controller
public function __construct(Registrations $model)
{
$this->modelService = new CommonModelService($model);
$articles = Campaignarticles::where('status', 1)->latest()->get();
$testimonials = Testimonials::where('status', 1)->latest()->get();
$logos = Logos::where('status',1)->latest()->get();
View::share([
'articles'=> $articles,
'testimonials'=>$testimonials,
'logos'=>$logos,
]);
}
public function index(Request $request)
{
@ -225,20 +239,31 @@ class RegistrationsController extends Controller
}
if ($Campaign != null) {
$viewPath = env("CLIENT_PATH") . ".landing";
if (view()->exists($viewPath))
if (view()->exists($viewPath)) {
return view($viewPath, compact("Campaign"));
else
} else {
// dd($article);
return view(env("CLIENT_PATH") . '.home', compact("Campaign"));
}
} else {
$Campaign = LMS::getActiveCampaign();
$viewPath = env("CLIENT_PATH") . ".landing";
if (view()->exists($viewPath))
if (view()->exists($viewPath)) {
return view($viewPath, compact("Campaign"));
else
} else {
return view(env("CLIENT_PATH") . '.home', compact("Campaign"));
}
}
}
}
public function getTestimonial()
{
$testimonials = Testimonials::where('status', 1)->latest()->get();
// dd($testimonials);
return response()->json($testimonials);
}
public function reception(Request $request)
{
//Office ko Reception Bata directly fill-in garne form