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