diff --git a/config/zeus-wind.php b/config/zeus-wind.php index 6ad9c78..4bdbb4d 100644 --- a/config/zeus-wind.php +++ b/config/zeus-wind.php @@ -68,4 +68,9 @@ * set the default status that all messages will have when received. */ 'default_status' => 'NEW', + + /** + * Navigation Group Label + */ + 'navigation_group_label' => 'wind', ]; diff --git a/database/factories/DepartmentFactory.php b/database/factories/DepartmentFactory.php index 38bf87d..7e1abb5 100644 --- a/database/factories/DepartmentFactory.php +++ b/database/factories/DepartmentFactory.php @@ -8,8 +8,6 @@ class DepartmentFactory extends Factory { /** * The name of the factory's corresponding model. - * - * @var string */ public function getModel(): string { @@ -18,10 +16,8 @@ public function getModel(): string /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->words(3, true), diff --git a/database/factories/LetterFactory.php b/database/factories/LetterFactory.php index 6e74475..91b91a1 100644 --- a/database/factories/LetterFactory.php +++ b/database/factories/LetterFactory.php @@ -6,6 +6,9 @@ class LetterFactory extends Factory { + /** + * The name of the factory's corresponding model. + */ public function getModel(): string { return config('zeus-wind.models.letter'); @@ -13,12 +16,8 @@ public function getModel(): string /** * Define the model's default state. - * - * @return array - * - * @throws \JsonException */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/docs/configuration.md b/docs/configuration.md index 88138bf..aa83d5b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -61,5 +61,10 @@ return [ * set the default status that all messages will have when received */ 'default_status' => 'NEW', + + /** + * Navigation Group Label + */ + 'navigation_group_label' => 'wind', ]; ``` diff --git a/src/Console/PublishCommand.php b/src/Console/PublishCommand.php index d6a5375..f35c691 100644 --- a/src/Console/PublishCommand.php +++ b/src/Console/PublishCommand.php @@ -28,18 +28,18 @@ class PublishCommand extends Command public function handle() { // publish Wind files - $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-config', '--force' => $this->option('force') ?? false]); - $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-migrations', '--force' => $this->option('force') ?? false]); - $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-views', '--force' => $this->option('force') ?? false]); - $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-translations', '--force' => $this->option('force') ?? false]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-config', '--force' => (bool) $this->option('force')]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-migrations', '--force' => (bool) $this->option('force')]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-views', '--force' => (bool) $this->option('force')]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-translations', '--force' => (bool) $this->option('force')]); - $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-seeder', '--force' => $this->option('force') ?? false]); - $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-factories', '--force' => $this->option('force') ?? false]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-seeder', '--force' => (bool) $this->option('force')]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-wind-factories', '--force' => (bool) $this->option('force')]); // publish Zeus files - $this->callSilent('vendor:publish', ['--tag' => 'zeus-config', '--force' => $this->option('force') ?? false]); - $this->callSilent('vendor:publish', ['--tag' => 'zeus-views', '--force' => $this->option('force') ?? false]); - $this->callSilent('vendor:publish', ['--tag' => 'zeus-assets', '--force' => $this->option('force') ?? false]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-config', '--force' => (bool) $this->option('force')]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-views', '--force' => (bool) $this->option('force')]); + $this->callSilent('vendor:publish', ['--tag' => 'zeus-assets', '--force' => (bool) $this->option('force')]); $this->output->success('Zeus and Wind has been Published successfully'); } diff --git a/src/Filament/Resources/DepartmentResource.php b/src/Filament/Resources/DepartmentResource.php index 2461487..ede01a5 100644 --- a/src/Filament/Resources/DepartmentResource.php +++ b/src/Filament/Resources/DepartmentResource.php @@ -112,6 +112,6 @@ protected static function getNavigationLabel(): string protected static function getNavigationGroup(): ?string { - return __('Wind'); + return __(config('zeus-wind.navigation_group_label', __('Wind'))); } } diff --git a/src/Filament/Resources/LetterResource.php b/src/Filament/Resources/LetterResource.php index 5589339..bc5f0f1 100644 --- a/src/Filament/Resources/LetterResource.php +++ b/src/Filament/Resources/LetterResource.php @@ -114,6 +114,6 @@ protected static function getNavigationLabel(): string protected static function getNavigationGroup(): ?string { - return __('Wind'); + return __(config('zeus-wind.navigation_group_label', __('Wind'))); } }