1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?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\Lion::class,
- ];
-
- /**
- * Define the application's command schedule.
- *
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- *
- * @return void
- */
- protected function schedule(Schedule $schedule)
- {
- // 腳本必須有序執行
- // 針對沒有玩過的人,第一次設定鬧鐘後 24 小時後
- // IF > 腳本7先執行 > 由於該任務鬧鐘還沒響 > 所以不會被腳本挑出來處理 > 腳本8接著才執行 > 因此用戶可以自己去關鬧鐘 > DONE
- // IF > 腳本8先執行 > 腳本8將提示鬧鈴且修改狀態為未關閉 > 腳本7落入 corner 將鬧鐘關閉並註記為關閉次數為1 > 出問題
- $schedule->call(function () {
- });
- }
-
- /**
- * Register the Closure based commands for the application.
- *
- * @return void
- */
- protected function commands()
- {
- require base_path('routes/console.php');
- }
- }
|