Added gates to controller

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-06-24 14:05:21 +01:00
parent 73a038afd4
commit 1c14c2fdef

View file

@ -28,8 +28,8 @@ class ProfileController extends Controller
*/
public function getIndex()
{
$this->authorize('self.profile');
$user = Auth::user();
return view('account/profile', compact('user'));
}
@ -42,6 +42,7 @@ class ProfileController extends Controller
*/
public function postIndex(ImageUploadRequest $request)
{
$this->authorize('self.profile');
$user = Auth::user();
$user->first_name = $request->input('first_name');
$user->last_name = $request->input('last_name');