You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AppServiceProvider.php 989B

12345678910111213141516171819202122232425262728293031323334353637383940
  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\HtmlString;
  7. use Illuminate\Support\ServiceProvider;
  8. class AppServiceProvider extends ServiceProvider
  9. {
  10. /**
  11. * Register any application services.
  12. */
  13. public function register(): void
  14. {
  15. //
  16. }
  17. /**
  18. * Bootstrap any application services.
  19. */
  20. public function boot(): void
  21. {
  22. Filament::serving(static function () {
  23. Filament::registerViteTheme('resources/css/filament.css');
  24. });
  25. Field::macro('tooltip', function (string $tooltip) {
  26. return $this->label(
  27. Action::make('info')
  28. ->label('')
  29. ->icon('heroicon-o-information-circle')
  30. ->extraAttributes(['class' => 'text-gray-500'])
  31. ->tooltip($tooltip),
  32. );
  33. });
  34. }
  35. }