In my laravel 5.6/vue.js / 2.5 / VueRouter 3.0.1 application I make login using twitter and in app/Http/Controllers/Auth/LoginController.php I have methods to auth twitter user. After that I need to show some common message , pointing to component, which I usually call as:
<router-link :to="{name: 'msgPage', params: {msg: 'sometext', type:'warning', redirect: 'redirect_url'} }">
Some Test
</router-link>
which is rendered into url like:
http://local-artists-rating.com/home#/admin/msg/sometext111%20222%20333/error/login
But I wander how correctly run from php control VueRouter component ?
I found a way :
$url= "/home#/admin/dashboard/google_new_user/" . urlencode($loggedUser->username);
return redirect($url);
Sometimes it works, but not always and I do not is there is a valid way of this? Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire