I'm trying the new laravel/breeze. I'm using Ubuntu and created the project with the following commands:
composer create-project --prefer-dist laravel/laravel:^8.0
composer require laravel/breeze --dev
php artisan breeze:install
npm install && npm run dev
php artisan serve
Then, i created a database.sqlite in database folder, made the php artisan migrate and then php artisan serve. But this error is returning:
SQLSTATE[HY000]: General error: 1 no such table: sessions (SQL: select * from "sessions" where "id" = CDPZlQLRnWq3YiCmNjX76bCumANwCL2Vykcbl2u4 limit 1)
Does anyone know what's going on? I'm not that experienced with laravel environments, maybe i forgot something in the beginning.
The default driver for sessions in your .env
file is SESSION_DRIVER=file
.
You seem to have changed that to use your database instead.
For this to work you need a table in your database to store session information.
You can do this by running
php artisan session:table
and then
php artisan migrate
to migrate/create the database table.