Example #1
0
 public function create()
 {
     $iSet = IndexSet::lists('name', 'id');
     $iAll = IndexSet::all();
     $i7 = I7Index::lists('index', 'id');
     $i5 = I5Index::lists('index', 'id');
     $pg = ProjectGroup::lists('name', 'id');
     $user = Auth::user();
     $batches = $user->batches->lists('batch_name', 'id');
     return view('samples.create', ['iSet' => $iSet, 'iAll' => $iAll, 'i7' => $i7, 'i5' => $i5, 'pg' => $pg, 'user' => $user, 'batches' => $batches]);
 }
 public function create()
 {
     $iSet = IndexSet::lists('name', 'id');
     $iAll = IndexSet::all();
     $i7 = I7Index::lists('index', 'id');
     $i5 = I5Index::lists('index', 'id');
     $pg = ProjectGroup::lists('name', 'id');
     $user = Auth::user();
     $batches = Batch::where('user_id', $user->id)->orderBy('created_at', 'desc')->lists('batch_name', 'id');
     return view('samples.create', ['iSet' => $iSet, 'iAll' => $iAll, 'i7' => $i7, 'i5' => $i5, 'pg' => $pg, 'user' => $user, 'batches' => $batches]);
 }
 /**
  * @param $index
  * @return mixed
  */
 private function getI5IndexId($index)
 {
     $index = I5Index::where('index', 'LIKE', $index)->get();
     if (isset($index[0])) {
         return $index[0]['id'];
     } else {
         return NULL;
     }
 }