Exemplo n.º 1
0
 /**
  * Define your route model bindings, pattern filters, etc.
  *
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function boot(Router $router)
 {
     //
     parent::boot($router);
     $router->bind('trashed_articles', function ($id) {
         return \Pipeline\Article::withTrashed()->findOrFail($id);
     });
     $router->model('articles', 'Pipeline\\Article');
 }
Exemplo n.º 2
0
 public function update(Article $article, ArticleRequest $request)
 {
     //$article = Article::findOrFail($id);
     $article->update($request->all());
     return redirect('articles');
 }