2

I've updated my Laravel installation with the following commands today (which is a few days after Laravel 4's release date):

php composer self-update
php composer update

You can have a look at my composer.json file here: http://paste.laravel.com/umX

In the Docs I've found out about the Maintenance Mode... (http://laravel.com/docs/configuration#maintenance-mode) Trying to use it returns:

[InvalidArgumentException]      
Command "down" is not defined.

Command I've entered in the terminal for this exception:

php artisan down

My current version:

php artisan --version
Laravel Framework version 4.0.0

Any ideas? Did i miss something, am I still on some old version possibly?

Thanks in advance and best regards, Martin.

Antonio Carlos Ribeiro
  • 86,191
  • 22
  • 213
  • 204
Martin
  • 691
  • 1
  • 9
  • 18

4 Answers4

2

The fix for me was to update the 'providers' array in ./app/config/app.php. I thought I was doing a pretty good job of manually updating the L4 skeleton near the end of the beta period, but there was a minor change in that array (not sure which line) that allowed the 'down' command to finally appear in artisan.

Rufhausen
  • 216
  • 1
  • 3
  • Yes it was definitely my outdated skeleton (After a fresh install i also found out that its HTML:: again, not Html:: anymore :D ) Thank you for your reply. – Martin Jun 03 '13 at 20:53
0

In app/start/global.php (or app/start/artisan.php), you need:

App::down(function() { return Response::make("Be right back!", 503); });

don't you?

Perhaps you could also try updating laravel via composer "composer update" in CLI.

Rob W
  • 9,134
  • 1
  • 30
  • 50
  • Thanks for you reply, I've tried adding it in both files but this wont fix it. Also from my understanding there's nothing to do in order to make this artisan command working by default. Your code would only define the response message to output once the application is in maintenance mode wouldn't it? To me it seems like my Laravel installation is not updated correctly :S – Martin May 31 '13 at 21:08
0

The first thing I suggest you do is just run php artisan list to get a list of all the available commands. If the up and down commands aren't listed then you probably aren't fully updated.

If you have a bootstrap/compiled.php file try deleting it. Also make sure you pull the latest changes in from the laravel/laravel GitHub repository to update your application skeleton.

Once you've done the above you can again check for the existence of the commands by running php artisan list.

Jason Lewis
  • 18,537
  • 4
  • 61
  • 64
  • >> Also make sure you pull the latest changes in from the laravel/laravel GitHub repository to update your application skeleton. That was the trouble maker thought, thank you! – Martin Jun 01 '13 at 03:30
0

I've just installed a clean Laravel 4 clone and tryed the maintenance mode with it.

Everything's working as supposed...

I've also compared the composer.json files + I'm pretty sure I've done nothing wrong updating to the stable release version even thought my app/start/* php-files remain unchanged.

Summary:

Composer seems to not override the php files in app/start/* which would be needed in order to get the maintenance mode working correctly. Probably there are even more files not being updated. This also makes a lot of sense, since you could have done some important customizations to your application there.

Correct me if I'm wrong... I'll start importing my package into a clean install thought. Don't want to run into more trouble due to this.

Best Regards, Martin.

Martin
  • 691
  • 1
  • 9
  • 18