Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Laracast13's avatar

Laravel Breeze

Hello

If I install Laravel Breeze it will support API via Laravel Sanctum ?

composer require laravel/breeze --dev
php artisan breeze:install

php artisan migrate
npm install
npm run dev
0 likes
2 replies
treckstar's avatar
Level 12

Laravel 9.x now comes automatically with Sanctum configured and installed.

So your API in the Breeze project will use Sanctum for authentication, if that's what you are asking.

If you aren't using domain localhost for both your API and frontend, then don't forget to setup your .env file correctly. You'll probably need one or both of these to prevent a 419 Session Expired error.

SESSION_DOMAIN=.example.com
SANCTUM_STATEFUL_DOMAINS=.api.example.com

Otherwise it should come out of the box ready to go.

1 like

Please or to participate in this conversation.