Files
ProxyPanel/app/Models/Marketing.php
BrettonYe 4cfb0b4650 💪🏼 Improve Code
2024-06-27 22:18:26 +08:00

29 lines
536 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
/**
* 营销
*/
class Marketing extends Model
{
protected $table = 'marketing';
protected $guarded = [];
protected function statusLabel(): Attribute
{
return Attribute::make(
get: fn () => match ($this->status) {
-1 => '失败',
0 => '待推送',
1 => '成功',
default => '',
},
);
}
}