37 lines
780 B
PHP
37 lines
780 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\PreregistrationPage;
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\Facades\Route;
|
|
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::useTailwind();
|
|
|
|
Route::bind('publicPage', function (string $value): PreregistrationPage {
|
|
return PreregistrationPage::query()
|
|
->where('slug', $value)
|
|
->where('is_active', true)
|
|
->firstOrFail();
|
|
});
|
|
}
|
|
}
|