30 lines
601 B
PHP
30 lines
601 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use App\Jobs\DeductLeaveDays;
|
|
|
|
class DeductLeaveDaysCommand extends Command
|
|
{
|
|
protected $signature = 'leave:deduct {year?}';
|
|
protected $description = 'Trừ đi số ngày nghỉ thêm vào năm hiện tại';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
public function handle()
|
|
{
|
|
$year = $this->argument('year');
|
|
DeductLeaveDays::dispatch($year);
|
|
}
|
|
}
|