18 lines
390 B
PHP
18 lines
390 B
PHP
<?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];
|
|
}
|
|
} |