feat: Phase 3 - public registration pages and Mailwizz config
This commit is contained in:
@@ -4,7 +4,9 @@ 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
|
||||
@@ -23,5 +25,12 @@ class AppServiceProvider extends ServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
Paginator::useTailwind();
|
||||
|
||||
Route::bind('publicPage', function (string $value): PreregistrationPage {
|
||||
return PreregistrationPage::query()
|
||||
->where('slug', $value)
|
||||
->where('is_active', true)
|
||||
->firstOrFail();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user