Пример #1
0
 /**
  * Display the specified resource.
  * GET /posts/{id}
  *
  * @param  string  $slug
  * @return Response
  */
 public function show($slug)
 {
     $post = Post::where('slug', $slug)->firstOrFail();
     $author = $post->user;
     //recuperer les socials link
     $socials = Social::all();
     /*$cat = $post->category();*/
     $comments = $post->comments;
     return View::make('posts.show', compact('post', 'author', 'comments', 'tags', 'socials'));
 }
 /**
  * Display a listing of socials
  *
  * @return Response
  */
 public function index()
 {
     $socials = Social::all();
     return View::make('posts.show', compact('socials'));
 }