$
$ : string
name
Class CoverConfig.
<?php
/**
* JingYao-backend
*
* @link https://gitee.com/wang-zhihui-release/jingyao-backend
* @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* Class CoverConfig.
* @property string name
* @property string image_path
*/
class CoverConfig extends Model
{
use HasFactory;
protected $guarded = [];
public function getImagePathAttribute($value)
{
if (substr($value, 0, 4) != 'http') {
return config('app.url') . $value;
}
return $value;
}
}