mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-19 19:24:03 +00:00
Move Bouncer DefaultScope from app/Bouncer to app/Support/BouncerDefaultScope
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use App\Bouncer\Scopes\DefaultScope;
|
|
||||||
use App\Policies\CompanyPolicy;
|
use App\Policies\CompanyPolicy;
|
||||||
use App\Policies\CustomerPolicy;
|
use App\Policies\CustomerPolicy;
|
||||||
use App\Policies\DashboardPolicy;
|
use App\Policies\DashboardPolicy;
|
||||||
@@ -20,6 +19,7 @@ use App\Policies\RolePolicy;
|
|||||||
use App\Policies\SettingsPolicy;
|
use App\Policies\SettingsPolicy;
|
||||||
use App\Policies\UserPolicy;
|
use App\Policies\UserPolicy;
|
||||||
use App\Services\Installation\InstallUtils;
|
use App\Services\Installation\InstallUtils;
|
||||||
|
use App\Support\BouncerDefaultScope;
|
||||||
use Gate;
|
use Gate;
|
||||||
use Illuminate\Support\Facades\Broadcast;
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
@@ -78,7 +78,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function register(): void
|
public function register(): void
|
||||||
{
|
{
|
||||||
BouncerModels::scope(new DefaultScope);
|
BouncerModels::scope(new BouncerDefaultScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addMenus()
|
public function addMenus()
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Bouncer\Scopes;
|
namespace App\Support;
|
||||||
|
|
||||||
use Silber\Bouncer\Database\Scope\Scope;
|
use Silber\Bouncer\Database\Scope\Scope;
|
||||||
|
|
||||||
class DefaultScope extends Scope
|
class BouncerDefaultScope extends Scope
|
||||||
{
|
{
|
||||||
public function applyToModelQuery($query, $table = null)
|
public function applyToModelQuery($query, $table = null)
|
||||||
{
|
{
|
||||||
Reference in New Issue
Block a user