2020-04-15 23:08:09 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
2020-09-28 15:39:57 +00:00
|
|
|
use App\Traits\Helper;
|
2020-04-15 23:08:09 +00:00
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
{
|
2020-09-28 15:39:57 +00:00
|
|
|
use Helper;
|
|
|
|
|
2020-04-15 23:08:09 +00:00
|
|
|
/**
|
|
|
|
* 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)
|
|
|
|
{
|
2020-09-28 15:39:57 +00:00
|
|
|
// Tache cron s'execute tous les jours a minuit
|
|
|
|
$schedule->call(function () {
|
|
|
|
$this->refundAllNanoCredit();
|
|
|
|
})->dailyAt('00:00')->runInBackground();
|
|
|
|
// })->everyMinute()->runInBackground();
|
2020-04-15 23:08:09 +00:00
|
|
|
}
|
|
|
|
}
|