[WIP] Fix ergonomics rules

This commit is contained in:
Ludovic CANDELLIER
2020-03-30 00:48:17 +02:00
parent 36267139a1
commit cd9b6ea74c
106 changed files with 1392 additions and 747 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Models\Core\Auth;
use Illuminate\Database\Eloquent\Model;
class TeamUser extends Model
{
protected $table = 'team_user';
protected $connection = 'mysql';
public function user()
{
return $this->belongsTo('App\Models\Core\Auth\User');
}
public function team()
{
return $this->belongsTo('App\Models\Core\Auth\Team');
}
public function scopeByUser($query, $id)
{
return $query->where('user_id', $id);
}
public function scopeByTeam($query, $id)
{
return $query->where('team_id', $id);
}
}