Open sidebar
//What is the best way to handle this? in each method or using Route::when or something similar? function updateManager($id) { $data = Input::only(['first_name', 'last_name', 'cell']); $manager = Managers\Manager::findOrFail($id); if(Auth::user()->canEditManager($manager)) { $manager->update($data); $manager->save(); return Redirect::route('manage.index')->with('info', 'Manager Updated'); } else { App::abort(403, "Forbidden - Manager not found in your team"); } }
Close sidebar
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting