PATH:
home
/
lab2454c
/
healthvalidate.com
/
app
/
Http
/
Controllers
/
admin
<?php namespace App\Http\Controllers\admin; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\ChecklistContent; class ChecklistContentController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data['checklistContents'] = ChecklistContent::get(); return view('admin.dashboard.checklist_content.list', $data); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit(ChecklistContent $checklistContent) { $data['checklistContent'] = $checklistContent; return view('admin.dashboard.checklist_content.edit', $data); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, ChecklistContent $checklistContent) { $changed = false; $values = $request->validate([ "checklist_title" => "required|string|max:200", "checklist_content" => "required|string|max:400", "vacination_review_title" => "required|string|max:200", "vacination_review_content" => "required|string|max:400", "test_review_title" => "required|string|max:200", "test_review_content" => "required|string|max:400", "travel_authorization_title" => "required|string|max:200", "travel_authorization_content" => "required|string|max:400", ]); $checklistContent->fill($values); if ($checklistContent->isDirty()) { $checklistContent->save(); $changed = true; } if (! $changed) { return redirect()->route('admin.checklistContent.index')->withErrors('No changes done to save'); } return redirect()->route('admin.checklistContent.index')->with('success', 'Checklist Data is updated Successfully!'); } }
[+]
..
[-] ChecklistContentController.php
[edit]
[-] DynamicPageController.php
[edit]
[-] ManageAdminAuthentication.php
[edit]
[-] SocialLinkController.php
[edit]
[-] CopyrightController.php
[edit]
[-] BannerImageController.php
[edit]
[-] GalleryController.php
[edit]
[-] VaccinationReviewContentController.php
[edit]
[-] LegalConsentController.php
[edit]
[-] HelpController.php
[edit]
[+]
dashboard