-
app/Providers/ObserverServiceProvider.php
Open in GitHubuse App\Models\Order; use App\Models\OrderItem; use App\Observers\OrderItemObserver; use App\Observers\OrderObserver; use Illuminate\Support\ServiceProvider; class ObserverServiceProvider extends ServiceProvider { // public function boot() { Order::observe(OrderObserver::class); OrderItem::observe(OrderItemObserver::class); } }
-
config/app.php
Open in GitHubreturn [ // 'providers' => [ // App\Providers\ObserverServiceProvider::class, ], // ];