the browser-facing portion of osu!
at master 709 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 8/** 9 * @property \Carbon\Carbon|null $awarded 10 * @property string $description 11 * @property string $image 12 * @property string $url 13 * @property int $user_id 14 */ 15class UserBadge extends Model 16{ 17 public $incrementing = false; 18 public $timestamps = false; 19 20 protected $casts = ['awarded' => 'datetime']; 21 protected $primaryKey = 'user_id'; 22 protected $table = 'osu_badges'; 23 24 public function imageUrl() 25 { 26 return "https://assets.ppy.sh/profile-badges/{$this->image}"; 27 } 28}