hi @sultenhest !
You can use Laravel Sanctum, here is a video tutorial on laracasts:
https://laracasts.com/series/whats-new-in-laravel-7/episodes/6
Good luck!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi
I want to build a Laravel application where most of the functionality (CRUD) will exist once the user has logged in. I want to build this backend part as an SPA (using vue-router) inside the Laravel project, consuming it's own API.
I also want to use the "standard" authentication from the laravel/ui package to log the user in and, as of now, i don't plan on building external consumers or letting the user create their own consumers of the API.
Since Laravel 7, the section about API Authentication with api_tokens ( https://laravel.com/docs/6.x/api-authentication ) has been removed from the docs, so i suppose this approach has been deprecated, even though, this basically does what i need with localStorage, but lacks security.
So my question is, is it overkill to use Passport for this or is this generally the way to do it in Laravel 7 for a use case like this? What is, if there is one, the alternative?
hi @sultenhest !
You can use Laravel Sanctum, here is a video tutorial on laracasts:
https://laracasts.com/series/whats-new-in-laravel-7/episodes/6
Good luck!
Please or to participate in this conversation.