document_id)->creator_id == $this->user()->id; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'document_id' => 'nullable|exists:documents,id', 'name' => 'nullable|string', 'extension' => 'nullable|string', 'size' => 'nullable|numeric', 'path' => 'nullable|string', ]; } }