/** * Creates an activity when a task was updated * * @param TaskWasUpdated $event */ public function updatedTask(TaskWasUpdated $event) { $this->activityRepo->create($event->task, ACTIVITY_TYPE_UPDATE_TASK); }
public function restoredExpense(ExpenseWasRestored $event) { $this->activityRepo->create($event->expense, ACTIVITY_TYPE_RESTORE_EXPENSE); }
/** * @param null $clientPublicId * @return \Illuminate\Http\JsonResponse */ public function getDatatable($clientPublicId = null) { $clientId = Client::getPrivateId($clientPublicId); $query = $this->activityRepo->findByClientId($clientId); return $this->datatableService->createDatatable(new ActivityDatatable(false), $query); }