wip
This commit is contained in:
1 parent
3072012c07
commit
2cb88a4290
12 files changed
+170
-156
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user