DEV Community

Discussion on: Four ways to pass data from Laravel to Vue

Collapse
 
chrispage1 profile image
chrispage1

Nice article! I'd personally recommend using Laravel Passport. If you authenticate using Laravels standard auth procedure you can then add Laravel Passports CreateFreshApiToken middleware (docs here). This lets you consume your API locally without having to worry about tokens.

It also has the added bonus of being able to take advantage of the power of oAuth with your API endpoints if you expand going forward.