Deploy Ladill Care / deploy (push) Failing after 13s
Healthcare management app: patients, appointments, consultations, lab, pharmacy inventory, billing, and reports at care.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Events\ServiceEventOccurred;
|
|
use App\Listeners\PlatformServiceEventListener;
|
|
use App\Models\User;
|
|
use App\Services\Care\OrganizationResolver;
|
|
use App\Services\Care\PlanService;
|
|
use Illuminate\Support\Facades\Event;
|
|
use Illuminate\Support\Facades\View;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
Event::listen(ServiceEventOccurred::class, PlatformServiceEventListener::class);
|
|
|
|
View::composer('partials.sidebar', function ($view) {
|
|
/** @var User|null $user */
|
|
$user = auth()->user();
|
|
$isPro = false;
|
|
|
|
if ($user) {
|
|
$organization = app(OrganizationResolver::class)->resolveForUser($user);
|
|
if ($organization) {
|
|
$isPro = app(PlanService::class)->isPro($organization);
|
|
}
|
|
}
|
|
|
|
$view->with('isPro', $isPro);
|
|
});
|
|
|
|
View::composer(['partials.topbar'], function ($view) {
|
|
$view->with(\App\Support\MobileTopbar::resolve());
|
|
});
|
|
}
|
|
}
|