document_id)->creator_id == $this->user()->id; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'document_id' => 'required|exists:documents,id', 'attachments' => 'required|file', ]; } }