public function index() { $param['pageNo'] = 21; if ($alert = Session::get('alert')) { $param['alert'] = $alert; } $param['unit'] = UnitModel::all(); return View::make('admin.square.index')->with($param); }
/** * Get paths behind 'admin'. * * Compose sidebar variable. */ private function composeUnits() { View::composer('product.form', function ($view) { $view->with(['units' => Unit::all()->lists('name', 'id')]); }); }