- Prepare tables
php artisan session:table
php artisan migrate
- Create Artisan Console command
In the App\Console\Commands directory, create a SessionMigrate.php file with the following content:
- Run the migration script
php artisan migrate:sessions
- Clear the Laravel config cache
php artisan config:cache
- Done.