This is what you are looking for: https://laravel.com/docs/8.x/sanctum#introduction
https://laravel.com/docs/8.x/sanctum#how-it-works-spa-authentication
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi guys,
I seem to be having a little bit of a brain cloud moment.
So basically I have a very simple website I am building in Vuejs. I then want to call out to a Laravel API to save and retrieve some records from a database. There's no user login etc, just purely, storing and retrieval of records.
With this in mind what is the best approach here in terms of protecting the routes - from the VueJS app I believe I should be passing and API key to the Laravel App, im just unsure what package aids this from laravels point of view?
Please can someone help me overcome my brain cloud here please?
Please or to participate in this conversation.