public static function boot() { parent::boot(); // observer for on-created notifications PathRecord::observe(new PathRecordNotifications()); PathRecord::updating(function ($record) { $record->deleteCache(); }); }