コード例 #1
0
ファイル: Create.php プロジェクト: drongen/admin
 public function rules()
 {
     if (isOnPages()) {
         unset($this->rules['image']);
     }
     return $this->rules;
 }
コード例 #2
0
ファイル: ArticleRepository.php プロジェクト: arwinjp/ODTS
 /**
  * Init
  */
 public function init()
 {
     if (isOnPages()) {
         $this->article = $this->article->onlyPage();
     } else {
         $this->article = $this->article->onlyPost();
     }
 }
コード例 #3
0
 /**
  * Remove the specified article from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy($id)
 {
     try {
         $this->repository->delete($id);
         return $this->redirect(isOnPages() ? 'pages.index' : 'articles.index');
     } catch (ModelNotFoundException $e) {
         return $this->redirectNotFound();
     }
 }