コード例 #1
0
ファイル: ViewPage.php プロジェクト: rob1121/qdn
 public function display(Info $qdn, $view)
 {
     $this->qdn = $qdn->with('InvolvePerson')->first();
     $this->view = $view;
     if (Gate::allows('mod-qdn', $this->qdn->slug)) {
         return $this->view();
     }
     return $this->redirectHome();
 }
コード例 #2
0
ファイル: Info.php プロジェクト: rob1121/qdn
 public static function defaultCategory($request)
 {
     $today = Carbon::now('Asia/Manila');
     return Info::with('involvePerson')->where(DB::raw('YEAR(created_at)'), $today->year)->where(DB::raw('MONTH(created_at)'), $request->month)->where('discrepancy_category', $request->discrepancy)->show(0, 10)->get();
 }