public function listAll() { $brandsList = Brand::all('name', 'id'); $modelsList = BrandModel::all('name', 'id', 'brand_id'); $partsList = PartType::all('name', 'id'); return view('backoffice.globalArticleSearch')->with(compact('modelsList'))->with(compact('brandsList'))->with(compact('partsList')); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $categories = Category::all(); $brands = Brand::all(); $size = Size::all(); $color = Color::all(); return view('admin.product.add', compact('categories', 'brands', 'size', 'color')); }
public function index() { $categories = Category::all(); $brands = Brand::all(); $leftmenu['model'] = 'active'; $leftmenu['model_cat'] = 'active'; return view('/category-brand/index', ['leftmenu' => $leftmenu, 'categories' => $categories, 'brands' => $brands]); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $brands = new Brand(); $brands = Brand::all(); $category = new Category(); $categorys = Category::all(); return view('singleBlog.singleBlog', ['categorys' => $categorys, 'brands' => $brands]); }
/** * Show the form for creating a new resource. * * @return Response */ public function create() { $brands = new Brand(); $brands = Brand::all(); $categorys = new Category(); $categorys = Category::all(); return view('product.createProduct', ['categorys' => $categorys, 'brands' => $brands]); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $brands = new Brand(); $brands = Brand::all(); $category = new Category(); $categorys = Category::all(); return view('blogList.blogList', ['categorys' => $categorys, 'brands' => $brands]); }
public function addProduct() { $page = 'partials.admin-addProduct'; $users = User::all(); $types = Type::all(); $brands = Brand::all(); return view('quantri/admin', compact('page', 'users', 'brands', 'types')); }
/** * Show the application dashboard. * * @return Response */ public function index() { $articleCount = Article::all()->count(); $partTypeCount = PartType::all()->count(); $brandsCount = Brand::all()->count(); $modelCount = BrandModel::all()->count(); // dd($articleCount); return view('home')->with(['articleCount' => $articleCount, 'partTypeCount' => $partTypeCount, 'brandsCount' => $brandsCount, 'modelCount' => $modelCount]); }
public function getBrands(Request $request) { if ($request->input('q')) { $search_query = $request->input('q'); $brands = Brand::where('name', 'like', '%' . $search_query . '%')->get(); } else { $brands = Brand::all(); } return response()->json($brands); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $brands = new Brand(); $brands = Brand::all(); $category = new Category(); $categorys = Category::all(); $products = new Product(); $products = Product::all(); return view('home', ['categorys' => $categorys, 'brands' => $brands, 'products' => $products]); }
public function index() { $categories = Category::all(); $brands = Brand::all(); $modele = Modeles::with('category', 'brand')->get(); $articles_modeles = Modeles::with('articles')->get(); $leftmenu['model'] = 'active'; $leftmenu['model_gerer'] = 'active'; return view('/modeles/index', ['leftmenu' => $leftmenu, 'categories' => $categories, 'brands' => $brands, 'modeles' => $modele, 'artmod' => $articles_modeles]); }
/** * Display a listing of the resource. * * @return Response */ public function index($id) { $product = new Product(); $product = Product::find($id); $categorys = new Category(); $categorys = Category::all(); $brands = new Brand(); $brands = Brand::all(); $reviews = new Review(); $reviews = $reviews = DB::table('review')->where('product_id', '=', $id)->get(); return view('productDetails.productDetails', ['product' => $product, 'categorys' => $categorys, 'brands' => $brands, 'reviews' => $reviews]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Model $objects, $brand_id = 'all', $district_id = 'all') { $brand = $brand_id; $district = $district_id; $brands = Brand::all(); $districts = District::getLocalizedWithCounts(); $selected_district = District::getLocalizedDistrict($district); if (!$selected_district) { $selected_district = 'all'; } return view('portfolio', ['categories' => $this->categories, 'objects' => $objects->getLocalizedPaginate(9, $brand, $district), 'brands' => $brands, 'districts' => $districts, 'selected_brand' => $brand, 'selected_district' => $selected_district, 'title' => LANG . '_title']); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $object = UserType::find($id); if ($object) { $params = $request->only('name', 'phone', 'email', 'type_id'); $filter = $object->validator($params, ['email' => 'required|email|unique:users,email,' . $id]); if ($filter->fails()) { $error = $filter->errors()->toArray(); $params['id'] = $id; return view('admin.trader.edit', ['input' => $params, 'error' => $error, 'options' => Option::where('user_id', $id)->get(), 'districts' => District::all(), 'brands' => Brand::all(), 'types' => UserType::all()]); } $object->fill($params); $object->save(); return redirect('admin/trader/' . $id . '/edit'); } if ($request->ajax()) { return $this->responseAnswer(false, null, null, trans('user.badUser')); } else { return redirect('admin/traders'); } }
/** * Display a listing of the resource. * * @return Response */ public function index() { $brands = Brand::all(); return view('admin.brands.index', compact('brands')); }
public function index() { return Brand::all(); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $object = Model::find($id); $districts = District::all(); $brands = Brand::all(); $products = $object->products(); $images = $object->images(); if ($object) { return view('admin.portfolio.edit', ['input' => $object->toArray(), 'districts' => $districts, 'brands' => $brands, 'products' => $products, 'images' => $images]); } return false; }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $object = Model::find($id); if ($object) { $params = $request->only('active', 'order', 'img', 'desc_img', 'brand_id', 'url', 'ru_title', 'ru_description', 'ru_tech_description', 'ru_seo_title', 'ru_seo_keywords', 'ru_seo_description', 'en_title', 'en_description', 'en_tech_description', 'en_seo_title', 'en_seo_keywords', 'en_seo_description', 'ua_title', 'ua_description', 'ua_tech_description', 'ua_seo_title', 'ua_seo_keywords', 'ua_seo_description'); $params['active'] = $params['active'] ? true : false; $filter = $object->validator($params, ['ru_title' => 'required|min:2|max:255|unique:product_categories,ru_title,' . $id, 'en_title' => 'required|min:2|max:255|unique:product_categories,en_title,' . $id, 'ua_title' => 'required|min:2|max:255|unique:product_categories,ua_title,' . $id]); if ($filter->fails()) { $params['id'] = $id; $params['img'] = $object->img; $brands = Brand::all(); $error = $filter->errors()->toArray(); return view('admin.product-category.edit', ['input' => $params, 'error' => $error, 'brands' => $brands, 'object' => $object]); } if ($request->hasFile('img')) { $params['img'] = $this->upload('img'); if ($object->img && file_exists(public_path() . DS . 'uploads' . DS . 'product-category' . DS . $object->img)) { unlink(public_path() . DS . 'uploads' . DS . 'product-category' . DS . $object->img); } } else { unset($params['img']); } if ($request->hasFile('desc_img')) { $params['desc_img'] = $this->upload('desc_img'); if ($object->desc_img && file_exists(public_path() . DS . 'uploads' . DS . 'product-category' . DS . $object->desc_img)) { unlink(public_path() . DS . 'uploads' . DS . 'product-category' . DS . $object->desc_img); } } else { unset($params['desc_img']); } $params['alias'] = $this->makeAlias($params['ru_title']); $object->fill($params); $object->save(); return redirect('admin/product-category/' . $object->id . '/edit'); } return false; }
public function recoverView() { $Brands = Brand::all()->where('status', 4); return view('admin.brand.recover', compact('Brands')); }
public function product() { $data = array('brand' => Brand::all(), 'barang' => Product::paginate(15), 'cart' => Cart::content(), 'total' => Cart::total(), 'download' => Download::limit(3)->offset(0)->get(), 'testimoni' => Testimoni::limit(10)->offset(0)->get()); return view('front.product', compact('data')); }
public function productEdit($id) { $page = 'partials.admin-editProduct'; $users = User::all(); $types = Type::all('type_name', 'id'); $brands = Brand::all('brand_name', 'id'); $product = Product::find($id); return view('quantri/admin', compact('page', 'users', 'product', 'types', 'brands')); }
public function __construct() { $this->brands = Brand::all(array('id', 'name')); $this->categories = Category::all(array('id', 'name')); $this->products = Product::all(array('id', 'name', 'price')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $brands = Brand::all(); return view('brands.index')->withBrands($brands); }
public function getBrands() { // get all brands $brands = Brand::all(); return View::make('admin/merck/brands/index', compact('brands')); }
public function brands($name) { $brands = Brand::all(array('name')); //$products = Products::all(); $products = Products::where('brand_id', '=', $name)->get(); return view('admin.products', ['products' => $products], ['brands' => $brands]); }
public function brands() { $brands = Brand::all(['id', 'name', 'image']); return $brands; }
/** * Get all brands * * @return \Illuminate\Http\JsonResponse */ public function json() { return response()->json(['data' => Brand::all()]); }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { //dd($id); // // $brands = Brand::all(); $categories = Category::all(); $product = Product::with('description')->find($id); $prices = $product->prices; //$mrps = Mrp::with('unit')->where('product_id', $id)->get(); //dd($mrp); $images = $product->images; $units = Unit::all(); return view('admin/product/edit', compact('product', 'categories', 'brands', 'images', 'units', 'prices')); }
public function wishlist($id) { $page = 'partials.profile-wishlist'; $items = Wishlist::where('user_id', '=', $id)->get(); $products = Product::all(); $brands = Brand::all(); $types = Type::all(); return view('webcontent/profile', compact('page', 'items', 'products', 'brands', 'types')); }
public function ajax_search() { $categories = Category::all(); $products = Product::all(); $brands = Brand::all(); $data = ['products' => $products, 'categories' => $categories, 'brands' => $brands]; //dd($data); return response()->json($data); }