こっちのほうがマシ

This commit is contained in:
shibafu 2019-10-14 02:24:39 +09:00
parent 99a92c6106
commit 332b6d7dd0

View File

@ -106,9 +106,7 @@ class EjaculationController extends Controller
{ {
$ejaculation = Ejaculation::findOrFail($id); $ejaculation = Ejaculation::findOrFail($id);
if (Auth::user()->cant('edit', $ejaculation)) { $this->authorize('edit', $ejaculation);
abort(403);
}
return view('ejaculation.edit')->with(compact('ejaculation')); return view('ejaculation.edit')->with(compact('ejaculation'));
} }
@ -117,9 +115,7 @@ class EjaculationController extends Controller
{ {
$ejaculation = Ejaculation::findOrFail($id); $ejaculation = Ejaculation::findOrFail($id);
if (Auth::user()->cant('edit', $ejaculation)) { $this->authorize('edit', $ejaculation);
abort(403);
}
$inputs = $request->all(); $inputs = $request->all();
@ -172,9 +168,7 @@ class EjaculationController extends Controller
{ {
$ejaculation = Ejaculation::findOrFail($id); $ejaculation = Ejaculation::findOrFail($id);
if (Auth::user()->cant('edit', $ejaculation)) { $this->authorize('edit', $ejaculation);
abort(403);
}
$user = User::findOrFail($ejaculation->user_id); $user = User::findOrFail($ejaculation->user_id);
$ejaculation->tags()->detach(); $ejaculation->tags()->detach();