Laravel Horizon not loading in production, showing 'Parse error' in WaitTimeCalculator.php

Posted 1 year ago by domioanna

I've installed Laravel Horizon on my application and deployed to production. I've followed all of the instructions and the server is running on PHP version 7.1.8 (using Forge & Envoyer).

When I load Horizon, it shows infinite spinners. Check Dev Tools, it shows an error calling api/stats and api/workload.

When I look at the error I see

FatalThrowableError
Parse error: syntax error, unexpected '='
in WaitTimeCalculator.php (line 75)

This is on line 75 of WaitTimeCalculator.php

[$connection, $queueName] = explode(':', $queue, 2);

Any ideas?

Please sign in or create an account to participate in this conversation.