PHP code example of qklin / laravel-kernel-plus
1. Go to this page and download the library: Download qklin/laravel-kernel-plus library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
qklin / laravel-kernel-plus example snippets
namespace App\Console;
use Illuminate\Console\Application as Artisan;
use Illuminate\Console\Command;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Qklin\Kernel\Plus\Services\KernelPlusService;
use Symfony\Component\Finder\Finder;
class Kernel extends ConsoleKernel
{
/**
* 配置注册command
* @var array
*/
protected $commands = [
];
/**
* 调度
* @param Schedule $schedule
*/
protected function schedule(Schedule $schedule)
{
// 加载调度
app("qklin.kernel.plus.service")->schedule($schedule);
}
/**
* Artisan 直接注册command
*/
protected function commands()
{
// 自动注册command 或 加载全部
app("qklin.kernel.plus.service")->registerCommands($this);