css 不換行 自動換行 強制換行的實現方法
753
2024-04-04
適用場景:分析數據(日志)
php artisan make:console 你的命令類名
示例:
php artisan make:console Check
在appConsoleCommands目錄下已生成一個Check.php文件
<?php namespace AppConsoleCommands; use IlluminateConsoleCommand; class Check extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'command:name'; /** * The console command description. * * @var string */ protected $description = 'Command description'; /** * Create a new command instance. * * @return void */ public function __construct() { parent::__construct(); } /** * Execute the console command. * * @return mixed */ public function handle() { // } }
你可以把$signature改為你要的命令名稱
protected $signature = 'check';
此時還不能在控制臺中調用,需要在Kernel.php中注冊。
protected $commands = [ 'AppConsoleCommandsCheck' ];
你已經可以在控制臺中使用這個命令了
php artisan check
點評:似乎也沒啥用,因為php本身也可以不用Laravel框架來使用CLI命令行。
#免責聲明#
本站[綠夏技術導航]提供的一切軟件、教程和內容信息僅限用于學習和研究目的;不得將上述內容用于商業或者非法用途,否則,一切后果請用戶自負。本站信息來自網絡收集整理,版權爭議與本站無關。您必須在下載后的24個小時之內,從您的電腦或手機中徹底刪除上述內容。如果您喜歡該程序或內容,請支持正版,購買注冊,得到更好的正版服務。我們非常重視版權問題,如有侵權請郵件[admin@lxwl520.com]與我們聯系進行刪除處理。敬請諒解!