0
0

更新代码

This commit is contained in:
2020-08-04 10:09:42 +08:00
parent 6118b5b63b
commit c2ac5d964e
478 changed files with 34410 additions and 0 deletions

24
app/Models/Agency.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use App\User;
class Agency extends Model
{
public function user()
{
return $this->belongsTo(User::class)->withDefault();
}
//业务员
public function salesman()
{
return $this->belongsTo(User::class, 'salesman_id', 'id')->withDefault();
}
protected function getStatusTextAttribute()
{
return $this->status == 1 ? "<span style='color:green'>正常</span>" : "<span style='color:red'>关闭</span>";
}
}