diff --git a/src/Commands/ModuleMakeFilamentPageCommand.php b/src/Commands/ModuleMakeFilamentPageCommand.php index 8596335e..29fe018b 100644 --- a/src/Commands/ModuleMakeFilamentPageCommand.php +++ b/src/Commands/ModuleMakeFilamentPageCommand.php @@ -177,8 +177,8 @@ public function handle(): int if ($hasSoftDeletes) { $modifyQueryUsing .= '->modifyQueryUsing(fn (Builder $query) => $query->withoutGlobalScopes(['; - $modifyQueryUsing .= PHP_EOL.' SoftDeletingScope::class,'; - $modifyQueryUsing .= PHP_EOL.']))'; + $modifyQueryUsing .= PHP_EOL . ' SoftDeletingScope::class,'; + $modifyQueryUsing .= PHP_EOL . ']))'; $tableBulkActions[] = 'Tables\Actions\RestoreBulkAction::make(),'; $tableBulkActions[] = 'Tables\Actions\ForceDeleteBulkAction::make(),'; @@ -195,7 +195,8 @@ public function handle(): int $namespace = (count($pageNamespaces) > 1) ? select( label: 'Which namespace would you like to create this in?', - options: $pageNamespaces, required: true + options: $pageNamespaces, + required: true ) : (Arr::first($pageNamespaces) ?? $module->appNamespace('Filament\\Pages')); $path = (count($pageDirectories) > 1) ? @@ -219,24 +220,24 @@ public function handle(): int $view = str(str($page) ->prepend( (string) str(empty($resource) ? "{$namespace}\\" : "{$resourceNamespace}\\{$resource}\\pages\\") - ->replaceFirst($module->appNamespace().'\\', '') + ->replaceFirst($module->appNamespace() . '\\', '') ) ->replace('\\', '/') ->ltrim('/') ->explode('/') ->map(fn ($segment) => Str::lower(Str::kebab($segment))) - ->implode('.'))->prepend($module->getLowerName().'::'); + ->implode('.'))->prepend($module->getLowerName() . '::'); $path = (string) str($page) ->prepend('/') - ->prepend(empty($resource) ? $path : $resourcePath."\\{$resource}\\Pages\\") + ->prepend(empty($resource) ? $path : $resourcePath . "\\{$resource}\\Pages\\") ->replace('\\', '/') ->replace('//', '/') ->append('.php'); $viewPath = $module->resourcesPath( (string) str($view) - ->replace($module->getLowerName().'::', '') + ->replace($module->getLowerName() . '::', '') ->replace('.', '/') ->prepend('views/') ->append('.blade.php'), @@ -260,8 +261,8 @@ public function handle(): int class_exists($potentialCluster) && is_subclass_of($potentialCluster, Cluster::class) ) { - $clusterAssignment = $this->indentString(PHP_EOL.PHP_EOL.'protected static ?string $cluster = '.class_basename($potentialCluster).'::class;'); - $clusterImport = "use {$potentialCluster};".PHP_EOL; + $clusterAssignment = $this->indentString(PHP_EOL . PHP_EOL . 'protected static ?string $cluster = ' . class_basename($potentialCluster) . '::class;'); + $clusterImport = "use {$potentialCluster};" . PHP_EOL; } if (empty($resource)) { @@ -269,15 +270,15 @@ class_exists($potentialCluster) && 'class' => $pageClass, 'clusterAssignment' => $clusterAssignment, 'clusterImport' => $clusterImport, - 'namespace' => $namespace.($pageNamespace !== '' ? "\\{$pageNamespace}" : ''), + 'namespace' => $namespace . ($pageNamespace !== '' ? "\\{$pageNamespace}" : ''), 'view' => $view, ]); } elseif ($resourcePage === 'ManageRelatedRecords') { $this->copyStubToApp('ResourceManageRelatedRecordsPage', $path, [ 'baseResourcePage' => "Filament\\Resources\\Pages\\{$resourcePage}", 'baseResourcePageClass' => $resourcePage, - 'modifyQueryUsing' => filled($modifyQueryUsing ?? null) ? PHP_EOL.$this->indentString($modifyQueryUsing, 3) : $modifyQueryUsing ?? '', - 'namespace' => "{$resourceNamespace}\\{$resource}\\Pages".($pageNamespace !== '' ? "\\{$pageNamespace}" : ''), + 'modifyQueryUsing' => filled($modifyQueryUsing ?? null) ? PHP_EOL . $this->indentString($modifyQueryUsing, 3) : $modifyQueryUsing ?? '', + 'namespace' => "{$resourceNamespace}\\{$resource}\\Pages" . ($pageNamespace !== '' ? "\\{$pageNamespace}" : ''), 'recordTitleAttribute' => $recordTitleAttribute ?? null, 'relationship' => $relationship ?? null, 'resource' => "{$resourceNamespace}\\{$resource}", @@ -295,9 +296,9 @@ class_exists($potentialCluster) && ]); } else { $this->copyStubToApp($resourcePage === 'custom' ? 'CustomResourcePage' : 'ResourcePage', $path, [ - 'baseResourcePage' => 'Filament\\Resources\\Pages\\'.($resourcePage === 'custom' ? 'Page' : $resourcePage), + 'baseResourcePage' => 'Filament\\Resources\\Pages\\' . ($resourcePage === 'custom' ? 'Page' : $resourcePage), 'baseResourcePageClass' => $resourcePage === 'custom' ? 'Page' : $resourcePage, - 'namespace' => "{$resourceNamespace}\\{$resource}\\Pages".($pageNamespace !== '' ? "\\{$pageNamespace}" : ''), + 'namespace' => "{$resourceNamespace}\\{$resource}\\Pages" . ($pageNamespace !== '' ? "\\{$pageNamespace}" : ''), 'resource' => "{$resourceNamespace}\\{$resource}", 'resourceClass' => $resourceClass, 'resourcePageClass' => $pageClass, diff --git a/src/Commands/ModuleMakeFilamentResourceCommand.php b/src/Commands/ModuleMakeFilamentResourceCommand.php index b8e1e7ad..3658367a 100644 --- a/src/Commands/ModuleMakeFilamentResourceCommand.php +++ b/src/Commands/ModuleMakeFilamentResourceCommand.php @@ -132,16 +132,16 @@ public function handle(): int } $pages = ''; - $pages .= '\'index\' => Pages\\'.($this->option('simple') ? $manageResourcePageClass : $listResourcePageClass).'::route(\'/\'),'; + $pages .= '\'index\' => Pages\\' . ($this->option('simple') ? $manageResourcePageClass : $listResourcePageClass) . '::route(\'/\'),'; if (! $this->option('simple')) { - $pages .= PHP_EOL."'create' => Pages\\{$createResourcePageClass}::route('/create'),"; + $pages .= PHP_EOL . "'create' => Pages\\{$createResourcePageClass}::route('/create'),"; if ($this->option('view')) { - $pages .= PHP_EOL."'view' => Pages\\{$viewResourcePageClass}::route('/{record}'),"; + $pages .= PHP_EOL . "'view' => Pages\\{$viewResourcePageClass}::route('/{record}'),"; } - $pages .= PHP_EOL."'edit' => Pages\\{$editResourcePageClass}::route('/{record}/edit'),"; + $pages .= PHP_EOL . "'edit' => Pages\\{$editResourcePageClass}::route('/{record}/edit'),"; } $tableActions = []; @@ -162,12 +162,12 @@ public function handle(): int $tableActions[] = 'Tables\Actions\RestoreAction::make(),'; } } else { - $relations .= PHP_EOL.'public static function getRelations(): array'; - $relations .= PHP_EOL.'{'; - $relations .= PHP_EOL.' return ['; - $relations .= PHP_EOL.' //'; - $relations .= PHP_EOL.' ];'; - $relations .= PHP_EOL.'}'.PHP_EOL; + $relations .= PHP_EOL . 'public static function getRelations(): array'; + $relations .= PHP_EOL . '{'; + $relations .= PHP_EOL . ' return ['; + $relations .= PHP_EOL . ' //'; + $relations .= PHP_EOL . ' ];'; + $relations .= PHP_EOL . '}' . PHP_EOL; } $tableActions = implode(PHP_EOL, $tableActions); @@ -182,13 +182,13 @@ public function handle(): int $tableBulkActions[] = 'Tables\Actions\ForceDeleteBulkAction::make(),'; $tableBulkActions[] = 'Tables\Actions\RestoreBulkAction::make(),'; - $eloquentQuery .= PHP_EOL.PHP_EOL.'public static function getEloquentQuery(): Builder'; - $eloquentQuery .= PHP_EOL.'{'; - $eloquentQuery .= PHP_EOL.' return parent::getEloquentQuery()'; - $eloquentQuery .= PHP_EOL.' ->withoutGlobalScopes(['; - $eloquentQuery .= PHP_EOL.' SoftDeletingScope::class,'; - $eloquentQuery .= PHP_EOL.' ]);'; - $eloquentQuery .= PHP_EOL.'}'; + $eloquentQuery .= PHP_EOL . PHP_EOL . 'public static function getEloquentQuery(): Builder'; + $eloquentQuery .= PHP_EOL . '{'; + $eloquentQuery .= PHP_EOL . ' return parent::getEloquentQuery()'; + $eloquentQuery .= PHP_EOL . ' ->withoutGlobalScopes(['; + $eloquentQuery .= PHP_EOL . ' SoftDeletingScope::class,'; + $eloquentQuery .= PHP_EOL . ' ]);'; + $eloquentQuery .= PHP_EOL . '}'; } $tableBulkActions = implode(PHP_EOL, $tableBulkActions); @@ -201,8 +201,8 @@ public function handle(): int class_exists($potentialCluster) && is_subclass_of($potentialCluster, Cluster::class) ) { - $clusterAssignment = $this->indentString(PHP_EOL.PHP_EOL.'protected static ?string $cluster = '.class_basename($potentialCluster).'::class;'); - $clusterImport = "use {$potentialCluster};".PHP_EOL; + $clusterAssignment = $this->indentString(PHP_EOL . PHP_EOL . 'protected static ?string $cluster = ' . class_basename($potentialCluster) . '::class;'); + $clusterImport = "use {$potentialCluster};" . PHP_EOL; } $this->copyStubToApp('Resource', $resourcePath, [ @@ -210,7 +210,7 @@ class_exists($potentialCluster) && 'clusterImport' => $clusterImport, 'eloquentQuery' => $this->indentString($eloquentQuery, 1), 'formSchema' => $this->indentString($this->option('generate') ? $this->getResourceFormSchema( - $modelNamespace.($modelSubNamespace !== '' ? "\\{$modelSubNamespace}" : '').'\\'.$modelClass, + $modelNamespace . ($modelSubNamespace !== '' ? "\\{$modelSubNamespace}" : '') . '\\' . $modelClass, ) : '//', 4), 'model' => ($model === 'Resource') ? "{$modelNamespace}\\Resource as ResourceModel" : "{$modelNamespace}\\{$model}", 'modelClass' => ($model === 'Resource') ? 'ResourceModel' : $modelClass, @@ -222,7 +222,7 @@ class_exists($potentialCluster) && 'tableActions' => $this->indentString($tableActions, 4), 'tableBulkActions' => $this->indentString($tableBulkActions, 5), 'tableColumns' => $this->indentString($this->option('generate') ? $this->getResourceTableColumns( - $modelNamespace.($modelSubNamespace !== '' ? "\\{$modelSubNamespace}" : '').'\\'.$modelClass, + $modelNamespace . ($modelSubNamespace !== '' ? "\\{$modelSubNamespace}" : '') . '\\' . $modelClass, ) : '//', 4), 'tableFilters' => $this->indentString( $this->option('soft-deletes') ? 'Tables\Filters\TrashedFilter::make(),' : '//', @@ -232,7 +232,7 @@ class_exists($potentialCluster) && if ($this->option('simple')) { $this->copyStubToApp('ResourceManagePage', $manageResourcePagePath, [ - 'baseResourcePage' => 'Filament\\Resources\\Pages\\ManageRecords'.($needsAlias ? ' as BaseManageRecords' : ''), + 'baseResourcePage' => 'Filament\\Resources\\Pages\\ManageRecords' . ($needsAlias ? ' as BaseManageRecords' : ''), 'baseResourcePageClass' => $needsAlias ? 'BaseManageRecords' : 'ManageRecords', 'namespace' => "{$namespace}\\{$resourceClass}\\Pages", 'resource' => "{$namespace}\\{$resourceClass}", @@ -241,7 +241,7 @@ class_exists($potentialCluster) && ]); } else { $this->copyStubToApp('ResourceListPage', $listResourcePagePath, [ - 'baseResourcePage' => 'Filament\\Resources\\Pages\\ListRecords'.($needsAlias ? ' as BaseListRecords' : ''), + 'baseResourcePage' => 'Filament\\Resources\\Pages\\ListRecords' . ($needsAlias ? ' as BaseListRecords' : ''), 'baseResourcePageClass' => $needsAlias ? 'BaseListRecords' : 'ListRecords', 'namespace' => "{$namespace}\\{$resourceClass}\\Pages", 'resource' => "{$namespace}\\{$resourceClass}", @@ -250,7 +250,7 @@ class_exists($potentialCluster) && ]); $this->copyStubToApp('ResourcePage', $createResourcePagePath, [ - 'baseResourcePage' => 'Filament\\Resources\\Pages\\CreateRecord'.($needsAlias ? ' as BaseCreateRecord' : ''), + 'baseResourcePage' => 'Filament\\Resources\\Pages\\CreateRecord' . ($needsAlias ? ' as BaseCreateRecord' : ''), 'baseResourcePageClass' => $needsAlias ? 'BaseCreateRecord' : 'CreateRecord', 'namespace' => "{$namespace}\\{$resourceClass}\\Pages", 'resource' => "{$namespace}\\{$resourceClass}", @@ -262,7 +262,7 @@ class_exists($potentialCluster) && if ($this->option('view')) { $this->copyStubToApp('ResourceViewPage', $viewResourcePagePath, [ - 'baseResourcePage' => 'Filament\\Resources\\Pages\\ViewRecord'.($needsAlias ? ' as BaseViewRecord' : ''), + 'baseResourcePage' => 'Filament\\Resources\\Pages\\ViewRecord' . ($needsAlias ? ' as BaseViewRecord' : ''), 'baseResourcePageClass' => $needsAlias ? 'BaseViewRecord' : 'ViewRecord', 'namespace' => "{$namespace}\\{$resourceClass}\\Pages", 'resource' => "{$namespace}\\{$resourceClass}", @@ -283,7 +283,7 @@ class_exists($potentialCluster) && $editPageActions = implode(PHP_EOL, $editPageActions); $this->copyStubToApp('ResourceEditPage', $editResourcePagePath, [ - 'baseResourcePage' => 'Filament\\Resources\\Pages\\EditRecord'.($needsAlias ? ' as BaseEditRecord' : ''), + 'baseResourcePage' => 'Filament\\Resources\\Pages\\EditRecord' . ($needsAlias ? ' as BaseEditRecord' : ''), 'baseResourcePageClass' => $needsAlias ? 'BaseEditRecord' : 'EditRecord', 'actions' => $this->indentString($editPageActions, 3), 'namespace' => "{$namespace}\\{$resourceClass}\\Pages", diff --git a/src/Commands/ModulesFilamentInstallCommand.php b/src/Commands/ModulesFilamentInstallCommand.php index d9ee910e..3906a4fd 100644 --- a/src/Commands/ModulesFilamentInstallCommand.php +++ b/src/Commands/ModulesFilamentInstallCommand.php @@ -83,7 +83,7 @@ protected function getModule(): \Nwidart\Modules\Module { try { return Module::findOrFail($this->moduleName); - } catch (ModuleNotFoundException|\Throwable $exception) { + } catch (ModuleNotFoundException | \Throwable $exception) { if (confirm("Module $this->moduleName does not exist. Would you like to generate it?", true)) { $this->call('module:make', ['name' => [$this->moduleName]]); @@ -131,7 +131,7 @@ protected function createDefaultFilamentPlugin(): void { $module = $this->getModule(); $this->call('module:make:filament-plugin', [ - 'name' => $module->getStudlyName().'Plugin', + 'name' => $module->getStudlyName() . 'Plugin', 'module' => $module->getStudlyName(), ]); } diff --git a/src/Concerns/CanManipulateFiles.php b/src/Concerns/CanManipulateFiles.php index 5ccc56a2..5dfda8f0 100644 --- a/src/Concerns/CanManipulateFiles.php +++ b/src/Concerns/CanManipulateFiles.php @@ -20,7 +20,7 @@ protected function checkForCollision(array $paths): bool continue; } - if (! confirm(basename($path).' already exists, do you want to overwrite it?')) { + if (! confirm(basename($path) . ' already exists, do you want to overwrite it?')) { $this->components->error("{$path} already exists, aborting."); return true; @@ -39,7 +39,7 @@ protected function copyStubToApp(string $stub, string $targetPath, array $replac { $filesystem = app(Filesystem::class); - $stubPath = $this->getDefaultStubPath()."/{$stub}.stub"; + $stubPath = $this->getDefaultStubPath() . "/{$stub}.stub"; $stub = str($filesystem->get($stubPath)); diff --git a/src/Concerns/GeneratesModularFiles.php b/src/Concerns/GeneratesModularFiles.php index 30e15e27..529ec945 100644 --- a/src/Concerns/GeneratesModularFiles.php +++ b/src/Concerns/GeneratesModularFiles.php @@ -19,7 +19,7 @@ protected function getArguments(): array protected function resolveStubPath($stub): string { - return FilamentModules::packagePath('src/Commands/'.trim($stub, DIRECTORY_SEPARATOR)); + return FilamentModules::packagePath('src/Commands/' . trim($stub, DIRECTORY_SEPARATOR)); } public function getModule(): Module @@ -29,7 +29,7 @@ public function getModule(): Module protected function getDefaultNamespace($rootNamespace): string { - return trim($rootNamespace, '\\').'\\'.trim(Str::replace(DIRECTORY_SEPARATOR, '\\', $this->getRelativeNamespace()), '\\'); + return trim($rootNamespace, '\\') . '\\' . trim(Str::replace(DIRECTORY_SEPARATOR, '\\', $this->getRelativeNamespace()), '\\'); } abstract protected function getRelativeNamespace(): string; @@ -43,7 +43,7 @@ protected function getPath($name): string { $name = Str::replaceFirst($this->rootNamespace(), '', $name); - return $this->getModule()->getExtraPath(str_replace('\\', '/', $name).'.php'); + return $this->getModule()->getExtraPath(str_replace('\\', '/', $name) . '.php'); } protected function possibleModels() @@ -61,7 +61,7 @@ protected function viewPath($path = ''): string { $views = $this->getModule()->resourcesPath('views'); - return $views.($path ? DIRECTORY_SEPARATOR.$path : $path); + return $views . ($path ? DIRECTORY_SEPARATOR . $path : $path); } protected function buildClass($name) @@ -89,7 +89,7 @@ protected function promptForMissingArgumentsUsing(): array { return [ 'name' => [ - 'What should the '.strtolower($this->type ?: 'class').' be named?', + 'What should the ' . strtolower($this->type ?: 'class') . ' be named?', match ($this->type) { 'Cast' => 'E.g. Json', 'Channel' => 'E.g. OrderChannel', diff --git a/src/Concerns/ModuleFilamentPlugin.php b/src/Concerns/ModuleFilamentPlugin.php index 2e22889a..792a8053 100644 --- a/src/Concerns/ModuleFilamentPlugin.php +++ b/src/Concerns/ModuleFilamentPlugin.php @@ -19,15 +19,15 @@ public function register(Panel $panel): void $module = $this->getModule(); $useClusters = config('filament-modules.clusters.enabled', false); $panel->discoverPages( - in: $module->appPath('Filament'.DIRECTORY_SEPARATOR.'Pages'), + in: $module->appPath('Filament' . DIRECTORY_SEPARATOR . 'Pages'), for: $module->appNamespace('\\Filament\\Pages') ); $panel->discoverResources( - in: $module->appPath('Filament'.DIRECTORY_SEPARATOR.'Resources'), + in: $module->appPath('Filament' . DIRECTORY_SEPARATOR . 'Resources'), for: $module->appNamespace('\\Filament\\Resources') ); $panel->discoverWidgets( - in: $module->appPath('Filament'.DIRECTORY_SEPARATOR.'Widgets'), + in: $module->appPath('Filament' . DIRECTORY_SEPARATOR . 'Widgets'), for: $module->appNamespace('\\Filament\\Widgets') ); @@ -37,7 +37,7 @@ public function register(Panel $panel): void ); if ($useClusters) { - $path = $module->appPath('Filament'.DIRECTORY_SEPARATOR.'Clusters'); + $path = $module->appPath('Filament' . DIRECTORY_SEPARATOR . 'Clusters'); $namespace = $module->appNamespace('\\Filament\\Clusters'); $panel->discoverClusters( in: $path, diff --git a/src/Modules.php b/src/Modules.php index 22fb65d6..bc43c7df 100644 --- a/src/Modules.php +++ b/src/Modules.php @@ -45,6 +45,6 @@ public function execCommand(string $command, ?Command $artisan = null): void public function packagePath(string $path = ''): string { //return the base path of this package - return dirname(__DIR__.'../').($path ? DIRECTORY_SEPARATOR.trim($path, DIRECTORY_SEPARATOR) : ''); + return dirname(__DIR__ . '../') . ($path ? DIRECTORY_SEPARATOR . trim($path, DIRECTORY_SEPARATOR) : ''); } } diff --git a/src/ModulesPlugin.php b/src/ModulesPlugin.php index 67ae6a6e..7de25762 100644 --- a/src/ModulesPlugin.php +++ b/src/ModulesPlugin.php @@ -46,7 +46,7 @@ protected function getModulePlugins(): array } // get a glob of all Filament plugins $basePath = str(config('modules.paths.modules', 'Modules')); - $pattern = $basePath.'/*/App/Filament/*Plugin.php'; + $pattern = $basePath . '/*/App/Filament/*Plugin.php'; $pluginPaths = glob($pattern); return collect($pluginPaths)->map(fn ($path) => FilamentModules::convertPathToNamespace($path))->toArray(); diff --git a/src/ModulesServiceProvider.php b/src/ModulesServiceProvider.php index be1e65de..a10ca5b5 100644 --- a/src/ModulesServiceProvider.php +++ b/src/ModulesServiceProvider.php @@ -78,7 +78,7 @@ public function packageBooted(): void // Handle Stubs if (app()->runningInConsole()) { - foreach (app(Filesystem::class)->files(__DIR__.'/../stubs/') as $file) { + foreach (app(Filesystem::class)->files(__DIR__ . '/../stubs/') as $file) { $this->publishes([ $file->getRealPath() => base_path("stubs/modules/{$file->getFilename()}"), ], 'modules-stubs'); @@ -169,44 +169,44 @@ protected function registerModuleMacros(): void $relativeNamespace = str_replace('App\\', '', $relativeNamespace); $relativeNamespace = str_replace('App', '', $relativeNamespace); $relativeNamespace = trim($relativeNamespace, '\\'); - $relativeNamespace = 'App\\'.$relativeNamespace; + $relativeNamespace = 'App\\' . $relativeNamespace; return $this->namespace($relativeNamespace); }); Module::macro('appPath', function (string $relativePath = '') { $appPath = $this->getExtraPath('App'); - return $appPath.($relativePath ? DIRECTORY_SEPARATOR.$relativePath : ''); + return $appPath . ($relativePath ? DIRECTORY_SEPARATOR . $relativePath : ''); }); Module::macro('databasePath', function (string $relativePath = '') { $appPath = $this->getExtraPath('Database'); - return $appPath.($relativePath ? DIRECTORY_SEPARATOR.$relativePath : ''); + return $appPath . ($relativePath ? DIRECTORY_SEPARATOR . $relativePath : ''); }); Module::macro('resourcesPath', function (string $relativePath = '') { $appPath = $this->getExtraPath('resources'); - return $appPath.($relativePath ? DIRECTORY_SEPARATOR.$relativePath : ''); + return $appPath . ($relativePath ? DIRECTORY_SEPARATOR . $relativePath : ''); }); Module::macro('migrationsPath', function (string $relativePath = '') { $appPath = $this->databasePath('migrations'); - return $appPath.($relativePath ? DIRECTORY_SEPARATOR.$relativePath : ''); + return $appPath . ($relativePath ? DIRECTORY_SEPARATOR . $relativePath : ''); }); Module::macro('seedersPath', function (string $relativePath = '') { $appPath = $this->databasePath('Seeders'); - return $appPath.($relativePath ? DIRECTORY_SEPARATOR.$relativePath : ''); + return $appPath . ($relativePath ? DIRECTORY_SEPARATOR . $relativePath : ''); }); Module::macro('factoriesPath', function (string $relativePath = '') { $appPath = $this->databasePath('Factories'); - return $appPath.($relativePath ? DIRECTORY_SEPARATOR.$relativePath : ''); + return $appPath . ($relativePath ? DIRECTORY_SEPARATOR . $relativePath : ''); }); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 80436566..c6b35099 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,6 +4,7 @@ use BladeUI\Heroicons\BladeHeroiconsServiceProvider; use BladeUI\Icons\BladeIconsServiceProvider; +use Coolsam\Modules\ModulesServiceProvider; use Filament\Actions\ActionsServiceProvider; use Filament\FilamentServiceProvider; use Filament\Forms\FormsServiceProvider; @@ -16,7 +17,6 @@ use Livewire\LivewireServiceProvider; use Orchestra\Testbench\TestCase as Orchestra; use RyanChandler\BladeCaptureDirective\BladeCaptureDirectiveServiceProvider; -use Coolsam\Modules\ModulesServiceProvider; class TestCase extends Orchestra {