'required|string|min:3|max:255', 'state' => 'nullable|between:0,3', 'order' => 'nullable|numeric|min:0' ]; } public function getValueOf(?string $key) { $values = [ 'business_id' => $this->business_id, 'project_id' => null, 'sprint_id' => null, 'workflow_id' => $this->workflow_id, 'status_id' => $this->id, 'system_id' => null, 'user_id' => null, 'task_id' => null, 'subject_id' => $this->id, ]; if ($key && isset($values, $key)) { return $values[$key]; } return $values; } public function workflow() { return $this->belongsTo(Workflow::class,'workflow_id','id'); } }