$
$ : string
flow_register_code
<?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;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class PassCard.
* @property string flow_register_code
* @property string pass_card_photo
* @property string check_message
* @property int check_status
* @property int user_id
*/
class PassCard extends Model
{
use HasFactory;
use SoftDeletes;
protected $guarded = [];
public function getPassCardPhotoAttribute($value)
{
if (substr($value, 0, 4) != 'http') {
return config('app.url') . $value;
}
return $value;
}
public function user()
{
return $this->belongsTo(User::class);
}
}