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\LegalConsent; class LegalConsentController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data['legalConsents'] = LegalConsent::get(); return view('admin.dashboard.legal_consent.list', $data); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit(LegalConsent $legalConsent) { $data['legalConsent'] = $legalConsent; return view('admin.dashboard.legal_consent.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, LegalConsent $legalConsent) { $changed = false; $values = $request->validate([ "legal_title" => "required|string|max:200", "legal_content" => "required|string|max:400", "trip_management_privacy_title" => "required|string|max:200", "trip_management_privacy_content" => "required|string|max:400", "health_data_consent_title" => "required|string|max:200", "health_data_consent_content" => "required|string|max:400", "data_transfer_consent_title" => "required|string|max:200", "data_transfer_consent_content" => "required|string|max:400", ]); $legalConsent->fill($values); if ($legalConsent->isDirty()) { $legalConsent->save(); $changed = true; } if (! $changed) { return redirect()->route('admin.legalConsent.index')->withErrors('No changes done to save'); } return redirect()->route('admin.legalConsent.index')->with('success', 'Legal 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