/**
  * Bind data to the view.
  *
  * @param View $view
  */
 public function compose(View $view)
 {
     $products = Product::allLists();
     $shopkeepers = User::searchShopkeepers();
     $communes = ['1' => 'Comuna 1', '2' => 'Comuna 2', '3' => 'Comuna 3', '4' => 'Comuna 4', '5' => 'Comuna 5', '6' => 'Comuna 6', '7' => 'Comuna 7', '8' => 'Comuna 8'];
     $view->with(['communes' => $communes, 'products' => $products, 'shopkeepers' => $shopkeepers]);
 }
 /**
  * Display a listing of the Products.
  *
  * @return \Illuminate\Http\Response
  */
 public function getShoppingInterests(Request $request)
 {
     //$products = $this->getFormatSelect2(Auth::user()->shoppingInterestsLists());
     $products = $this->getFormatSelect2(Product::allLists());
     return response()->json($products);
 }
Example #3
0
 public function productionProductsLists()
 {
     return Product::allLists(null, [], $this->productionProducts->lists('id')->all());
 }