getMethod() === 'POST' ? 'required' : ''; $ignore = $this->getMethod() === 'PUT' ? $this->route('comment')->id : ''; $userId = $this->route('comment') ? $this->route('comment')->user_id : Auth::id(); return [ 'content' => 'required|string|max:1000|min:3', ]; } }