feat: initial project setup with Laravel 12 and Filament v4
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\Doctor;
|
||||
use App\Models\Medication;
|
||||
use App\Models\Patient;
|
||||
use App\Models\PatientIllness;
|
||||
use App\Models\PaymentType;
|
||||
use App\Models\Prescription;
|
||||
use App\Models\SurgeryAppointment;
|
||||
use App\Models\SurgeryCenter;
|
||||
use App\Models\Treatment;
|
||||
use App\Models\Visit;
|
||||
use App\Observers\SyncObserver;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Support\Enums\Alignment;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function register(): void {}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
$observer = new SyncObserver();
|
||||
|
||||
Patient::observe($observer);
|
||||
Doctor::observe($observer);
|
||||
Treatment::observe($observer);
|
||||
Medication::observe($observer);
|
||||
PaymentType::observe($observer);
|
||||
SurgeryCenter::observe($observer);
|
||||
PatientIllness::observe($observer);
|
||||
Prescription::observe($observer);
|
||||
SurgeryAppointment::observe($observer);
|
||||
Visit::observe($observer);
|
||||
|
||||
DeleteAction::configureUsing(function (DeleteAction $action): void {
|
||||
$action->modalAlignment(Alignment::Start);
|
||||
});
|
||||
|
||||
DeleteBulkAction::configureUsing(function (DeleteBulkAction $action): void {
|
||||
$action->modalAlignment(Alignment::Start);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user