You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
501 B
PHTML
19 lines
501 B
PHTML
2 years ago
|
<?php
|
||
|
|
||
|
namespace App\Scopes;
|
||
|
|
||
|
trait GameScopes
|
||
|
{
|
||
|
public function scopeOfConditions($query, $params)
|
||
|
{
|
||
|
if (!empty($params['relation_game_id'])) {
|
||
|
$query->where('relation_game_id', $params['relation_game_id']);
|
||
|
}
|
||
|
if (!empty($params['base_game_id'])) {
|
||
|
$query->where('base_game_id', $params['base_game_id']);
|
||
|
}
|
||
|
if (!empty($params['sdk_version'])) {
|
||
|
$query->where('sdk_version', $params['sdk_version']);
|
||
|
}
|
||
|
}
|
||
|
}
|