Laravel – How To Fix Wrong Domain in Queue Jobs

There is a tricky problem that happens when queued job tries to get the URL (via URL helper or from config) – it doesn’t seem to “notice” the .env / config app.url setting.

The reason is that somehow the queue worker misses the current environment name (might only happen if it is managed system wide via upstart or similar service).

The solution would be to include the –env flag when running queue worker like that: Continue reading