I am new in laravel, recently started working on a project that had already been started by another person, the version of laravel is 5.1 and we are using cPanel, the question is I want to implement a cron job and I do not know what Route to give for the Laravel Scheduler to work,The structure of the project consists of two directories.
-public_html
-loupper.com
-loupper
-loupper-jef
the first one called “loupper” is where laravel is installed, and is used only as the enroutador, there is a second folder called “loupper-jef”, in which is the entire front end, The project works as follows, we send ajax requests with jquery to the directory “loupper”, where this laravel, and this returns the information, how can I check if artisan is working and thus to know the cron job will work? As it is done on the server, any recommendations would be very helpful, thanks
2
Answers
artisan
is just a PHP script which lives in Laravel project directory. To make sure if it works, go to Laravel directory and enterphp artisan
command:You should see a list of available Artisan commands.
Double-check that you have already run
composer install
on your server’s project directory.In my case, I had forgotten to install all the composer dependencies so
php artisan
wasn’t doing anything for me.