Skip to content

Commit

Permalink
Merge pull request #24 from eelco2k/feature-resources-via-config
Browse files Browse the repository at this point in the history
Allow the resource(s) to be overridden via config
  • Loading branch information
husam-tariq authored Feb 4, 2024
2 parents 38f0d75 + 96497bc commit afe2fe3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion config/filament-database-schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// config for HusamTariq/FilamentDatabaseSchedule

use HusamTariq\FilamentDatabaseSchedule\Models\Schedule;
use HusamTariq\FilamentDatabaseSchedule\Filament\Resources\ScheduleResource;
use Illuminate\Support\Str;

return [
Expand All @@ -17,7 +18,10 @@

'timezone' => env('FILAMENT_SCHEDULE_TIMEZONE', config('app.timezone')),


'resources' =>
[
ScheduleResource::class,
],

/**
* Cache settings
Expand Down
5 changes: 1 addition & 4 deletions src/FilamentDatabaseSchedulePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Filament\Contracts\Plugin;
use Filament\Panel;
use HusamTariq\FilamentDatabaseSchedule\Filament\Resources\ScheduleResource;

class FilamentDatabaseSchedulePlugin implements Plugin
{
Expand All @@ -25,9 +24,7 @@ public function getId(): string
public function register(Panel $panel): void
{
$panel
->resources([
ScheduleResource::class,
])
->resources(config('filament-database-schedule.resources'))
;
}

Expand Down

0 comments on commit afe2fe3

Please sign in to comment.