Pony.fm/app/controllers/Api/Web/TaxonomiesController.php
2013-07-27 23:37:32 -05:00

19 lines
No EOL
485 B
PHP

<?php
namespace Api\Web;
use Entities\Genre;
use Entities\License;
use Entities\ShowSong;
use Entities\TrackType;
class TaxonomiesController extends \ApiControllerBase {
public function getAll() {
return \Response::json([
'licenses' => License::all()->toArray(),
'genres' => Genre::orderBy('name')->get()->toArray(),
'track_types' => TrackType::all()->toArray(),
'show_songs' => ShowSong::select('title', 'id', 'slug')->get()->toArray()
], 200);
}
}