refactor: remove global RateCardProfile singleton usage from controllers and delete unused welcome view

This commit is contained in:
I-Fun
2026-04-06 09:33:43 +07:00
parent a72eec3ead
commit 737ba24293
9 changed files with 155 additions and 268 deletions

View File

@@ -16,6 +16,13 @@ class AppServiceProvider extends ServiceProvider
{
// Inject alert badge count into all views
View::composer('*', function (\Illuminate\View\View $view): void {
if (!$view->offsetExists('profile')) {
$view->with('profile', \App\Models\RateCardProfile::getSingleton());
}
if (!$view->offsetExists('invoiceSettings')) {
$view->with('invoiceSettings', \App\Models\InvoiceSettings::instance());
}
try {
$alertCount = Event::upcoming(24)->count();
} catch (\Throwable) {