From 1ea744aec2ef5b199c61bc6c48c4056e6cfa3e2f Mon Sep 17 00:00:00 2001 From: "Luiz H. Tanaka" Date: Thu, 14 Sep 2023 00:10:24 -0400 Subject: [PATCH] corrigindo conteudo da tela de administracao --- app/Providers/AuthServiceProvider.php | 4 ++++ resources/views/site/layout/lista-leads.blade.php | 2 +- resources/views/site/layout/master-dashboard.blade.php | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 635fc7d..d6c9db2 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -25,5 +25,9 @@ public function boot(): void Gate::define('access', function(User $user){ return $user->access_level == 'admin'; }); + + Gate::define('access_parceiro', function(User $user){ + return $user->access_level == 'user'; + }); } } diff --git a/resources/views/site/layout/lista-leads.blade.php b/resources/views/site/layout/lista-leads.blade.php index 24715d7..2f29b32 100644 --- a/resources/views/site/layout/lista-leads.blade.php +++ b/resources/views/site/layout/lista-leads.blade.php @@ -27,7 +27,7 @@ Link de Divulgação
- {{ route('site.home') }}?resource={{$user->codigo}} + {{ route('site.home') }}?resource={{$user->codigo}}
diff --git a/resources/views/site/layout/master-dashboard.blade.php b/resources/views/site/layout/master-dashboard.blade.php index 941ba39..c269c77 100644 --- a/resources/views/site/layout/master-dashboard.blade.php +++ b/resources/views/site/layout/master-dashboard.blade.php @@ -235,9 +235,9 @@ - - @include('site.layout.lista-leads') - + @can('access_parceiro') + @include('site.layout.lista-leads') + @endcan @can('access')