示例#1
0
 public function index()
 {
     $streams = StreamMapper::byClient($this->user);
     $orders = BannerMapper::activeClient($this->user);
     $inactiveBanners = BannerMapper::inactiveClient($this->user);
     return view('app.pages.user.client.stream.index', compact('streams', 'orders', 'inactiveBanners'));
 }
示例#2
0
 public function show($userId)
 {
     $user = User::find($userId);
     if (!$user) {
         return Redirect::back()->withErrors(['user' => 'No such user']);
     }
     $banners = [];
     if ($user->type == 'client') {
         $banners = BannerMapper::activeClient($user);
     }
     if ($user->type == 'twitcher') {
         $banners = BannerMapper::activeTwitcher($user);
     }
     return view('admin.pages.user.show', compact('user', 'banners'));
 }