|string> */ public function rules(): array { return [ 'asset_id' => [ 'required', Rule::exists('assets', 'id')->where($this->userCompanyWhere()), ], 'title' => 'required|max:255', 'begin' => 'date', 'end' => 'date', 'parent_id' => [ Rule::exists('plans', 'id')->where($this->userCompanyWhere())->where("asset_id", $this->post("asset_id")), ] ]; } }