Pony.fm/app/controllers/Api/Web/TaxonomiesController.php

19 lines
485 B
PHP
Raw Normal View History

2013-07-25 23:33:04 +02:00
<?php
namespace Api\Web;
use Entities\Genre;
use Entities\License;
2013-07-28 06:37:32 +02:00
use Entities\ShowSong;
2013-07-25 23:33:04 +02:00
use Entities\TrackType;
class TaxonomiesController extends \ApiControllerBase {
public function getAll() {
return \Response::json([
'licenses' => License::all()->toArray(),
'genres' => Genre::orderBy('name')->get()->toArray(),
2013-07-28 06:37:32 +02:00
'track_types' => TrackType::all()->toArray(),
'show_songs' => ShowSong::select('title', 'id', 'slug')->get()->toArray()
2013-07-25 23:33:04 +02:00
], 200);
}
}