0

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hrm-master.sessions' doesn't exist (SQL: select * from sessions where id = FCtzXvm1CTIvGJCfWuTVyO1bpyDIDVnt9FlmoCAY limit 1)

in Connection.php line 647 at Connection->runQueryCallback('select * from sessions where id = ? limit 1', array('FCtzXvm1CTIvGJCfWuTVyO1bpyDIDVnt9FlmoCAY'), object(Closure)) in Connection.php line 607

Kirk Beard
  • 9,569
  • 12
  • 43
  • 47
jokova
  • 13
  • 3

1 Answers1

1

You have the session configured to use your database at config/session.php.

You can read the docs here: https://laravel.com/docs/5.7/session#database-sessions

Mae sure you have this table/migration:

Schema::create('sessions', function ($table) {
    $table->string('id')->unique();
    $table->unsignedInteger('user_id')->nullable();
    $table->string('ip_address', 45)->nullable();
    $table->text('user_agent')->nullable();
    $table->text('payload');
    $table->integer('last_activity');
});

If not, run the following commands:

php artisan session:table

php artisan migrate
Felippe Duarte
  • 14,901
  • 2
  • 25
  • 29