Exemplo n.º 1
0
 public function user($slug)
 {
     $service = new PostService();
     $posts = $service->getPosts($slug);
     $user = User::where('slug', $slug)->first()->toArray();
     $path = '/user/' . $user['slug'];
     return view('blog.index', compact('posts', 'path', 'user'));
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(PostService $postService)
 {
     $postService->create($all);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(PostService $postService)
 {
     $postService->create($request->all());
 }
Exemplo n.º 4
0
 public function getPhoto(Server $server, Request $request, $id, $file)
 {
     return PostService::getPhoto($server, $request, $id, $file);
 }