public function postForm(ListRequest $request, Liste $liste) { $liste->nom = $request->input('first_name'); $liste->last_name = $request->input('last_name'); $liste->email = $request->input('email'); $liste->password = $request->input('password'); $liste->save(); return view('Liste/createListe'); }
/** * Determines final file ID(s). If file ID is dir, * scan it for files which match mime type pattern and return those. * Otherwise, return file ID. * * @return array */ public function getFinalFileIds() { $mimeTypePattern = $this->mimeTypePattern; if (is_null($this->finalFileIds)) { $fileRequest = new FileRequest($this->accessToken, $this->getFileId()); $properties = $fileRequest->getResponse(); if ($properties->file->content_type != self::DIR_MIME_TYPE) { $this->finalfileIds = [$this->getFileId()]; } else { $listRequest = new ListRequest($this->accessToken, $this->getFileId()); $response = $listRequest->getResponse(); $fileIds = []; foreach ($response->files as $file) { if (preg_match($mimeTypePattern, $file->content_type)) { $fileIds[] = $file->id; } } $this->finalFileIds = $fileIds; } Log::log('Found final file IDs:'); Log::log($this->finalFileIds); } return $this->finalFileIds; }