Skip to content

Commit eea6db9

Browse files
committed
Load Scheduled and Migrations only in CLI mode.
This speeds up the page loads a little for non-cli requests
1 parent 27d9202 commit eea6db9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Module.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ public function register(): void
6060
*/
6161
public function boot(): void
6262
{
63-
$this->loadCommandSchedule();
64-
$this->loadMigrations();
63+
if ($this->app->runningInConsole()) {
64+
$this->loadCommandSchedule();
65+
$this->loadMigrations();
66+
}
67+
6568
$this->loadViews();
6669
$this->loadTranslations();
6770
$this->loadConfigs();

0 commit comments

Comments
 (0)