37 lines
981 B
PHP
37 lines
981 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\Facades\Vite;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
Paginator::useBootstrapFive();
|
|
Vite::useStyleTagAttributes(function (?string $src, string $url, ?array $chunk, ?array $manifest) {
|
|
if ($src !== null) {
|
|
return [
|
|
'class' => preg_match("/(resources\/assets\/vendor\/scss\/(rtl\/)?core)-?.*/i", $src) ? 'template-customizer-core-css' :
|
|
(preg_match("/(resources\/assets\/vendor\/scss\/(rtl\/)?theme)-?.*/i", $src) ? 'template-customizer-theme-css' : ''),
|
|
];
|
|
}
|
|
|
|
return [];
|
|
});
|
|
}
|
|
}
|