1616use Filament \Resources \Resource ;
1717use Filament \Tables ;
1818use Filament \Tables \Table ;
19+ use Illuminate \Support \HtmlString ;
1920
2021class PluginResource extends Resource
2122{
@@ -267,6 +268,26 @@ public static function table(Table $table): Table
267268 return ;
268269 }
269270
271+ $ lines = collect ([
272+ ['iOS support ' , $ checks ['supports_ios ' ]],
273+ ['Android support ' , $ checks ['supports_android ' ]],
274+ ['JS support ' , $ checks ['supports_js ' ]],
275+ ['Support email ' , $ checks ['has_support_email ' ] ? $ checks ['support_email ' ] : false ],
276+ ['Requires nativephp/mobile ' , $ checks ['requires_mobile_sdk ' ] ? $ checks ['mobile_sdk_constraint ' ] : false ],
277+ ['iOS min_version ' , $ checks ['has_ios_min_version ' ] ? $ checks ['ios_min_version ' ] : false ],
278+ ['Android min_version ' , $ checks ['has_android_min_version ' ] ? $ checks ['android_min_version ' ] : false ],
279+ ])->map (function (array $ item ): string {
280+ [$ label , $ value ] = $ item ;
281+ if ($ value === true ) {
282+ return "✅ {$ label }" ;
283+ }
284+ if ($ value === false ) {
285+ return "❌ {$ label }" ;
286+ }
287+
288+ return "✅ {$ label }: {$ value }" ;
289+ })->implode ('<br> ' );
290+
270291 $ passed = collect ($ checks )->only ([
271292 'supports_ios ' , 'supports_android ' , 'supports_js ' ,
272293 'has_support_email ' , 'requires_mobile_sdk ' ,
@@ -275,7 +296,9 @@ public static function table(Table $table): Table
275296
276297 Notification::make ()
277298 ->title ("Review checks complete ( {$ passed }/7 passed) " )
278- ->success ()
299+ ->body (new HtmlString ($ lines ))
300+ ->duration (15000 )
301+ ->color ($ passed === 7 ? 'success ' : 'warning ' )
279302 ->send ();
280303 }),
281304 ])
0 commit comments