Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
pad-upe
Commits
a12bc6ba
Commit
a12bc6ba
authored
Jun 29, 2022
by
alissonalbuquerque
Browse files
add refatoração
parent
da9a7128
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
a12bc6ba
...
...
@@ -8,6 +8,7 @@ use App\Models\PAD;
use
App\Models\Tabelas\Constants
;
use
App\Models\User
;
use
App\Models\UserPad
;
use
App\Models\Util\MenuItemsAdmin
;
use
Database\Seeders\PadSeeder
;
use
Exception
;
use
Illuminate\Support\Facades\Auth
;
...
...
@@ -26,7 +27,8 @@ class PadController extends Controller
{
if
(
Auth
::
user
()
->
isTypeAdmin
())
{
$pads
=
Pad
::
all
();
return
view
(
'pad.admin.index'
,
[
'pads'
=>
$pads
]);
$index_menu
=
MenuItemsAdmin
::
PADS
;
return
view
(
'pad.admin.index'
,
[
'index_menu'
=>
$index_menu
,
'pads'
=>
$pads
]);
}
if
(
Auth
::
user
()
->
isTypeTeacher
())
{
...
...
app/Models/Util/MenuItemsAdmin.php
View file @
a12bc6ba
...
...
@@ -11,4 +11,5 @@ class MenuItemsAdmin
const
UNIDADES
=
3
;
const
DIRETORES
=
4
;
const
COORDENADORES
=
5
;
const
PADS
=
6
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment