Guessing - config/app.php has 'url' => 'http://localhost' ? As the comment in the file states you need to set that in order to have proper links when running from command line.
Url helper function in email templates
I was using url() function in my email templates, and everything was working fine untill I switched to 'queue' instead of 'send'. Seems like url() function is returning 'http://localhost' when delayed (using crone jobs). I ended up passing my url-s as data from controllers, avoiding to call url() in my blade templates. So, is this expected behavior and, more important, is this the right way to insert links in queued email templates?
BTW, I'm totally new to PHP and Laravel, I am sorry if my question is stupid :)
@Zile
Ok, clearing up ;-) You should not pass physical location on your server like /var/www/html/example.com. Instead just update the config which reflects your production url. If you are afraid of mixing domains, don't worry. Laravel 5 solves that problem by reading variables from your .env file in root directory and converting those to environmental variables. That means you can put 'url' => env('APP_URL') in your config/app.php instead of http://localhost I suggested earlier and in your development machine then edit .env file by adding line APP_URL=http://localhost (or any name for that matter you use in development cycle) and when you release your app on remote server do the same changing APP_URL appropriately.
I believe that should do the trick. Emails should have full qualified URL on development and production sites - http://localhost/some/route and http://website.com/some/route respectively.
Further reading: http://laravel.com/docs/5.0/configuration#environment-configuration
And don't give up ;-)
Please or to participate in this conversation.