[WIP] Setup of skeleton

This commit is contained in:
Ludovic CANDELLIER
2020-03-25 00:08:27 +01:00
parent baf8e13c25
commit 36267139a1
377 changed files with 18248 additions and 26 deletions

View File

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