77use Filament \Resources \Resource ;
88use Filament \Resources \Table ;
99use Filament \Tables ;
10+ use Illuminate \Database \Eloquent \Builder ;
11+ use Illuminate \Database \Eloquent \SoftDeletingScope ;
1012use Illuminate \Support \Facades \Request ;
1113use Illuminate \Support \Str ;
1214use SolutionForest \FilamentFirewall \Filament \Resources \FirewallIpResource \Pages ;
@@ -22,14 +24,13 @@ public static function form(Form $form): Form
2224 ->default (fn () => Request::getClientIp ())
2325 ->regex ('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/ ' )
2426 ->validationAttribute (Str::upper (__ ('filament-firewall::filament-firewall.form.field.ip ' )))
25- ->suffixAction (fn (callable $ set ) =>
26- Forms \Components \Actions \Action::make ('fillMyIp ' )
27- ->label (__ ('filament-firewall::filament-firewall.action.fillMyIp ' ))
28- ->icon ('heroicon-o-pencil-alt ' )
29- ->action (fn () => $ set ('ip ' , Request::getClientIp ()))
27+ ->suffixAction (fn (callable $ set ) => Forms \Components \Actions \Action::make ('fillMyIp ' )
28+ ->label (__ ('filament-firewall::filament-firewall.action.fillMyIp ' ))
29+ ->icon ('heroicon-o-pencil-alt ' )
30+ ->action (fn () => $ set ('ip ' , Request::getClientIp ()))
3031 )
3132 ->required (),
32-
33+
3334 Forms \Components \TextInput::make ('prefix_size ' )
3435 ->label (__ ('filament-firewall::filament-firewall.form.field.prefix_size ' ))
3536 ->numeric ()
@@ -133,4 +134,12 @@ protected static function getNavigationGroup(): ?string
133134 {
134135 return __ ('filament-firewall::filament-firewall.filament.resource.ip.getNavigationGroup ' );
135136 }
137+
138+ public static function getEloquentQuery (): Builder
139+ {
140+ return parent ::getEloquentQuery ()
141+ ->withoutGlobalScopes ([
142+ SoftDeletingScope::class,
143+ ]);
144+ }
136145}
0 commit comments