Merge branch 'master' into v3.0

This commit is contained in:
Darko Gjorgjijoski
2026-04-03 14:36:24 +02:00
15 changed files with 94 additions and 17 deletions

View File

@@ -218,6 +218,13 @@ class User extends Authenticatable implements HasMedia
return $query->where('email', 'LIKE', '%'.$email.'%');
}
public function scopeWhereCompany($query)
{
return $query->whereHas('companies', function ($q) {
$q->where('company_id', request()->header('company'));
});
}
public function scopePaginateData($query, $limit)
{
if ($limit == 'all') {