mardi 28 février 2017

Laravel scheduled task route helper

I have a few views in Laravel for sending e-mails. In those views, I often use the route helper provided by Laravel. This function replaces the route name by the URL of the route.

This works great, until I want to send the same e-mails from a scheduled task via

php artisan schedule:run

Then it keeps saying the route cannot be found. But as I said, the same code works great when I run it in a browser.

The e-mail part isn't important in the issue, I only mention it as a reason for wanting to use the route helper in a scheduled task. The issue is with the route helper that doesn't work when used in a scheduled task.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire