3 namespace BookStack\Console;
5 use BookStack\Facades\Theme;
6 use BookStack\Theming\ThemeService;
7 use Illuminate\Console\Scheduling\Schedule;
8 use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
9 use Symfony\Component\Console\Command\Command;
11 class Kernel extends ConsoleKernel
14 * The Artisan commands provided by your application.
18 protected $commands = [
23 * Define the application's command schedule.
25 * @param \Illuminate\Console\Scheduling\Schedule $schedule
29 protected function schedule(Schedule $schedule)
35 * Register the commands for the application.
39 protected function commands()
41 // Default framework command loading from 'Commands' directory
42 $this->load(__DIR__ . '/Commands');
44 // Load any user commands that have been registered via the theme system.
45 $themeService = $this->app->make(ThemeService::class);
46 foreach ($themeService->getRegisteredCommands() as $command) {
47 $this->registerCommand($command);