Пример #1
0
 public function brands_select()
 {
     $brands = Brand::lists('nombre', 'id');
     return response()->json($brands);
 }
Пример #2
0
 public function validarNoRepit($text)
 {
     $brands = Brand::where('nombre', '=', $text)->orWhere('shortname', '=', $text)->first();
     return $brands;
 }