public function index()
 {
     $estadios = Estadio::all();
     return $estadios->toJson();
 }
Example #2
0
 /**
  * 
  * @return a list of objects.
  */
 public static function listByFullName($estadio_id = '')
 {
     if ($estadio_id != '') {
         $items = Estadio::where('id', $estadio_id)->get();
     } else {
         $items = Estadio::all();
     }
     $key = 'id';
     $value = 'full_name';
     return Estadio::getListFields($items, $key, $value);
 }