更新代码
This commit is contained in:
20
app/Models/Team.php
Normal file
20
app/Models/Team.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\User;
|
||||
|
||||
class Team extends Model
|
||||
{
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class)->withDefault();
|
||||
}
|
||||
|
||||
protected function getTypeTextAttribute()
|
||||
{
|
||||
return $this->status == 'alliance' ? "联盟" : "代理";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user