Ejemplo n.º 1
0
 /**
  * Remove a Brand from storage
  * @param $id
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  */
 public function destroyBrand($id)
 {
     Brands::where('id', $id)->delete();
     Session::flash('success_message', 'Brand has been deleted from database');
     return redirect('config');
 }
Ejemplo n.º 2
0
 public function getBrandByID($brandId)
 {
     $brands = Brands::where('id', $brandId)->get();
     return $brands;
 }
 public function deleteBrands(Request $request)
 {
     if (Auth::user()->email == '*****@*****.**') {
         Brands::where('id', $request->input('brand-id'))->delete();
         return redirect()->back()->with($request->session()->flash('admin-success', 'Марка АВТОМОБИЛИ беше успешно изтрита.'));
     }
 }
Ejemplo n.º 4
0
 private function findBrandBySVName($brand_sv)
 {
     return Brands::where('sv_name', $brand_sv)->get()->first();
 }
Ejemplo n.º 5
0
 private function getBrand($brand_slug)
 {
     return Brands::where('slug', $brand_slug)->get()->first();
 }