route('host'); if (!($host instanceof Host)) { $host = Host::where('id', $host)->first(); } if ($host->user_id ?? 0 == $this->user()->id) { return true; } else { return false; } } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ // ]; } }