Owl\Http\Controllers\UserController::show PHP Метод

show() публичный Метод

public show ( $username )
    public function show($username)
    {
        $loginUser = $this->userService->getCurrentUser();
        $user = $this->userService->getByUsername($username);
        if ($user == null) {
            \App::abort(404);
        }
        if ($loginUser->id === $user->id) {
            $items = $this->itemService->getRecentsByLoginUserIdWithPaginate($user->id);
        } else {
            $items = $this->itemService->getRecentsByUserIdWithPaginate($user->id);
        }
        $templates = $this->templateService->getAll();
        return \View::make('user.show', compact('user', 'items', 'templates'));
    }