travel/service/app/model/Follows.php

18 lines
390 B
PHP
Raw Normal View History

2024-06-24 11:52:30 +08:00
<?php
namespace app\model;
class Follows extends base
{
public function admin() {
return $this->belongsTo(Admins::class, 'admin_id')->visible(['name','username','avatar']);
}
public function orders() {
return $this->belongsTo(Orders::class, 'order_id');
}
public function getStatusNameAttr(){
return Orders::StatusName[$this->status];
}
}