Skip to content

Commit

Permalink
wio
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryk committed Jun 27, 2021
1 parent 54b8cc7 commit 63fdc32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/LaravelRestifyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Illuminate\Contracts\Http\Kernel as HttpKernel;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;

class LaravelRestifyServiceProvider extends ServiceProvider
{
Expand Down Expand Up @@ -68,13 +69,13 @@ protected function registerPublishing(): void
__DIR__.'/../config/config.php' => config_path('restify.php'),
], 'restify-config');

$migrationFileName = 'create_action_logs_table.php';
$migrationFileName = 'create_action_logs_table.php.stub';
if (! $this->migrationFileExists($migrationFileName)) {
$this->publishes([
__DIR__."/../database/migrations/{$migrationFileName}" => database_path('migrations/'.date(
'Y_m_d_His',
time()
).'_'.$migrationFileName),
).'_'.Str::before($migrationFileName, '.stub')),
], 'restify-migrations');
}

Expand Down
2 changes: 1 addition & 1 deletion tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected function getEnvironmentSetUp($app): void
'prefix' => '',
]);

include_once __DIR__ . '/../database/migrations/create_action_logs_table.php';
include_once __DIR__ . '/../database/migrations/create_action_logs_table.php.stub';
(new \CreateActionLogsTable())->up();
}

Expand Down

0 comments on commit 63fdc32

Please sign in to comment.