From 59df5f3c6d5e8af9267814ab6c0b96b60a426f9d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 27 Jan 2012 10:39:52 -0600 Subject: [PATCH] set the application key when creating the session table. --- laravel/cli/tasks/session/manager.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/laravel/cli/tasks/session/manager.php b/laravel/cli/tasks/session/manager.php index 8e67c6bf..7c7dba99 100644 --- a/laravel/cli/tasks/session/manager.php +++ b/laravel/cli/tasks/session/manager.php @@ -21,6 +21,13 @@ class Manager extends Task { { $migrator = IoC::resolve('task: migrate'); + $key = IoC::resolve('task: key'); + + // Since sessions can't work without an application key, we will go + // ahead and set the key if one has not already been set for the + // application so the developer doesn't need to set it. + $key->generate(); + // To create the session table, we will actually create a database // migration and then run it. This allows the application to stay // portable through migrations while still having a session table