I have built a website in laravel and i am not hosting my website. I have a CPanel where i have a section for cron jobs But i cannot figure out how to write my cronjobs in laravel and execute them from this cpanel.
Any help is appreciated..
Thanks
Sameer - If you were looking to trigger certain methods via cron, you would need to set up the particular actions you want to take place and make it accessible to a URL.
It's very similar to having your application do something when a particular URL is hit. For example, when a user hits auth/login
your site should run through the proper routes and controller methods to display a login form.
So say you wanted to have a cronjob that would delete all users that don't complete the email activation of their account. The steps might look something like this:
http://example.com/actions/delete-unactivated-users
The concept with a cron from cPanel is that it will simply trigger a particular url at a given interval. It's really up to you and your Laravel app to take the steps once the URL is hit.
Does that help?