initial commit

This commit is contained in:
I-Fun
2026-04-01 08:04:56 +07:00
commit e09c8a5fa9
111 changed files with 18022 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Providers;
use App\Models\Event;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function register(): void {}
public function boot(): void
{
// Inject alert badge count into all views
View::composer('*', function (\Illuminate\View\View $view): void {
try {
$alertCount = Event::upcoming(24)->count();
} catch (\Throwable) {
$alertCount = 0;
}
$view->with('alertCount', $alertCount);
});
}
}