Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
Archivo: Info.php Proyecto: 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();
 }