page; if(!$page_title){ return $this->errorWrongArgs(); } $page = Page::where('title', $page_title)->get()->first(); if($page){ return $this->respondWithItem($page, new PageTransformer($this->locale)); } return $this->errorNotFound(); } }