jeudi 7 juin 2018

Laravel $schedule->call() ReflectionException: Class does not exist

I am try to test $schedule->call method (Kernel.php) using this command.

php artisan schedule:run

Then it's gives me this error:

  [ReflectionException]                                       
  Class App\Http\Controllers\DeactiveELV does not exist

source code:

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Illuminate\Support\Facades\Log;
class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        \Log::info('Just for testing...');
         $schedule->call('App\Http\Controllers\DeactiveELV@shutdown')->everyMinute();
    }
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire