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

pinsard's avatar

pinsard wrote a reply+100 XP

2mos ago

Target class [env] does not exist.

Years later, this tip is still invaluable, even on Laravel 12.

I inserted an if (app()->isProduction()) inside the config/logging.php file and... bang! Thing is, such an innocent code easily passes uncaught to the sore eyes of an old programmer that is only trying to survive just another day hahaha.

Thanks a lot!

pinsard's avatar

pinsard liked a comment+100 XP

2mos ago

Target class [env] does not exist.

Hey! For someone who will face a similar error you can do the following:

Go to vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel::handle method and put within the catch block

dump($e);die;

In my case there was a parsing error:

result = {ParseError} [7]
 message = "syntax error, unexpected '=>' (T_DOUBLE_ARROW)"
 *Error*string = ""
 code = {int} 0
 file = "/app/config/services.php"
 line = {int} 41
 *Error*trace = {array} [5]
 *Error*previous = null
pinsard's avatar

pinsard wrote a comment+100 XP

3mos ago

Everything New in Livewire 4: Ep 14, Islands

Fracking hell! As of right now I'm thinking about completely dumping Vaadin for rather super complex dashboards, just because of how powerful and easy islands are... damn...