public function stations_select()
 {
     $stations = Station::lists('nombre', 'id');
     return response()->json($stations);
 }
Example #2
0
 public function validarNoRepit($text)
 {
     $brands = Station::where('nombre', '=', $text)->orWhere('shortname', '=', $text)->first();
     return $brands;
 }