(Update) Aborts

Replace `abort(403, 'Unauthorized action.’);` use with a graceful
toastr error.
This commit is contained in:
HDVinnie
2018-06-09 21:29:44 -04:00
parent b78b05fc1c
commit d24045acba
7 changed files with 19 additions and 19 deletions

View File

@@ -99,7 +99,7 @@ class ImageController extends Controller
return redirect()->route('show_album', ['id' => $request->input('new_album')]);
}
} else {
abort(403, 'Unauthorized action.');
return back()->with(Toastr::error('You Are Not Authorized To Perform This Action!', 'Error 403', ['options']));
}
}
@@ -141,7 +141,7 @@ class ImageController extends Controller
return redirect()->route('show_album', ['id' => $image->album_id])
->with(Toastr::success('Image has successfully been deleted', 'Yay!', ['options']));
} else {
abort(403, 'Unauthorized action.');
return back()->with(Toastr::error('You Are Not Authorized To Perform This Action!', 'Error 403', ['options']));
}
}
}