SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cloud18i_dbpethu.sessions' doesn't exist

Viewed 6895

Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cloud18i_dbpethu.sessions' doesn't exist (SQL: select * from sessions where id = qsRvWKYASahEiKfVp2UthleTtvxkEZlkb6rronAO limit 1)

2 Answers

The session table is not generated by default when you setup your application, somebody didn't use the session on database (using redis or filesystem)

To generate the table try calling the php artisan session:table then, migrate the table php artisan migrate this will create a session table for you.

After deciding to revert a Laravel Jetstream installation, a line in my .env file was changed from:

SESSION_DRIVER=file to SESSION_DRIVER=database

Changing it back to SESSION_DRIVER=file fixed the issue.

Related