Creating a Migration for Sessions

Problem

You need to create the table to store database sessions.

Solution

Use the php artisan session:table command.

$ php artisan session:table

Note that this only creates the migration, you'll still need to run the migration.

$ php artisan migrate

Discussion

This is only needed if you use database sessions.

If you change the driver in app/config/session.php to database, then you'll need to create the table to store your sessions in. This command accomplishes that.

comments powered by Disqus