Файловый менеджер - Редактировать - /home/clickysoft/public_html/app/Models/Scopes/UserOrganization.php
Назад
<?php namespace App\Models\Scopes; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Scope; class UserOrganization implements Scope { /** * Apply the scope to a given Eloquent query builder. */ public function apply(Builder $builder, Model $model): void { if (auth()->user()) { $builder->where(function ($query) { $query->where('organization_id', auth()->user()->organization_id); }); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка