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

No comments or questions yet...

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 58 courses (1056 lessons, total 44 h 09 min)
  • 78 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord

Recent Premium Tutorials