Example #1
0
 /**
  * Display the specified resource.
  *
  * @param  string  $url
  * @return Response
  */
 public function show($url)
 {
     $article = Article::where("url", $url)->firstOrFail();
     return view("article.show", compact("article"));
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $article = Article::find($id);
     return view('home.show', ['article' => $article]);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Article::destroy($id);
     Session::flash('message', 'Articulo Eliminado Correctamente');
     return Redirect::to('article');
 }
 public function edit($id)
 {
     $article = Article::findOrFail($id);
     return view('articles.edit', compact('article'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $articles = Article::all();
     return view('admin.index', ['articles' => $articles]);
 }
Example #6
0
 /**
  * Show the form for configuring articles Details
  *
  * @param $id
  * @return \Illuminate\View\View
  */
 public function config($id)
 {
     $article = Article::findOrFail($id);
     return view('admin.article.config', compact('article'));
 }