You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be wrong, but you need to pass a model instead of ID.
Try using route model binding and see if it works: Route::get('/impersonate/{user}', function(User $user){ Auth::user()->impersonate($user); })->name('impersonate');
Hi,
I have a Laravel project that runs on Inertia/Jetstream + Vue and I installed impersonate following the procedure, but maybe I missed something.
I followed the Simple usage guidelines, creating a get route in web.php like this:
Route::get('/impersonate/{id}', function($id){ Auth::user()->impersonate($id); })->name('impersonate');
But when I call it I get this error:
Following the Using the built-in controller guidelines, instead, I get the following error in console:
this one is get calling route('impersonate', user.id) in my vue template.
Did I miss something or am I doing something wrong? Thanks.
The text was updated successfully, but these errors were encountered: