您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AppServiceProvider.php 954B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace App\Providers;
  3. use Filament\Facades\Filament;
  4. use Filament\Forms\Components\Field;
  5. use Filament\Forms\Components\Actions\Action;
  6. use Illuminate\Support\ServiceProvider;
  7. class AppServiceProvider extends ServiceProvider
  8. {
  9. /**
  10. * Register any application services.
  11. */
  12. public function register(): void
  13. {
  14. //
  15. }
  16. /**
  17. * Bootstrap any application services.
  18. */
  19. public function boot(): void
  20. {
  21. Filament::serving(static function () {
  22. Filament::registerViteTheme('resources/css/filament.css');
  23. });
  24. Field::macro('tooltip', function (string $tooltip) {
  25. return $this->label(
  26. Action::make('info')
  27. ->label('')
  28. ->icon('heroicon-o-information-circle')
  29. ->extraAttributes(['class' => 'text-gray-500'])
  30. ->tooltip($tooltip),
  31. );
  32. });
  33. }
  34. }