こっちのほうがマシ
This commit is contained in:
parent
99a92c6106
commit
332b6d7dd0
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user