コード例 #1
0
 public function __construct()
 {
     $this->vm = Student::with('Category', 'Call', 'Call.User')->WhereIn('category_id', [3, 4])->Where('state', '=', 0)->paginate(10);
     $this->ic_cr = Student::with('Category', 'Call', 'Call.User')->WhereIn('category_id', [1, 2])->Where('state', '=', 0)->paginate(10);
     $this->ec_cn = Student::with('Category', 'Call', 'Call.User')->WhereIn('category_id', [5, 6])->Where('state', '=', 0)->paginate(10);
     $this->in_aet_re_tr = Student::with('Category', 'Call', 'Call.User')->WhereIn('category_id', [7, 8, 9, 10])->Where('state', '=', 0)->paginate(10);
     $this->sd_dg = Student::with('Category', 'Call', 'Call.User')->WhereIn('category_id', [11, 12])->Where('state', '=', 0)->paginate(10);
     $this->dr = Student::with('Category', 'Call', 'Call.User')->WhereIn('category_id', [13])->Where('state', '=', 0)->paginate(10);
 }
コード例 #2
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     $vm = $this->vm;
     $ic_cr = $this->ic_cr;
     $ec_cn = $this->ec_cn;
     $in_aet_re_tr = $this->in_aet_re_tr;
     $sd_dg = $this->sd_dg;
     $dr = $this->dr;
     $results = Student::with('Category')->where('state', '=', 0)->orderBy('id', 'DECS')->get();
     return view('ticket.home', compact('results', 'vm', 'ic_cr', 'ec_cn', 'in_aet_re_tr', 'sd_dg', 'dr'));
 }
コード例 #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $vm = $this->vm;
     $ic_cr = $this->ic_cr;
     $ec_cn = $this->ec_cn;
     $in_aet_re_tr = $this->in_aet_re_tr;
     $sd_dg = $this->sd_dg;
     $dr = $this->dr;
     $results = Student::with('Category', 'Call', 'Call.User')->Where('state', '=', 0)->orderBy('id', 'ASC')->paginate(10);
     return view('ticket.call.index', compact('results', 'vm', 'ic_cr', 'ec_cn', 'in_aet_re_tr', 'sd_dg', 'dr'));
 }
コード例 #4
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $vm = $this->vm;
     $ic_cr = $this->ic_cr;
     $ec_cn = $this->ec_cn;
     $in_aet_re_tr = $this->in_aet_re_tr;
     $sd_dg = $this->sd_dg;
     $dr = $this->dr;
     $category = Category::orderBy('id', 'ASC')->lists('description', 'id');
     $results = Student::with('Category')->where('state', '=', 0)->orderBy('id', 'DECS')->paginate(2);
     return view('ticket.student.create', compact('results', 'category', 'vm', 'ic_cr', 'ec_cn', 'in_aet_re_tr', 'sd_dg', 'dr'));
 }