public function getBatchd() { $batches = Batch::where('type', 'batch')->get(); //$batch = unserialize(Session::get('batch')); //dd($batch); //if(!isset($batch)) $selectedbatchid = ''; //else $selectedbatchid = $batch->_id; //dd($selectedbatchid); return View::make('job2.tabs.batch')->with('batches', $batches)->with('selectedbatchid', ''); }