refactor: remove global RateCardProfile singleton usage from controllers and delete unused welcome view
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user