Skip to content

Commit 2263df2

Browse files
add a missing trait to the inertia guide (#69)
* add a missing trait to the inertia guide * Update editing-chirps.md * Update editing-chirps.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent af2a950 commit 2263df2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/docs/inertia/editing-chirps.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ namespace App\Http\Controllers;
201201
use App\Models\Chirp;
202202
use Illuminate\Http\RedirectResponse;
203203
use Illuminate\Http\Request;
204+
use Illuminate\Support\Facades\Gate;
204205
use Inertia\Inertia;
205206
use Inertia\Response;
206207
// [tl! collapse:end]
@@ -262,7 +263,7 @@ class ChirpController extends Controller
262263
public function update(Request $request, Chirp $chirp): RedirectResponse// [tl! add]
263264
{
264265
//
265-
$this->authorize('update', $chirp);// [tl! remove:-1,1 add:start]
266+
Gate::authorize('update', $chirp);// [tl! remove:-1,1 add:start]
266267

267268
$validated = $request->validate([
268269
'message' => 'required|string|max:255',

0 commit comments

Comments
 (0)