/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getIndex()
 {
     if (Auth::user()->admin != 99) {
         //Admin以外はアクセス不可
         echo "アクセス出来ません<br />Not Admin<a href=\"/\">BACK</a>";
     } else {
         $userObjs = User::where('admin', 10)->orderBy('created_at', 'desc')->get();
         $jobObjs = Job::orderBy('created_at', 'desc')->get();
         $studyObjs = $this->iroha->where('slug', 'study')->orderBy('created_at', 'desc')->get();
         return view('dashboard.index', ['userObjs' => $userObjs, 'jobObjs' => $jobObjs, 'studyObjs' => $studyObjs]);
     }
 }
示例#2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $jobs = \App\Job::orderBy('created_at', 'desc')->get();
     return view('jobs.index', compact('jobs'));
 }
示例#3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $jobs = Job::orderBy('id', 'desc')->paginate(5);
     return View('jobs.index', compact('jobs'));
 }