From 3502bb0b4fff7d02404927a5d4bcb657394ef383 Mon Sep 17 00:00:00 2001 From: Tanchohang Date: Wed, 24 Apr 2024 10:17:18 +0545 Subject: [PATCH] Final Commit --- app/Helpers/LMS.php | 34 +++ .../CampaignarticlesController.php | 2 +- app/Http/Controllers/FileController.php | 20 ++ app/Http/Controllers/LogosController.php | 200 +++++++++++++ .../Controllers/RegistrationsController.php | 33 ++- .../Controllers/TestimonialsController.php | 201 +++++++++++++ app/Models/Campaignarticles.php | 70 ++--- app/Models/Logos.php | 49 ++++ app/Models/Testimonials.php | 52 ++++ resources/views/backend/sidebar.blade.php | 3 + .../campaignarticles/create.blade.php | 106 +++---- .../generated/campaignarticles/edit.blade.php | 1 + .../crud/generated/logos/create.blade.php | 26 ++ .../views/crud/generated/logos/edit.blade.php | 27 ++ .../crud/generated/logos/index.blade.php | 234 +++++++++++++++ .../views/crud/generated/logos/show.blade.php | 29 ++ .../generated/testimonials/create.blade.php | 34 +++ .../generated/testimonials/edit.blade.php | 34 +++ .../generated/testimonials/index.blade.php | 231 +++++++++++++++ .../generated/testimonials/show.blade.php | 29 ++ .../views/raffels/partials/about.blade.php | 13 +- .../raffels/partials/counselor.blade.php | 20 +- .../views/raffels/partials/slider.blade.php | 7 +- .../raffels/partials/testimonials.blade.php | 275 +++++++----------- .../raffels/partials/unversities.blade.php | 229 +-------------- routes/CRUDgenerated/route.logos.php | 15 + routes/route.client.php | 2 + routes/route.testimonials.php | 17 ++ routes/web.php | 6 +- .../public/raffels/files/1/Logos/Subject.png | Bin 0 -> 24267 bytes .../raffels/files/1/Logos/thumbs/Subject.png | Bin 0 -> 14912 bytes .../raffels/files/1/Logos/thumbs/w3.png | Bin 0 -> 5489 bytes .../app/public/raffels/files/1/Logos/w3.png | Bin 0 -> 17660 bytes .../raffels/files/1/about/boy-large.png | Bin 0 -> 314745 bytes .../raffels/files/1/about/gir-large-2.png | Bin 0 -> 257203 bytes .../raffels/files/1/about/gir-large.png | Bin 0 -> 375198 bytes .../raffels/files/1/about/registerpic.png | Bin 0 -> 437105 bytes .../files/1/about/thumbs/boy-large.png | Bin 0 -> 10191 bytes .../files/1/about/thumbs/gir-large-2.png | Bin 0 -> 12884 bytes .../files/1/about/thumbs/gir-large.png | Bin 0 -> 9865 bytes .../files/1/about/thumbs/registerpic.png | Bin 0 -> 9825 bytes 41 files changed, 1497 insertions(+), 502 deletions(-) create mode 100644 app/Http/Controllers/FileController.php create mode 100644 app/Http/Controllers/LogosController.php create mode 100644 app/Http/Controllers/TestimonialsController.php create mode 100644 app/Models/Logos.php create mode 100644 app/Models/Testimonials.php create mode 100644 resources/views/crud/generated/logos/create.blade.php create mode 100644 resources/views/crud/generated/logos/edit.blade.php create mode 100644 resources/views/crud/generated/logos/index.blade.php create mode 100644 resources/views/crud/generated/logos/show.blade.php create mode 100644 resources/views/crud/generated/testimonials/create.blade.php create mode 100644 resources/views/crud/generated/testimonials/edit.blade.php create mode 100644 resources/views/crud/generated/testimonials/index.blade.php create mode 100644 resources/views/crud/generated/testimonials/show.blade.php create mode 100644 routes/CRUDgenerated/route.logos.php create mode 100644 routes/route.testimonials.php create mode 100644 storage/app/public/raffels/files/1/Logos/Subject.png create mode 100644 storage/app/public/raffels/files/1/Logos/thumbs/Subject.png create mode 100644 storage/app/public/raffels/files/1/Logos/thumbs/w3.png create mode 100644 storage/app/public/raffels/files/1/Logos/w3.png create mode 100644 storage/app/public/raffels/files/1/about/boy-large.png create mode 100644 storage/app/public/raffels/files/1/about/gir-large-2.png create mode 100644 storage/app/public/raffels/files/1/about/gir-large.png create mode 100644 storage/app/public/raffels/files/1/about/registerpic.png create mode 100644 storage/app/public/raffels/files/1/about/thumbs/boy-large.png create mode 100644 storage/app/public/raffels/files/1/about/thumbs/gir-large-2.png create mode 100644 storage/app/public/raffels/files/1/about/thumbs/gir-large.png create mode 100644 storage/app/public/raffels/files/1/about/thumbs/registerpic.png diff --git a/app/Helpers/LMS.php b/app/Helpers/LMS.php index 5aa1a47..20b59c6 100644 --- a/app/Helpers/LMS.php +++ b/app/Helpers/LMS.php @@ -593,6 +593,34 @@ class LMS { static $initialized = false; if (!$initialized) { + DB::statement("CREATE TABLE IF NOT EXISTS `tbl_logos` ( + `logo_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, + `logo` VARCHAR(255), + `link` VARCHAR(255), + `display_order` INT(11), + `status` INT(11), + `remarks` TEXT, + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, + `createdby` INT(11), + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `updatedby` INT(11) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + "); + DB::statement("CREATE TABLE IF NOT EXISTS `tbl_testimonials` ( + `testimonial_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, + `video_url` VARCHAR(255), + `review` VARCHAR(255), + `name` VARCHAR(20) NOT NULL, + `designation` VARCHAR(100), + `display_order` INT(11), + `status` INT(11), + `remarks` TEXT, + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, + `createdby` INT(11), + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `updatedby` INT(11) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + "); DB::statement("CREATE TABLE IF NOT EXISTS `tbl_contactus` ( `inquiries_id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `title` VARCHAR(255), @@ -1595,6 +1623,12 @@ class LMS $table->string('photo')->nullable(); }); } + if (!Schema::hasColumn('campaignarticles', 'sub_title')) { + Schema::table('campaignarticles', function (Blueprint $table) { + // Add the new column to the table + $table->string('sub_title')->nullable()->after('title'); + }); + } $initialized = true; } diff --git a/app/Http/Controllers/CampaignarticlesController.php b/app/Http/Controllers/CampaignarticlesController.php index 712d05c..1d281bf 100644 --- a/app/Http/Controllers/CampaignarticlesController.php +++ b/app/Http/Controllers/CampaignarticlesController.php @@ -144,7 +144,7 @@ DB::beginTransaction(); try { $OperationNumber = getOperationNumber(); - $this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $request->input('campaignarticle_id')); + $this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $id); } catch (Exception $e) { DB::rollBack(); Log::info($e->getMessage()); diff --git a/app/Http/Controllers/FileController.php b/app/Http/Controllers/FileController.php new file mode 100644 index 0000000..fb5c117 --- /dev/null +++ b/app/Http/Controllers/FileController.php @@ -0,0 +1,20 @@ +file('upload'); + $filename = uniqid() . '_' . $file->getClientOriginalName(); + Storage::disk('public')->put($filename, file_get_contents($file)); + $url = asset('storage/' . $filename); + return response()->json([ + 'url' => $url, + ]); + } +} diff --git a/app/Http/Controllers/LogosController.php b/app/Http/Controllers/LogosController.php new file mode 100644 index 0000000..759d7a1 --- /dev/null +++ b/app/Http/Controllers/LogosController.php @@ -0,0 +1,200 @@ +modelService = new CommonModelService($model); + } + public function index(Request $request) + { + createActivityLog(LogosController::class, 'index', ' Logos index'); + $data = Logos::where('status','<>',-1)->orderBy('display_order')->get(); + + return view("crud.generated.logos.index", compact('data')); + } + + public function create(Request $request) + { + createActivityLog(LogosController::class, 'create', ' Logos create'); + $TableData = Logos::where('status','<>',-1)->orderBy('display_order')->get(); + return view("crud.generated.logos.create",compact('TableData')); + } + + public function store(Request $request) + { + createActivityLog(LogosController::class, 'store', ' Logos store'); + $validator = Validator::make($request->all(), [ + //ADD REQUIRED FIELDS FOR VALIDATION + ]); + + if ($validator->fails()) { + return response()->json([ + 'error' => $validator->errors(), + ],500); + } + $request->request->add(['alias' => slugify($request->title)]); + $request->request->add(['display_order' => getDisplayOrder('tbl_logos')]); + $request->request->add(['created_at' => date("Y-m-d h:i:s")]); + $request->request->add(['updated_at' => date("Y-m-d h:i:s")]); + $requestData=$request->all(); + array_walk_recursive($requestData, function (&$value) { + $value = str_replace(env('APP_URL').'/', '', $value); + }); + array_walk_recursive($requestData, function (&$value) { + $value = str_replace(env('APP_URL'), '', $value); + }); + DB::beginTransaction(); + try { + $operationNumber = getOperationNumber(); + $this->modelService->create($operationNumber, $operationNumber, null, $requestData); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + createErrorLog(LogosController::class, 'store', $e->getMessage()); + return response()->json(['status' => false, 'message' => $e->getMessage()], 500); + } + DB::commit(); + if ($request->ajax()) { + return response()->json(['status' => true, 'message' => 'The Logos Created Successfully.'], 200); + } + return redirect()->route('logos.index')->with('success','The Logos created Successfully.'); + } + + public function sort(Request $request) + { + $idOrder = $request->input('id_order'); + + foreach ($idOrder as $index => $id) { + $companyArticle = Logos::find($id); + $companyArticle->display_order = $index + 1; + $companyArticle->save(); + } + + return response()->json(['status' => true, 'content' => 'The articles sorted successfully.'], 200); + } + public function updatealias(Request $request) + { + + $articleId = $request->input('articleId'); + $newAlias = $request->input('newAlias'); + $companyArticle = Logos::find($articleId); + if (!$companyArticle) { + return response()->json(['status' => false, 'content' => 'Company article not found.'], 404); + } + $companyArticle->alias = $newAlias; + $companyArticle->save(); + return response()->json(['status' => true, 'content' => 'Alias updated successfully.'], 200); + } + + + + + public function show(Request $request, $id) + { + createActivityLog(LogosController::class, 'show', ' Logos show'); + $data = Logos::findOrFail($id); + + return view("crud.generated.logos.show", compact('data')); + } + + + public function edit(Request $request, $id) + { + createActivityLog(LogosController::class, 'edit', ' Logos edit'); + $TableData = Logos::where('status','<>',-1)->orderBy('display_order')->get(); + $data = Logos::findOrFail($id); + if ($request->ajax()) { + $html = view("crud.generated.logos.ajax.edit", compact('data'))->render(); + return response()->json(['status' => true, 'content' => $html], 200); + } + return view("crud.generated.logos.edit", compact('data','TableData')); + } + + + public function update(Request $request, $id) + { + createActivityLog(LogosController::class, 'update', ' Logos update'); + $validator = Validator::make($request->all(), [ + //ADD VALIDATION FOR REQIRED FIELDS + ]); + + if ($validator->fails()) { + return response()->json([ + 'error' => $validator->errors(), + ],500); + } + $requestData=$request->all(); + array_walk_recursive($requestData, function (&$value) { + $value = str_replace(env('APP_URL').'/', '', $value); + }); + array_walk_recursive($requestData, function (&$value) { + $value = str_replace(env('APP_URL'), '', $value); + }); + DB::beginTransaction(); + try { + $OperationNumber = getOperationNumber(); + $this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $request->input('logo_id')); + } catch (Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + createErrorLog(LogosController::class, 'update', $e->getMessage()); + return response()->json(['status' => false, 'message' => $e->getMessage()], 500); + } + DB::commit(); + if ($request->ajax()) { + return response()->json(['status' => true, 'message' => 'The Logos updated Successfully.'], 200); + } + // return redirect()->route('logos.index')->with('success','The Logos updated Successfully.'); + return redirect()->back()->with('success', 'The Logos updated successfully.'); + } + + public function destroy(Request $request,$id) + { + createActivityLog(LogosController::class, 'destroy', ' Logos destroy'); + DB::beginTransaction(); + try { + $OperationNumber = getOperationNumber(); + $this->modelService->destroy($OperationNumber, $OperationNumber, $id); + } catch (Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + createErrorLog(LogosController::class, 'destroy', $e->getMessage()); + return response()->json(['status' => false, 'message' => $e->getMessage()], 500); + } + DB::commit(); + return response()->json(['status'=>true,'message'=>'The Logos Deleted Successfully.'],200); + } + public function toggle(Request $request,$id) + { + createActivityLog(LogosController::class, 'destroy', ' Logos destroy'); + $data = Logos::findOrFail($id); + $requestData=['status'=>($data->status==1)?0:1]; + DB::beginTransaction(); + try { + $OperationNumber = getOperationNumber(); + $this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $id); + } catch (Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + createErrorLog(LogosController::class, 'destroy', $e->getMessage()); + return response()->json(['status' => false, 'message' => $e->getMessage()], 500); + } + DB::commit(); + return response()->json(['status'=>true,'message'=>'The Logos Deleted Successfully.'],200); + } + + + + } + \ No newline at end of file diff --git a/app/Http/Controllers/RegistrationsController.php b/app/Http/Controllers/RegistrationsController.php index 129754d..abca00b 100644 --- a/app/Http/Controllers/RegistrationsController.php +++ b/app/Http/Controllers/RegistrationsController.php @@ -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 diff --git a/app/Http/Controllers/TestimonialsController.php b/app/Http/Controllers/TestimonialsController.php new file mode 100644 index 0000000..9f88e99 --- /dev/null +++ b/app/Http/Controllers/TestimonialsController.php @@ -0,0 +1,201 @@ +modelService = new CommonModelService($model); + } + public function index(Request $request) + { + createActivityLog(TestimonialsController::class, 'index', ' Testimonials index'); + $data = Testimonials::where('status','<>',-1)->orderBy('display_order')->get(); + + return view("crud.generated.testimonials.index", compact('data')); + } + + public function create(Request $request) + { + createActivityLog(TestimonialsController::class, 'create', ' Testimonials create'); + $TableData = Testimonials::where('status','<>',-1)->orderBy('display_order')->get(); + return view("crud.generated.testimonials.create",compact('TableData')); + } + + public function store(Request $request) + { + createActivityLog(TestimonialsController::class, 'store', ' Testimonials store'); + $validator = Validator::make($request->all(), [ + //ADD REQUIRED FIELDS FOR VALIDATION + ]); + + if ($validator->fails()) { + return response()->json([ + 'error' => $validator->errors(), + ],500); + } + $request->request->add(['alias' => slugify($request->title)]); + $request->request->add(['display_order' => getDisplayOrder('tbl_testimonials')]); + $request->request->add(['created_at' => date("Y-m-d h:i:s")]); + $request->request->add(['updated_at' => date("Y-m-d h:i:s")]); + $requestData=$request->all(); + array_walk_recursive($requestData, function (&$value) { + $value = str_replace(env('APP_URL').'/', '', $value); + }); + array_walk_recursive($requestData, function (&$value) { + $value = str_replace(env('APP_URL'), '', $value); + }); + DB::beginTransaction(); + try { + $operationNumber = getOperationNumber(); + $this->modelService->create($operationNumber, $operationNumber, null, $requestData); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + createErrorLog(TestimonialsController::class, 'store', $e->getMessage()); + return response()->json(['status' => false, 'message' => $e->getMessage()], 500); + } + DB::commit(); + if ($request->ajax()) { + return response()->json(['status' => true, 'message' => 'The Testimonials Created Successfully.'], 200); + } + return redirect()->route('testimonials.index')->with('success','The Testimonials created Successfully.'); + } + + public function sort(Request $request) + { + $idOrder = $request->input('id_order'); + + foreach ($idOrder as $index => $id) { + $companyArticle = Testimonials::find($id); + $companyArticle->display_order = $index + 1; + $companyArticle->save(); + } + + return response()->json(['status' => true, 'content' => 'The articles sorted successfully.'], 200); + } + public function updatealias(Request $request) + { + + $articleId = $request->input('articleId'); + $newAlias = $request->input('newAlias'); + $companyArticle = Testimonials::find($articleId); + if (!$companyArticle) { + return response()->json(['status' => false, 'content' => 'Company article not found.'], 404); + } + $companyArticle->alias = $newAlias; + $companyArticle->save(); + return response()->json(['status' => true, 'content' => 'Alias updated successfully.'], 200); + } + + + + + public function show(Request $request, $id) + { + createActivityLog(TestimonialsController::class, 'show', ' Testimonials show'); + $data = Testimonials::findOrFail($id); + + return view("crud.generated.testimonials.show", compact('data')); + } + + + public function edit(Request $request, $id) + { + createActivityLog(TestimonialsController::class, 'edit', ' Testimonials edit'); + $TableData = Testimonials::where('status','<>',-1)->orderBy('display_order')->get(); + $data = Testimonials::findOrFail($id); + if ($request->ajax()) { + $html = view("crud.generated.testimonials.ajax.edit", compact('data'))->render(); + return response()->json(['status' => true, 'content' => $html], 200); + } + return view("crud.generated.testimonials.edit", compact('data','TableData')); + } + + + public function update(Request $request, $id) + { + // dd($request->all()); + createActivityLog(TestimonialsController::class, 'update', ' Testimonials update'); + $validator = Validator::make($request->all(), [ + //ADD VALIDATION FOR REQIRED FIELDS + ]); + + if ($validator->fails()) { + return response()->json([ + 'error' => $validator->errors(), + ],500); + } + $requestData=$request->all(); + array_walk_recursive($requestData, function (&$value) { + $value = str_replace(env('APP_URL').'/', '', $value); + }); + array_walk_recursive($requestData, function (&$value) { + $value = str_replace(env('APP_URL'), '', $value); + }); + DB::beginTransaction(); + try { + $OperationNumber = getOperationNumber(); + $this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $id); + } catch (Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + createErrorLog(TestimonialsController::class, 'update', $e->getMessage()); + return response()->json(['status' => false, 'message' => $e->getMessage()], 500); + } + DB::commit(); + if ($request->ajax()) { + return response()->json(['status' => true, 'message' => 'The Testimonials updated Successfully.'], 200); + } + // return redirect()->route('testimonials.index')->with('success','The Testimonials updated Successfully.'); + return redirect()->back()->with('success', 'The Testimonials updated successfully.'); + } + + public function destroy(Request $request,$id) + { + createActivityLog(TestimonialsController::class, 'destroy', ' Testimonials destroy'); + DB::beginTransaction(); + try { + $OperationNumber = getOperationNumber(); + $this->modelService->destroy($OperationNumber, $OperationNumber, $id); + } catch (Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + createErrorLog(TestimonialsController::class, 'destroy', $e->getMessage()); + return response()->json(['status' => false, 'message' => $e->getMessage()], 500); + } + DB::commit(); + return response()->json(['status'=>true,'message'=>'The Testimonials Deleted Successfully.'],200); + } + public function toggle(Request $request,$id) + { + createActivityLog(TestimonialsController::class, 'destroy', ' Testimonials destroy'); + $data = Testimonials::findOrFail($id); + $requestData=['status'=>($data->status==1)?0:1]; + DB::beginTransaction(); + try { + $OperationNumber = getOperationNumber(); + $this->modelService->update($OperationNumber, $OperationNumber, null, $requestData, $id); + } catch (Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + createErrorLog(TestimonialsController::class, 'destroy', $e->getMessage()); + return response()->json(['status' => false, 'message' => $e->getMessage()], 500); + } + DB::commit(); + return response()->json(['status'=>true,'message'=>'The Testimonials Deleted Successfully.'],200); + } + + + + } + \ No newline at end of file diff --git a/app/Models/Campaignarticles.php b/app/Models/Campaignarticles.php index cb03113..f784d0c 100644 --- a/app/Models/Campaignarticles.php +++ b/app/Models/Campaignarticles.php @@ -1,42 +1,44 @@ status == 1 ? ' Active ' : 'Inactive'; - } + ]; + + protected $appends = ['status_name']; + + protected function getStatusNameAttribute() + { + return $this->status == 1 ? ' Active ' : 'Inactive'; + } protected function createdBy(): Attribute { @@ -51,4 +53,4 @@ get: fn ($value) => User::find($value) ? User::find($value)->name : '', ); } - } \ No newline at end of file +} diff --git a/app/Models/Logos.php b/app/Models/Logos.php new file mode 100644 index 0000000..7bf543d --- /dev/null +++ b/app/Models/Logos.php @@ -0,0 +1,49 @@ +status == 1 ? ' Active ' : 'Inactive'; + } + + protected function createdBy(): Attribute + { + return Attribute::make( + get: fn ($value) => User::find($value) ? User::find($value)->name : '', + ); + } + + protected function updatedBy(): Attribute + { + return Attribute::make( + get: fn ($value) => User::find($value) ? User::find($value)->name : '', + ); + } + } \ No newline at end of file diff --git a/app/Models/Testimonials.php b/app/Models/Testimonials.php new file mode 100644 index 0000000..eb4d5c8 --- /dev/null +++ b/app/Models/Testimonials.php @@ -0,0 +1,52 @@ +status == 1 ? ' Active ' : 'Inactive'; + } + + protected function createdBy(): Attribute + { + return Attribute::make( + get: fn ($value) => User::find($value) ? User::find($value)->name : '', + ); + } + + protected function updatedBy(): Attribute + { + return Attribute::make( + get: fn ($value) => User::find($value) ? User::find($value)->name : '', + ); + } +} diff --git a/resources/views/backend/sidebar.blade.php b/resources/views/backend/sidebar.blade.php index 9e091df..48bb090 100644 --- a/resources/views/backend/sidebar.blade.php +++ b/resources/views/backend/sidebar.blade.php @@ -284,6 +284,9 @@ {{LMS::createMenuLink("Followups",route('followups.index'))}} {{LMS::createMenuLink("Most Asked Questions",route('faqs.index'))}} {{LMS::createMenuLink("Inquiries",route('contactus.index'))}} + {{LMS::createMenuLink("Testimonials",route('testimonials.index'))}} + {{LMS::createMenuLink("Manage Logos",route('logos.index'))}} + diff --git a/resources/views/crud/generated/campaignarticles/create.blade.php b/resources/views/crud/generated/campaignarticles/create.blade.php index bbda858..3b1d09c 100644 --- a/resources/views/crud/generated/campaignarticles/create.blade.php +++ b/resources/views/crud/generated/campaignarticles/create.blade.php @@ -1,61 +1,67 @@ @extends('backend.template') @section('content') - -
+ +
-
-

Add Campaign

-
- -
+
+

Add Campaign

+
+
+
-
- -
+
+ + @csrf
-
-
-
-
-
{{createText("title","title","Title")}}
-
{{createTextarea("text","text ckeditor-classic","Description")}}
-
{{createText("link","link","Link")}}
-
-
+
+
+
+
+
{{ createText('title', 'title', 'Title') }}
+
{{ createText('sub_title', 'sub_title', 'Sub Title') }}
+
{{ createTextarea('text', 'text ckeditor-classic', 'Description') }} +
+
{{ createText('link', 'link', 'Link') }}
+
-
-
-
-

Attributes

-
-
-
-
{{createCustomSelect('tbl_campaigns', 'title', 'campaign_id', '', 'Campaigns Id','campaigns_id', 'form-control select2','status<>-1')}}
-
{{createCustomSelect('tbl_campaignarticles', 'title', 'campaignarticle_id', '', 'Parent Article','parent_article', 'form-control select2','status<>-1')}}
-
-
-
-
-
-

Images

-
-
-
-
{{createImageInput("cover_photo","Cover Photo")}}
-
{{createImageInput("thumb","Thumb")}}
-
-
-
-
- - +
+
+
+
+

Attributes

+
+
+
+
+ {{ createCustomSelect('tbl_campaigns', 'title', 'campaign_id', '', 'Campaigns Id', 'campaigns_id', 'form-control select2', 'status<>-1') }} +
+
+ {{ createCustomSelect('tbl_campaignarticles', 'title', 'campaignarticle_id', '', 'Parent Article', 'parent_article', 'form-control select2', 'status<>-1') }} +
+
- -@endsection \ No newline at end of file +
+
+

Images

+
+
+
+
{{ createImageInput('cover_photo', 'Cover Photo') }}
+
{{ createImageInput('thumb', 'Thumb') }}
+
+
+
+
+ + +
+
+ +@endsection diff --git a/resources/views/crud/generated/campaignarticles/edit.blade.php b/resources/views/crud/generated/campaignarticles/edit.blade.php index 7f6ebc6..3eb004f 100644 --- a/resources/views/crud/generated/campaignarticles/edit.blade.php +++ b/resources/views/crud/generated/campaignarticles/edit.blade.php @@ -23,6 +23,7 @@
{{createText("title","title","Title",'',$data->title)}}
+
{{createText("sub_title","sub_title","Sub Title",'',$data->sub_title)}}
{{createTextarea("text","text ckeditor-classic","Text",$data->text)}}
{{createText("link","link","Link",'',$data->link)}}
diff --git a/resources/views/crud/generated/logos/create.blade.php b/resources/views/crud/generated/logos/create.blade.php new file mode 100644 index 0000000..3886fa7 --- /dev/null +++ b/resources/views/crud/generated/logos/create.blade.php @@ -0,0 +1,26 @@ +@extends('backend.template') +@section('content') +
+
+

{{ label('Add Logos') }}

+ + +
+
+
+ @csrf +
+
+ {{createImageInput('logo','Logo')}} +
+
{{ createText('link', 'link', 'Link') }} +
+
{{ createPlainTextArea('remarks', 'remarks ', 'Remarks') }} +

+
+ +
+ +
+
+@endsection diff --git a/resources/views/crud/generated/logos/edit.blade.php b/resources/views/crud/generated/logos/edit.blade.php new file mode 100644 index 0000000..113c747 --- /dev/null +++ b/resources/views/crud/generated/logos/edit.blade.php @@ -0,0 +1,27 @@ +@extends('backend.template') +@section('content') +
+
+

{{ label('Edit Logos') }}

+ + +
+
+
+ @csrf +
+
+
{{ createImageInput('thumb', 'Thumb', '', $data->logo) }} + +
+
{{ createText('link', 'link', 'Link', '', $data->link) }} +
+
{{ createPlainTextArea('remarks', '', 'Remarks', $data->remarks) }} +
+
+ +
+ +
+
+@endsection diff --git a/resources/views/crud/generated/logos/index.blade.php b/resources/views/crud/generated/logos/index.blade.php new file mode 100644 index 0000000..0ab8771 --- /dev/null +++ b/resources/views/crud/generated/logos/index.blade.php @@ -0,0 +1,234 @@ +@extends('backend.template') +@section('content') +
+
+

{{ label('Logos List') }}

+ {{ label('Create New') }} +
+
+ + + + + + + + + + + @php + $i = 1; + @endphp + @foreach ($data as $item) + + + + + + + @endforeach + + +
{{ label('Sn.') }}{{ label('logo') }}{{ label('link') }}{{ label('Action') }} +
{{ $i++ }}{{ showImageThumb($item->logo) }}{{ $item->link }} + + + +
+ + +
+
+@endsection + +@push('css') + + +@endpush +@push('js') + + + + + + + + + + +@endpush diff --git a/resources/views/crud/generated/logos/show.blade.php b/resources/views/crud/generated/logos/show.blade.php new file mode 100644 index 0000000..74cd5ab --- /dev/null +++ b/resources/views/crud/generated/logos/show.blade.php @@ -0,0 +1,29 @@ +@extends('backend.template') + @section('content') +
+
+

+ + +
+
+ + + +

Logo :     {{$data->logo}}

Link :     {{$data->link}}

Display Order :     {{$data->display_order}}

Status :     {{$data->status == 1 ? 'Active' : 'Inactive'}}

Remarks :     {{$data->remarks}}

Createdby :     {{$data->createdby}}

Updatedby :     {{$data->updatedby}}

+
+

Created On :   {{$data->created_at}}

+

Created By :   {{$data->createdBy}}

+
+
+

Updated On :   {{$data->updated_at}}

+

Updated By :   {{$data->updatedBy}}

+ +
+
+ +
+
+ +@endSection \ No newline at end of file diff --git a/resources/views/crud/generated/testimonials/create.blade.php b/resources/views/crud/generated/testimonials/create.blade.php new file mode 100644 index 0000000..d4ae811 --- /dev/null +++ b/resources/views/crud/generated/testimonials/create.blade.php @@ -0,0 +1,34 @@ +@extends('backend.template') +@section('content') +
+
+

{{ label('Add Testimonials') }}

+ + +
+
+
+ @csrf +
+ {{--
{{ createText('video_url', 'video_url', 'Video Url') }} +
--}} +
+ + +
+ +
{{ createText('review', 'review', 'Review') }} +
+
{{ createText('name', 'name', 'Name') }} +
+
{{ createText('designation', 'designation', 'Designation') }} +
+
{{ createPlainTextArea('remarks', 'remarks ', 'Remarks') }} +

+
+ +
+ +
+
+@endsection diff --git a/resources/views/crud/generated/testimonials/edit.blade.php b/resources/views/crud/generated/testimonials/edit.blade.php new file mode 100644 index 0000000..236570b --- /dev/null +++ b/resources/views/crud/generated/testimonials/edit.blade.php @@ -0,0 +1,34 @@ +@extends('backend.template') +@section('content') +
+
+

{{ label('Edit Testimonials') }}

+ + +
+
+
+ @csrf +
+
+ + +
Current video URL: {{ $data->video_url }}
+
+ +
{{ createText('review', 'review', 'Review', '', $data->review) }} +
+
{{ createText('name', 'name', 'Name', '', $data->name) }} +
+
+ {{ createText('designation', 'designation', 'Designation', '', $data->designation) }} +
+
{{ createPlainTextArea('remarks', '', 'Remarks', $data->remarks) }} +
+
+ +
+ +
+
+@endsection diff --git a/resources/views/crud/generated/testimonials/index.blade.php b/resources/views/crud/generated/testimonials/index.blade.php new file mode 100644 index 0000000..8b57d89 --- /dev/null +++ b/resources/views/crud/generated/testimonials/index.blade.php @@ -0,0 +1,231 @@ +@extends('backend.template') +@section('content') +
+
+

{{ label("Testimonials List") }}

+ {{label("Create New")}} +
+
+ + + + + + + + + + + + + @php + $i = 1; + @endphp + @foreach ($data as $item) + + "> + + + + + + + + @endforeach + + +
{{label("Sn.")}}{{ label("video_url") }}{{ label("review") }}{{ label("name") }}{{ label("designation") }}{{ label("Action") }} +
{{ $i++ }}{{ $item->video_url }}{{ $item->review }}{{ $item->name }}{{ $item->designation }} + + + +
+ + +
+
+ + @endsection + +@push("css") + + +@endpush +@push("js") + + + + + + + + + + + + +@endpush + \ No newline at end of file diff --git a/resources/views/crud/generated/testimonials/show.blade.php b/resources/views/crud/generated/testimonials/show.blade.php new file mode 100644 index 0000000..76a1880 --- /dev/null +++ b/resources/views/crud/generated/testimonials/show.blade.php @@ -0,0 +1,29 @@ +@extends('backend.template') + @section('content') +
+
+

+ + +
+
+ + + +

Video Url :     {{$data->video_url}}

Review :     {{$data->review}}

Name :     {{$data->name}}

Designation :     {{$data->designation}}

Display Order :     {{$data->display_order}}

Status :     {{$data->status == 1 ? 'Active' : 'Inactive'}}

Remarks :     {{$data->remarks}}

Createdby :     {{$data->createdby}}

Updatedby :     {{$data->updatedby}}

+
+

Created On :   {{$data->created_at}}

+

Created By :   {{$data->createdBy}}

+
+
+

Updated On :   {{$data->updated_at}}

+

Updated By :   {{$data->updatedBy}}

+ +
+
+ +
+
+ +@endSection \ No newline at end of file diff --git a/resources/views/raffels/partials/about.blade.php b/resources/views/raffels/partials/about.blade.php index ea5cdfb..e7310ff 100644 --- a/resources/views/raffels/partials/about.blade.php +++ b/resources/views/raffels/partials/about.blade.php @@ -3,11 +3,13 @@
- + @php + $articleTwo = $articles->where('display_order',2)->first(); + @endphp
- +
@@ -24,11 +26,12 @@
About Raffels Educare
-

Your Trust Our Commitment

-

Raffles Educare Associates Pvt. Ltd., established in 2005, is one of the best educational consultancy with a successful track record in the overseas education.Over the 15 years of excellence we have 97% visa success rate along with highest student satisfaction, fulfilling the career dreams of many students. Since the year of inception, we have been providing educational services of international standards and escalated to be one of the leading institutions. We have our head office located at Kathmandu, capital city of Nepal and other branches at the major cities such as Itahari, Damauli, Pokhara, and further extension in progress in the country as well as abroad.

+

{{$articleTwo->title}}

+ {{-- @dd($article) --}} +

{!!$articleTwo->text!!}

diff --git a/resources/views/raffels/partials/counselor.blade.php b/resources/views/raffels/partials/counselor.blade.php index 547d254..bd9d96f 100644 --- a/resources/views/raffels/partials/counselor.blade.php +++ b/resources/views/raffels/partials/counselor.blade.php @@ -4,23 +4,21 @@
- + @php + $articleThree = $articles->where('display_order',3)->first(); + @endphp
Meet Our Counselor
-

Empower, Inspire, Achieve

-

At Raffles Educare, we take pride in introducing you to our dedicated and highly - experienced counselor who is here to guide you through your educational journey. - Our counselor is not just a professional but also a compassionate individual who - understands the unique needs and aspirations of each student. - - - .

+

{{$articleThree->title}}

+

+ {!!$articleThree->text!!} +

@@ -31,7 +29,7 @@
- +
diff --git a/resources/views/raffels/partials/slider.blade.php b/resources/views/raffels/partials/slider.blade.php index daa6ad5..28d32ae 100644 --- a/resources/views/raffels/partials/slider.blade.php +++ b/resources/views/raffels/partials/slider.blade.php @@ -12,8 +12,11 @@ Stay connect to get upcoming events with Raffels
+ @php + $articleOne = $articles->where('display_order',1)->first(); + @endphp
- Find Your Perfect Destinations
+ {{$articleOne->title}} {{$articleOne->sub_title}}
Adding wings to Your Dreams
@@ -24,7 +27,7 @@
- # + #
diff --git a/resources/views/raffels/partials/testimonials.blade.php b/resources/views/raffels/partials/testimonials.blade.php index bb1ae54..536d83c 100644 --- a/resources/views/raffels/partials/testimonials.blade.php +++ b/resources/views/raffels/partials/testimonials.blade.php @@ -1,242 +1,165 @@
- -
- -
-

Testimonials



-
-
-
- - +
+

Testimonials



+
+ @foreach ($testimonials as $item) +
+
+ +
+
{{$item->review}}
+
+
{{$item->name}}
+
{{$item->designation}}
+
+
+ @endforeach +
+
+
diff --git a/resources/views/raffels/partials/unversities.blade.php b/resources/views/raffels/partials/unversities.blade.php index d7c8bc5..2fe035d 100644 --- a/resources/views/raffels/partials/unversities.blade.php +++ b/resources/views/raffels/partials/unversities.blade.php @@ -14,227 +14,20 @@
-
-
-