コード例 #1
0
 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);
 }
コード例 #2
0
 /**
  * Get paths behind 'admin'.
  *
  * Compose sidebar variable.
  */
 private function composeUnits()
 {
     View::composer('product.form', function ($view) {
         $view->with(['units' => Unit::all()->lists('name', 'id')]);
     });
 }