Kernel.php 779 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\baiduCommand;
  4. use Illuminate\Console\Scheduling\Schedule;
  5. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  6. class Kernel extends ConsoleKernel
  7. {
  8. protected $commands=[
  9. baiduCommand::class
  10. ];
  11. /**
  12. * Define the application's command schedule.
  13. *
  14. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  15. * @return void
  16. */
  17. protected function schedule(Schedule $schedule)
  18. {
  19. // $schedule->command('inspire')->hourly();
  20. }
  21. /**
  22. * Register the commands for the application.
  23. *
  24. * @return void
  25. */
  26. protected function commands()
  27. {
  28. $this->load(__DIR__.'/Commands');
  29. require base_path('routes/console.php');
  30. }
  31. }