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.

17 lines
345 B
PHTML

2 years ago
<?php
namespace App\Scopes;
trait UserScopes
{
public function scopeOfConditions($query, $params)
{
if (!empty($params['account'])) {
$query->where('account', $params['account']);
}
if (!empty($params['id'])) {
$query->where('id', $params['id']);
}
return $query;
}
}