inspirational quotes artisan inspire

Want an inspirational quote? There’s Artisan command for that!

Web-development is not all serious – there are some fun activities too. So let’s have a break from mega-urgent code writing and get some inspiration. From our beloved Artisan – with a command “inspire”.

It’s not officially documented, but if you run php artisan inspire, you will get a random motivational quote right in your terminal. Like this.


How does it work? Well, if you ever looked at /routes folder, there are three files there:

  • web.php – the one we generally use
  • api.php – for projects with API
  • console.php – this one is interesting for us now!

Let’s take a look at routes/console.php:

This is where we find that inspire command, and actually – the whole console.php file concept, which is not documented properly, is about routing your artisan commands like this, instead of going through app/Console/Kernel.php.

Is it really usable? Good question, since it’s not really documented – I guess, Taylor didn’t pay too much attention to it (maybe in the future?), so for now it’s just a cool little thing to know.

I hope it inspires you for the upcoming 2017!

Liked the article? Maybe you need help with your Laravel project?
Check out my Upwork profile and hire me!

Leave a Reply

Your email address will not be published. Required fields are marked *