jingcai-php/app/Model/Zq/ZqCompetition.php

26 lines
451 B
PHP
Executable File

<?php
namespace App\Model\Zq;
use App\Model\BaseModel;
use App\Service\JingcaiLogoService;
class ZqCompetition extends BaseModel
{
protected $casts = [
'seasons' => 'array',
];
protected $appends = [
'logo_url'
];
public function getLogoUrlAttribute()
{
if (!$this->competition_id) {
return '';
}
return JingcaiLogoService::zqCompetition($this->competition_id);
}
}