Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Oct 4, 2023
1 parent 508d045 commit e964255
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Concerns/Orbital.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ public static function bootOrbital()
}

$initialiseOrbitTable = new InitialiseOrbitalTable();
$maybeRefreshDatabaseContent = new MaybeRefreshDatabaseContent();
$refreshed = false;

if ($initialiseOrbitTable->shouldInitialise($model)) {
$initialiseOrbitTable->migrate($model);
}
$maybeRefreshDatabaseContent->refresh($model, $driver);

$maybeRefreshDatabaseContent = new MaybeRefreshDatabaseContent();
$refreshed = true;
}

if ($maybeRefreshDatabaseContent->shouldRefresh($model)) {
if (! $refreshed && $maybeRefreshDatabaseContent->shouldRefresh($model)) {
$maybeRefreshDatabaseContent->refresh($model, $driver);
}

Expand Down

0 comments on commit e964255

Please sign in to comment.