akaunting/app/Console/Kernel.php

50 lines
1.2 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
Commands\CompanySeed::class,
Commands\BillReminder::class,
2018-02-20 17:05:58 +03:00
Commands\Install::class,
2017-09-14 22:21:00 +03:00
Commands\InvoiceReminder::class,
2017-11-01 19:43:42 +03:00
Commands\ModuleInstall::class,
2017-09-14 22:21:00 +03:00
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// Not installed yet
2017-09-23 18:43:09 +03:00
if (!env('APP_INSTALLED')) {
2017-09-14 22:21:00 +03:00
return;
}
$schedule->command('reminder:invoice')->dailyAt(setting('general.schedule_time', '09:00'));
$schedule->command('reminder:bill')->dailyAt(setting('general.schedule_time', '09:00'));
}
/**
* Register the Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
}