the browser-facing portion of osu!
at master 26 lines 596 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6namespace App\Models; 7 8use App\Transformers\GenreTransformer; 9 10/** 11 * @property int $genre_id 12 * @property string $name 13 */ 14class Genre extends Model 15{ 16 protected $table = 'osu_genres'; 17 protected $primaryKey = 'genre_id'; 18 public $timestamps = false; 19 20 const UNSPECIFIED = 1; 21 22 public static function listing() 23 { 24 return json_collection(static::all(), new GenreTransformer()); 25 } 26}