View logs with Artisan Tail command in Laravel 5+

If you moved from Laravel 4 to version 5 or 5.x – you will miss an Artisan command artisan tail for your log viewing. How to get it back? Luckily, there’s a package for that.

If you run artisan tail on those newer versions, you will get something like this:

0721_laravel_artisan_tail

To fix that – use a package spatie/laravel-tail created by Freek Van der Herten, better known as Spatie.

Simply add that to composer.json and run composer update:

"spatie/laravel-tail": "1.1.*"

(latest version at the moment is 1.1.1)

0721_laravel_artisan_tail02

Then – add this line to config/app.php file – to providers array:

// ...
Spatie\Tail\TailServiceProvider::class,
// ...

And that’s it – artisan tail will work again like a charm!

By the way, I recommend Freek’s personal blog – a lot of useful tips on Laravel and PHP in general: Murze.be

Like our articles?
Check out our Laravel online courses!

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here