diff --git a/src/App/Http/Controllers/BusyController.php b/src/App/Http/Controllers/BusyController.php index 3ecf149..148f6b4 100644 --- a/src/App/Http/Controllers/BusyController.php +++ b/src/App/Http/Controllers/BusyController.php @@ -16,6 +16,10 @@ public function storeBusy(Request $request) return; } $resource = $this->getResource($request['model-id'], $request['model-name']); + //check if the $resource has a busyFrom method, if not, return + if (! method_exists($resource, 'busyFrom')) { + return; + } $user = \App\Models\User::find($request['user-id']); $resource->busyFrom($user); }