This commit is contained in:
salam committed 2025-09-09 18:01:53 +02:00
1 parent 3072012c07
commit 2cb88a4290
12 files changed
+170 -156

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\Models\Scopes;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
class KontoScope implements Scope
{
/**
* Apply the scope to a given Eloquent query builder.
*/
public function apply(Builder $builder, Model $model): void
{
$builder->where('konto_id', auth()->user()->konto_id);
}
}