コード例 #1
0
ファイル: IndexController.php プロジェクト: blozixdextr/adtw
 public function index()
 {
     $notifications = NotificationMapper::fresh($this->user, 10);
     $showWelcome = $this->user->is_welcomed == 0;
     if ($showWelcome) {
         $this->user->is_welcomed = 1;
         $this->user->save();
     }
     return view('app.pages.user.client.index', compact('notifications', 'showWelcome'));
 }
コード例 #2
0
ファイル: IndexController.php プロジェクト: blozixdextr/adtw
 public function index()
 {
     $this->updateStatistics();
     $banners = [];
     $bannerTypes = $this->user->bannerTypes;
     $notifications = NotificationMapper::fresh($this->user, 10);
     $waitingBanners = BannerMapper::waitingTwitcher($this->user);
     foreach ($bannerTypes as $bt) {
         $banners[$bt->id] = BannerMapper::activeTwitcher($this->user, $bt->id);
     }
     $activeBanners = BannerMapper::activeTwitcher($this->user);
     $showWelcome = $this->user->is_welcomed == 0;
     if ($showWelcome) {
         $this->user->is_welcomed = 1;
         $this->user->save();
     }
     return view('app.pages.user.twitcher.index', compact('banners', 'bannerTypes', 'notifications', 'waitingBanners', 'activeBanners', 'showWelcome'));
 }
コード例 #3
0
 public function fresh()
 {
     $notifications = NotificationMapper::fresh($this->user, 10);
     $html = view('app.pages.user.client.notification.ajax', compact('notifications'))->render();
     return ['html' => $html];
 }