@@ -73,7 +73,7 @@ public static function form(Form $form): Form
7373 ->label (__ ('core::core.title ' ))
7474 ->required ()
7575 ->afterStateUpdated (
76- fn (Set $ set , ?string $ state ) => $ set ('slug ' , Str::slug ($ state ))
76+ fn (Set $ set , ?string $ state ) => $ set ('slug ' , Str::slug ($ state ))
7777 ),
7878 TextInput::make ('slug ' )
7979 ->label (__ ('core::core.slug ' ))
@@ -87,7 +87,7 @@ public static function form(Form $form): Form
8787 table: 'tag_translations ' ,
8888 column: 'slug ' ,
8989 ignoreRecord: true ,
90- ignorable: fn ($ record ) => $ record ?->translations()
90+ ignorable: fn ($ record ) => $ record ?->translations()
9191 ->where ('locale ' , request ()->query ('lang ' , app ()->getLocale ()))
9292 ->first ()
9393 ),
@@ -107,8 +107,8 @@ public static function form(Form $form): Form
107107 ->color ('success ' )
108108 ->button ()
109109 ->extraAttributes (['class ' => 'w-full ' ])
110- ->action (fn ($ record ) => $ record ->restore ())
111- ->visible (fn ($ livewire , $ record ): bool => $ record && $ record ->trashed () && $ livewire instanceof ViewTag),
110+ ->action (fn ($ record ) => $ record ->restore ())
111+ ->visible (fn ($ livewire , $ record ): bool => $ record && $ record ->trashed () && $ livewire instanceof ViewTag),
112112 Action::make ('save ' )
113113 ->label (__ ('core::core.save ' ))
114114 ->color ('primary ' )
@@ -117,7 +117,7 @@ public static function form(Form $form): Form
117117 ->action (function ($ livewire ): void {
118118 $ livewire instanceof CreateTag ? $ livewire ->create () : $ livewire ->save ();
119119 })
120- ->visible (fn ($ livewire ): bool => $ livewire instanceof CreateTag || $ livewire instanceof EditTag),
120+ ->visible (fn ($ livewire ): bool => $ livewire instanceof CreateTag || $ livewire instanceof EditTag),
121121 Action::make ('saveAndCreateAnother ' )
122122 ->label (__ ('core::core.save_and_create_another ' ))
123123 ->color ('secondary ' )
@@ -126,50 +126,50 @@ public static function form(Form $form): Form
126126 ->action (function ($ livewire ): void {
127127 $ livewire ->saveAndCreateAnother ();
128128 })
129- ->visible (fn ($ livewire ): bool => $ livewire instanceof CreateTag),
129+ ->visible (fn ($ livewire ): bool => $ livewire instanceof CreateTag),
130130 Action::make ('cancel ' )
131131 ->label (__ ('core::core.cancel ' ))
132132 ->color ('secondary ' )
133133 ->outlined ()
134134 ->extraAttributes (['class ' => 'w-full ' ])
135- ->url (fn (): string => static ::getUrl ('index ' ))
136- ->visible (fn ($ livewire ): bool => $ livewire instanceof CreateTag),
135+ ->url (fn (): string => static ::getUrl ('index ' ))
136+ ->visible (fn ($ livewire ): bool => $ livewire instanceof CreateTag),
137137 Action::make ('edit ' )
138138 ->label (__ ('core::core.edit ' ))
139139 ->color ('primary ' )
140140 ->button ()
141141 ->extraAttributes (['class ' => 'w-full ' ])
142- ->url (fn ($ record ): string => static ::getUrl ('edit ' , ['record ' => $ record , 'lang ' => request ()->get ('lang ' )]))
143- ->visible (fn ($ livewire , $ record ): bool => $ livewire instanceof ViewTag && !$ record ->trashed ()),
142+ ->url (fn ($ record ): string => static ::getUrl ('edit ' , ['record ' => $ record , 'lang ' => request ()->get ('lang ' )]))
143+ ->visible (fn ($ livewire , $ record ): bool => $ livewire instanceof ViewTag && ! $ record ->trashed ()),
144144 Action::make ('restore ' )
145145 ->label (__ ('core::core.restore ' ))
146146 ->color ('success ' )
147147 ->button ()
148148 ->extraAttributes (['class ' => 'w-full ' ])
149- ->action (fn ($ record ) => $ record ->restore ())
150- ->visible (fn ($ livewire , $ record ): bool => $ record && $ record ->trashed () && $ livewire instanceof EditTag),
149+ ->action (fn ($ record ) => $ record ->restore ())
150+ ->visible (fn ($ livewire , $ record ): bool => $ record && $ record ->trashed () && $ livewire instanceof EditTag),
151151 Action::make ('delete ' )
152152 ->label (__ ('core::core.delete ' ))
153153 ->color ('danger ' )
154154 ->link ()
155155 ->extraAttributes (['class ' => 'w-full ' ])
156- ->action (fn ($ record ) => $ record ->delete ())
157- ->visible (fn ($ livewire , $ record ): bool => $ record && !$ record ->trashed () && $ livewire instanceof EditTag),
156+ ->action (fn ($ record ) => $ record ->delete ())
157+ ->visible (fn ($ livewire , $ record ): bool => $ record && ! $ record ->trashed () && $ livewire instanceof EditTag),
158158 ]),
159159 ColorPicker::make ('color ' ),
160160 TextInput::make ('weight ' ),
161161 TextInput::make ('count ' )
162162 ->disabled ()
163- ->visible (fn ($ livewire , $ record ): bool => ($ record && $ livewire instanceof EditTag) || ($ record && $ livewire instanceof ViewTag)),
163+ ->visible (fn ($ livewire , $ record ): bool => ($ record && $ livewire instanceof EditTag) || ($ record && $ livewire instanceof ViewTag)),
164164 DateTimePicker::make ('created_at ' )
165165 ->disabled ()
166- ->visible (fn ($ livewire , $ record ): bool => ($ record && $ livewire instanceof EditTag) || ($ record && $ livewire instanceof ViewTag)),
166+ ->visible (fn ($ livewire , $ record ): bool => ($ record && $ livewire instanceof EditTag) || ($ record && $ livewire instanceof ViewTag)),
167167 DateTimePicker::make ('updated_at ' )
168168 ->disabled ()
169- ->visible (fn ($ livewire , $ record ): bool => ($ record && $ livewire instanceof EditTag) || ($ record && $ livewire instanceof ViewTag)),
169+ ->visible (fn ($ livewire , $ record ): bool => ($ record && $ livewire instanceof EditTag) || ($ record && $ livewire instanceof ViewTag)),
170170 DateTimePicker::make ('deleted_at ' )
171171 ->disabled ()
172- ->visible (fn ($ livewire , $ record ): bool => $ record && $ record ->trashed () && $ livewire instanceof ViewTag),
172+ ->visible (fn ($ livewire , $ record ): bool => $ record && $ record ->trashed () && $ livewire instanceof ViewTag),
173173 ]),
174174 ])
175175 ->columnSpan (['lg ' => 1 ]),
@@ -248,21 +248,21 @@ public static function table(Table $table): Table
248248 ])
249249 ->actions ([
250250 ViewAction::make ()->url (
251- fn ($ record ) => request ()->has ('lang ' )
251+ fn ($ record ) => request ()->has ('lang ' )
252252 ? static ::getUrl ('view ' , ['record ' => $ record , 'lang ' => request ()->get ('lang ' )])
253253 : static ::getUrl ('view ' , ['record ' => $ record ])
254254 ),
255255 EditAction::make ()
256256 ->url (
257- fn ($ record ) => request ()->has ('lang ' )
257+ fn ($ record ) => request ()->has ('lang ' )
258258 ? static ::getUrl ('edit ' , ['record ' => $ record , 'lang ' => request ()->get ('lang ' )])
259259 : static ::getUrl ('edit ' , ['record ' => $ record ])
260260 )
261- ->hidden (fn (): bool => in_array (static ::getCurrentTab (), ['trash ' , 'deleted ' ])),
261+ ->hidden (fn (): bool => in_array (static ::getCurrentTab (), ['trash ' , 'deleted ' ])),
262262 ])
263263 ->bulkActions ([
264- DeleteBulkAction::make ()->hidden (fn (): bool => in_array ($ currentTab , ['trash ' , 'deleted ' ])),
265- RestoreBulkAction::make ()->visible (fn (): bool => in_array ($ currentTab , ['trash ' , 'deleted ' ])),
264+ DeleteBulkAction::make ()->hidden (fn (): bool => in_array ($ currentTab , ['trash ' , 'deleted ' ])),
265+ RestoreBulkAction::make ()->visible (fn (): bool => in_array ($ currentTab , ['trash ' , 'deleted ' ])),
266266 ]);
267267 }
268268
@@ -371,4 +371,4 @@ public static function setCurrentTab(?string $tab): void
371371 {
372372 static ::$ currentTab = $ tab ;
373373 }
374- }
374+ }
0 commit comments