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.

screen-shot-2016-12-29-at-12-11-04-pm

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!

Want more tips and articles like this?
20-50 useful links every week on our weekly newsletter - comes out every Thursday!



Leave a Reply

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