Skip to content

Commit

Permalink
[7.x] Only create the blueprints when not running on console (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 authored Aug 9, 2024
1 parent 106c13b commit 6e75c94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ protected function registerBlueprints(): self
try {
Blueprint::addNamespace('runway', base_path('resources/blueprints/runway'));

Runway::allResources()->each(fn (Resource $resource) => $resource->blueprint());
if (! app()->runningInConsole()) {
Runway::allResources()->each(fn (Resource $resource) => $resource->blueprint());
}
} catch (QueryException $e) {
// A QueryException will be thrown when using the Eloquent Driver, where the `blueprints` table is
// yet to be migrated (for example: during a fresh install). We'll catch the exception here and
Expand Down

0 comments on commit 6e75c94

Please sign in to comment.