Add new version in repository
This commit is contained in:
32
app/Models/Core/Auth/UserStatusTeam.php
Normal file
32
app/Models/Core/Auth/UserStatusTeam.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace App\Models\Core\Auth;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserStatusTeam extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
protected $guarded = [];
|
||||
protected $table = "user_status_teams";
|
||||
public $timestamps = false;
|
||||
|
||||
public function user_status()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\Core\Auth\UserStatus::class);
|
||||
}
|
||||
|
||||
public function team()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\Core\Auth\Team::class);
|
||||
}
|
||||
|
||||
public function scopeByUserStatus($query, $id)
|
||||
{
|
||||
return $query->where('user_status_id', $id);
|
||||
}
|
||||
|
||||
public function scopeByTeam($query, $id)
|
||||
{
|
||||
return $query->where('team_id', $id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user