@@ -34,13 +34,13 @@ public static function configure(Table $table): Table
3434 ->label ('Name ' )
3535 ->circular ()
3636 ->width ('0% ' )
37- ->defaultImageUrl (fn (?string $ state ): string => $ state ? sprintf ('https://avatars.githubusercontent.com/u/%s ' , $ state ) : asset ('images/laravelio-icon-gray.svg ' )),
37+ ->defaultImageUrl (fn (?string $ state ): string => $ state ? sprintf ('https://avatars.githubusercontent.com/u/%s ' , $ state ) : asset ('images/laravelio-icon-gray.svg ' )),
3838
3939 TextColumn::make ('username ' )
4040 ->label ('' )
4141 ->searchable ()
42- ->formatStateUsing (fn (User $ user ): ?string => $ user ->name )
43- ->description (fn (User $ user ): ?string => $ user ->username ),
42+ ->formatStateUsing (fn (User $ user ): ?string => $ user ->name )
43+ ->description (fn (User $ user ): ?string => $ user ->username ),
4444
4545 TextColumn::make ('email ' )
4646 ->searchable ()
@@ -49,7 +49,7 @@ public static function configure(Table $table): Table
4949 TextColumn::make ('type ' )
5050 ->label ('Role ' )
5151 ->badge ()
52- ->formatStateUsing (fn (string $ state ): string => match ($ state ) {
52+ ->formatStateUsing (fn (string $ state ): string => match ($ state ) {
5353 '1 ' => 'User ' ,
5454 '2 ' => 'Moderator ' ,
5555 '3 ' => 'Admin ' ,
@@ -63,7 +63,7 @@ public static function configure(Table $table): Table
6363 TextColumn::make ('created_at ' )
6464 ->label ('Joined on ' )
6565 ->dateTime ()
66- ->sortable ()
66+ ->sortable (),
6767 ])
6868 ->filters ([
6969 SelectFilter::make ('type ' )
@@ -75,11 +75,11 @@ public static function configure(Table $table): Table
7575
7676 TernaryFilter::make ('banned_at ' )
7777 ->label ('Banned ' )
78- ->nullable ()
78+ ->nullable (),
7979 ])
8080 ->recordActions ([
8181 Action::make ('view ' )
82- ->url (fn (User $ user ): string => route ('profile ' , $ user ->username ))
82+ ->url (fn (User $ user ): string => route ('profile ' , $ user ->username ))
8383 ->openUrlInNewTab ()
8484 ->icon ('heroicon-s-eye ' ),
8585
@@ -89,30 +89,30 @@ public static function configure(Table $table): Table
8989 VerifyAuthor::dispatchSync ($ user );
9090
9191 Notification::make ()
92- ->title ($ user ->name . ' is now a verified author. ' )
92+ ->title ($ user ->name . ' is now a verified author. ' )
9393 ->success ()
9494 ->send ();
9595 })
9696 ->openUrlInNewTab ()
9797 ->color ('primary ' )
9898 ->icon ('heroicon-s-check-circle ' )
9999 ->requiresConfirmation ()
100- ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::ADMIN , $ user ) && ! $ user ->isVerifiedAuthor ()),
100+ ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::ADMIN , $ user ) && ! $ user ->isVerifiedAuthor ()),
101101
102102 Action::make ('unverify_author ' )
103103 ->action (function (User $ user ) {
104104 UnVerifyAuthor::dispatchSync ($ user );
105105
106106 Notification::make ()
107- ->title ($ user ->name . '\'s threads have been deleted. ' )
107+ ->title ($ user ->name . '\'s threads have been deleted. ' )
108108 ->success ()
109109 ->send ();
110110 })
111111 ->openUrlInNewTab ()
112112 ->color ('danger ' )
113113 ->icon ('heroicon-s-x-circle ' )
114114 ->requiresConfirmation ()
115- ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::ADMIN , $ user ) && $ user ->isVerifiedAuthor ()),
115+ ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::ADMIN , $ user ) && $ user ->isVerifiedAuthor ()),
116116
117117 Action::make ('ban_author ' )
118118 ->schema ([
@@ -134,7 +134,7 @@ public static function configure(Table $table): Table
134134
135135 Notification::make ()
136136 ->title (
137- $ user ->name . ' is now banned. ' . ($ data ['delete_threads ' ] ? ' And all his threads are now deleted. ' : '' )
137+ $ user ->name . ' is now banned. ' . ($ data ['delete_threads ' ] ? ' And all his threads are now deleted. ' : '' )
138138 )
139139 ->success ()
140140 ->send ();
@@ -144,45 +144,45 @@ public static function configure(Table $table): Table
144144 ->color ('danger ' )
145145 ->icon ('heroicon-s-check-circle ' )
146146 ->requiresConfirmation ()
147- ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::BAN , $ user ) && ! $ user ->isBanned ()),
147+ ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::BAN , $ user ) && ! $ user ->isBanned ()),
148148
149149 Action::make ('unban_author ' )
150150 ->action (function (User $ user ) {
151151
152152 UnbanUser::dispatchSync ($ user );
153153
154154 Notification::make ()
155- ->title ($ user ->name . ' is no longer a banned user. ' )
155+ ->title ($ user ->name . ' is no longer a banned user. ' )
156156 ->success ()
157157 ->send ();
158158 })
159159 ->openUrlInNewTab ()
160160 ->color ('primary ' )
161161 ->icon ('heroicon-s-x-circle ' )
162162 ->requiresConfirmation ()
163- ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::BAN , $ user ) && $ user ->isBanned ()),
163+ ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::BAN , $ user ) && $ user ->isBanned ()),
164164
165165 Action::make ('delete_threads ' )
166166 ->action (function (User $ user ) {
167167 DeleteUserThreads::dispatchSync ($ user );
168168
169169 Notification::make ()
170- ->title ($ user ->name . '\'s threads have been deleted. ' )
170+ ->title ($ user ->name . '\'s threads have been deleted. ' )
171171 ->success ()
172172 ->send ();
173173 })
174174 ->openUrlInNewTab ()
175175 ->color ('danger ' )
176176 ->icon ('heroicon-s-archive-box-x-mark ' )
177177 ->requiresConfirmation ()
178- ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::DELETE , $ user )),
178+ ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::DELETE , $ user )),
179179
180180 DeleteAction::make ()
181- ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::DELETE , $ user )),
181+ ->visible (fn (User $ user ): bool => auth ()->user ()->can (UserPolicy::DELETE , $ user )),
182182 ]),
183183 ])
184184 ->toolbarActions ([
185- //
185+ //
186186 ]);
187187 }
188188}
0 commit comments