PATH:
home
/
lab2454c
/
tripvare.com
/
app
/
Http
/
Controllers
/
admin
<?php namespace App\Http\Controllers\admin; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Copyright; class CopyrightController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data['copyrights'] = Copyright::get(); return view('admin.dashboard.manage_copyright.list', $data); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit(Copyright $copyright) { $data['copyright'] = $copyright; return view('admin.dashboard.manage_copyright.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, Copyright $copyright) { $changed = false; $values = $request->validate([ "content" => "required|string|max:400", ]); $copyright->fill($values); if ($copyright->isDirty()) { $copyright->save(); $changed = true; } if (! $changed) { return redirect()->route('admin.copyright.index')->withErrors('No changes done to save'); } return redirect()->route('admin.copyright.index')->with('success', 'Copyright Text 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