Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lat4732's avatar
Level 12

Display laravel.log in a page

Hey!

I'm trying to display storage/logs/laravel.log contents in an Administrator Panel Page (specifically textarea) and its looking great but the problem is its a little unreadable. Look what I'm talking about

visualization

How can I make this a little more readable? I tried with trim() but nothing happens (The spaces aren't removing). Here's how I get laravel.log contents:

File::get(storage_path().'/logs/laravel.log')

is that the right way? Help is appreciated.

0 likes
1 reply

Please or to participate in this conversation.