Support the ongoing development of Laravel.io →
Queues Jobs

I have a controller where URL::to('/') returns the base url of my website. However, when I use URL::to('/') in a job, it returns only a colon as a string (":").

class MyJob extends Job {
    public function handle() {
        Log::info(URL::to('/'));
    }
}

This returns "http://:"

class MyController extends Controller { {
    public function myMethod() {
        Log::info(URL::to('/'));
    }
}

This returns "http://my_domain.com"

I can't make sense of this. I am using beanstalkd for queues.

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.