15 public function forEvent(
int $moduleInstanceId,
string $event): Collection
17 return ActionInstance::where(
'module_instance_id', $moduleInstanceId)
18 ->where(
'event', $event)
30 return ActionInstance::where(
'module_instance_id', $moduleInstanceId)->get();
43 return ActionInstance::findOrFail($id);
50 public function all(): Collection
52 return ActionInstance::all();
66 $actionInstance = $this->
getById($id);
67 $actionInstance->fill($attributes);
68 $actionInstance->save();
69 return $actionInstance;
81 public function delete(
int $id)
83 $actionInstance = $this->
getById($id);
84 $actionInstance->delete();
forEvent(int $moduleInstanceId, string $event)
update(int $id, array $attributes)
forModuleInstance(int $moduleInstanceId)