Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Astrotomic/opendor.me

79 stars
1 code files
View Astrotomic/opendor.me on GitHub

app/Providers/AppServiceProvider.php

Open in GitHub
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Str;
 
class AppServiceProvider extends ServiceProvider
{
//
public function boot(): void
{
//
URL::macro('filament', function (string $uri): string {
if (config('filament.domain') !== null) {
$this->forceRootUrl(config('filament.domain'));
}
 
return tap(
$this->to(Str::start(
trim($uri, '/'),
Str::finish(config('filament.path'), '/')
)),
fn () => $this->forceRootUrl(config('app.url'))
);
});
//
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.