Exemplo n.º 1
0
 public function getCart()
 {
     $vendor_id = '';
     if (count(Cart::contents()) != 0) {
         $det = Cart::contents();
         foreach ($det as $item) {
             $vendor_id = $item->vendor_id;
         }
     }
     $addon_items = '';
     if ($vendor_id != '') {
         $addon_items = Addon::where('vendor_id', '=', $vendor_id)->get();
     }
     return View::make('home.cart')->with('products', Cart::contents())->with('addon_items', $addon_items)->with('city_list', City::all());
 }
Exemplo n.º 2
0
 public function getIndex()
 {
     return View::make('addons.index')->with('addons', Addon::where('vendor_id', '=', Auth::user()->id));
 }