mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
medal add priority
This commit is contained in:
@@ -18,7 +18,7 @@ class Medal extends NexusModel
|
||||
protected $fillable = [
|
||||
'name', 'description', 'image_large', 'image_small', 'price', 'duration', 'get_type',
|
||||
'display_on_medal_page', 'sale_begin_time', 'sale_end_time', 'inventory', 'bonus_addition_factor',
|
||||
'gift_fee_factor',
|
||||
'gift_fee_factor', 'priority'
|
||||
];
|
||||
|
||||
public $timestamps = true;
|
||||
@@ -48,6 +48,11 @@ class Medal extends NexusModel
|
||||
return nexus_trans("medal.get_types." . $this->get_type);
|
||||
}
|
||||
|
||||
public function getInventoryTextAttribute(): string
|
||||
{
|
||||
return $this->inventory ?? nexus_trans("label.infinite");
|
||||
}
|
||||
|
||||
public function getDurationTextAttribute($value): string
|
||||
{
|
||||
if ($this->duration > 0) {
|
||||
|
||||
Reference in New Issue
Block a user