File tree 1 file changed +16
-0
lines changed
src/Filament/Resources/DepartmentResource/Pages
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 3
3
namespace LaraZeus \Wind \Filament \Resources \DepartmentResource \Pages ;
4
4
5
5
use Filament \Resources \Pages \EditRecord ;
6
+ use Filament \Pages \Actions \Action ;
6
7
use LaraZeus \Wind \Filament \Resources \DepartmentResource ;
7
8
8
9
class EditDepartment extends EditRecord
@@ -15,4 +16,19 @@ public function mount($record): void /* @phpstan-ignore-line */
15
16
16
17
parent ::mount ($ record );
17
18
}
19
+
20
+ protected function getActions (): array
21
+ {
22
+ return array_merge (
23
+ parent ::getActions (),
24
+ [
25
+ Action::make ('Open ' )
26
+ ->color ('warning ' )
27
+ ->icon ('heroicon-o-external-link ' )
28
+ ->label (__ ('Open ' ))
29
+ ->url (fn (): string => route ('contact ' , ['departmentSlug ' => $ this ->record ]))
30
+ ->openUrlInNewTab (),
31
+ ],
32
+ );
33
+ }
18
34
}
You can’t perform that action at this time.
0 commit comments