Add new version in repository
This commit is contained in:
32
app/Models/Core/Auth/UserStatus.php
Normal file
32
app/Models/Core/Auth/UserStatus.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace App\Models\Core\Auth;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserStatus extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
protected $guarded = [];
|
||||
protected $table = "user_statuses";
|
||||
public $timestamps = false;
|
||||
|
||||
public function scopeByName($query, $name)
|
||||
{
|
||||
return $query->where('name', $name);
|
||||
}
|
||||
|
||||
public function scopeByTranslated($query, $translated)
|
||||
{
|
||||
return $query->where('translated', $translated);
|
||||
}
|
||||
|
||||
public function scopeByNegociator($query)
|
||||
{
|
||||
return $query->where('negociator', '>', 0);
|
||||
}
|
||||
|
||||
public function scopeActive($query)
|
||||
{
|
||||
return $query->where('active', 1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user