Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Dec 14, 2024
1 parent cb11186 commit ef705fe
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,22 @@ protected function copyTestbenchConfigurationFile(Filesystem $filesystem, string
force: (bool) $this->option('force'),
))->handle($from, $to);

$serviceProvider = \sprintf('%sProviders\WorkbenchServiceProvider', Workbench::detectNamespace('app', force: true) ?? 'Workbench\App\\');
$databaseSeeder = \sprintf('%sDatabaseSeeder', Workbench::detectNamespace('database/seeders', force: true) ?? 'Workbench\Database\Seeders\\');

$this->replaceInFile(
$filesystem,
[
'{{ WorkbenchServiceProvider }}',
'Workbench\App\Providers\WorkbenchServiceProvider',
'{{ WorkbenchDatabaseSeeder }}',
'Workbench\Database\Seeders\DatabaseSeeder',
],
[
\sprintf('%sProviders\WorkbenchServiceProvider', Workbench::detectNamespace('app', force: true) ?? 'Workbench\App\\'),
\sprintf('%sDatabaseSeeder', Workbench::detectNamespace('database/seeders', force: true) ?? 'Workbench\Database\Seeders\\'),
$serviceProvider,
$serviceProvider,
$databaseSeeder,
$databaseSeeder,
],
$to
);
Expand Down

0 comments on commit ef705fe

Please sign in to comment.