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
db00ba1a
Commit
db00ba1a
authored
Apr 12, 2023
by
victorMendes18
Browse files
tela de professores
parent
51d62438
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/PadController.php
View file @
db00ba1a
...
@@ -38,6 +38,7 @@ use App\Models\Util\Menu;
...
@@ -38,6 +38,7 @@ use App\Models\Util\Menu;
use
App\Models\Util\MenuItemsAdmin
;
use
App\Models\Util\MenuItemsAdmin
;
use
App\Models\Util\MenuItemsTeacher
;
use
App\Models\Util\MenuItemsTeacher
;
use
App\Models\Util\Status
;
use
App\Models\Util\Status
;
use
App\Models\Util\MenuItemsAvaliador
;
use
Database\Seeders\PadSeeder
;
use
Database\Seeders\PadSeeder
;
use
Exception
;
use
Exception
;
use
Illuminate\Support\Facades\Auth
;
use
Illuminate\Support\Facades\Auth
;
...
@@ -282,6 +283,8 @@ class PadController extends Controller
...
@@ -282,6 +283,8 @@ class PadController extends Controller
public
function
professores
(
$id
)
public
function
professores
(
$id
)
{
{
$user
=
Auth
::
user
();
$user
=
Auth
::
user
();
$pad
=
Pad
::
find
(
$id
);
$index_menu
=
MenuItemsAvaliador
::
HOME
;
$professores
=
User
::
join
(
'user_pad'
,
'user_pad.user_id'
,
'='
,
'users.id'
)
$professores
=
User
::
join
(
'user_pad'
,
'user_pad.user_id'
,
'='
,
'users.id'
)
->
join
(
'pad'
,
'user_pad.pad_id'
,
'='
,
'pad.id'
)
->
join
(
'pad'
,
'user_pad.pad_id'
,
'='
,
'pad.id'
)
->
where
(
function
(
$query
)
use
(
$user
,
$id
)
{
->
where
(
function
(
$query
)
use
(
$user
,
$id
)
{
...
@@ -293,6 +296,6 @@ class PadController extends Controller
...
@@ -293,6 +296,6 @@ class PadController extends Controller
->
select
(
'users.id'
,
'users.name'
)
->
select
(
'users.id'
,
'users.name'
)
->
get
();
->
get
();
dd
(
$professores
);
return
view
(
"pad.avaliacao.professores"
,
compact
(
'professores'
,
'pad'
,
'index_menu'
)
);
}
}
}
}
resources/views/pad/avaliacao/professores.blade.php
0 → 100644
View file @
db00ba1a
@
extends
(
'layouts.main'
)
@
section
(
'title'
,
'Campus'
)
@
section
(
'header'
)
@
include
(
'layouts.header'
,
[
'user'
=>
Auth
::
user
(),
])
@
endsection
@
section
(
'nav'
)
@
include
(
'layouts.navigation'
,
[
'index_menu'
=>
$index_menu
,
])
@
endsection
@
section
(
'body'
)
@
include
(
'components.alerts'
)
<
div
class
=
"d-flex justify-content-between align-items-center border-bottom"
>
<
h2
class
=
""
>
PADs
</
h2
>
</
div
>
<!--
Tabela
-->
<
div
class
=
"table-responsive mt-5"
>
<
table
class
=
"table table-hover table-striped"
>
<
thead
class
=
"thead-dark"
>
<
tr
>
<
th
scope
=
"col"
>
Professor
</
th
>
<
th
scope
=
"col"
>
Opções
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$professores
as
$professor
)
<
tr
>
<
td
>
{{
$professor
->
name
}}
</
td
>
<
td
>
@
include
(
'components.buttons.btn-avaliar'
,
[
'route'
=>
route
(
'avaliador_avaliar'
),
'class'
=>
''
,
'content'
=>
'Avaliar'
,
'id'
=>
''
,
])
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
@
endsection
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