getTokenContent()); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { return [ // ]; } /** * Resolve one-time token instance. * * @return mixed */ public function getTokenContent() { if ($this->state) { $this->token = $this->state; } $data = Cache::get($this->token); return $data; } public function getContact(): ?User { return User::findOrFail($this->getTokenContent()['user_id']); } public function getCompany(): ?Company { return Company::query()->where('company_key', $this->getTokenContent()['company_key'])->firstOrFail(); } }