404labfr / 404labfr/laravel-impersonate

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

オープン
#166 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
2.3k
フォーク
235
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。