404labfr / 404labfr/laravel-impersonate

Impersonation breaks down when calling the route('impersonate', $id) in vue

Ouverte
#166 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
PHP
Étoiles
2.3k
Forks
235
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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:
![Schermata del 2022-08-26 09-41-33](https://user-images.githubusercontent.com/107467952/186849668-3123ad69-dfa8-4139-a743-099e5e05d6d9.png)

Following the **Using the built-in controller** guidelines, instead, I get the following error in console:

![Schermata del 2022-08-26 09-43-19](https://user-images.githubusercontent.com/107467952/186850044-a40ef761-a313-4eb8-bec7-695ab61f0204.png)

this one is get calling route('impersonate', user.id) in my vue template.

Did I miss something or am I doing something wrong? Thanks.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.