Skip to content

Commit

Permalink
Merge pull request #39 from IBEC-BOX/feat/configure-provider
Browse files Browse the repository at this point in the history
feat: configure panel provider, navigation groups/items
  • Loading branch information
ast21 authored Sep 17, 2024
2 parents 16f1f59 + 3c10486 commit fbc1eec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions config/admin-kit.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
* Настройки админ панели Filament v3
*/
'panel' => [
'provider' => AdminKit\Core\Providers\FilamentPanelProvider::class,

'brand_name' => env('APP_NAME'),

'auth_guard' => env('FILAMENT_AUTH_GUARD', 'admin-kit-web'),
Expand All @@ -49,6 +51,14 @@
'primary' => Filament\Support\Colors\Color::Amber,
],

'navigation_groups' => [
//
],

'navigation_items' => [
//
],

'resources' => [
UserResource::class,
RoleResource::class,
Expand Down
4 changes: 2 additions & 2 deletions src/CoreServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use AdminKit\Core\Commands\ClonePackageCommand;
use AdminKit\Core\Commands\InstallCommand;
use AdminKit\Core\Commands\InstallPackagesCommand;
use AdminKit\Core\Providers\FilamentServiceProvider;
use AdminKit\Core\Providers\FilamentPanelProvider;
use AdminKit\Core\Providers\MiddlewareServiceProvider;
use Filament\Forms\Components\DateTimePicker;
use Filament\Tables\Columns\TextColumn;
Expand Down Expand Up @@ -39,7 +39,7 @@ public function registeringPackage()

$this->registerConfigs();

$this->app->register(FilamentServiceProvider::class);
$this->app->register(config('admin-kit.panel.provider'));
$this->app->register(MiddlewareServiceProvider::class);

$this->configureTimezoneForFilament();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

//use Livewire\LivewireServiceProvider;

class FilamentServiceProvider extends PanelProvider
class FilamentPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
Expand All @@ -21,6 +21,8 @@ public function panel(Panel $panel): Panel
->path(config('admin-kit.panel.path'))
->login()
->colors(config('admin-kit.panel.colors'))
->navigationGroups(config('admin-kit.panel.navigation_groups'))
->navigationItems(config('admin-kit.panel.navigation_items'))
->resources(config('admin-kit.panel.resources'))
->pages(config('admin-kit.panel.pages'))
->widgets(config('admin-kit.panel.widgets'))
Expand Down

0 comments on commit fbc1eec

Please sign in to comment.