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
submeta
Commits
0f886707
Commit
0f886707
authored
Oct 30, 2021
by
Guilherme Silva
Browse files
Ordenando listagens por seus nomes ou titulos
parent
4b0f1d1a
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
0f886707
...
@@ -44,7 +44,7 @@ class AdministradorController extends Controller
...
@@ -44,7 +44,7 @@ class AdministradorController extends Controller
public
function
editais
(){
public
function
editais
(){
//$admin = Administrador::with('user')->where('user_id', Auth()->user()->id)->first();
//$admin = Administrador::with('user')->where('user_id', Auth()->user()->id)->first();
//$eventos = Evento::where('coordenadorId',$admin->id )->get();
//$eventos = Evento::where('coordenadorId',$admin->id )->get();
$eventos
=
Evento
::
all
();
$eventos
=
Evento
::
all
()
->
sortBy
(
'nome'
)
;
return
view
(
'administrador.editais'
,
[
'eventos'
=>
$eventos
]);
return
view
(
'administrador.editais'
,
[
'eventos'
=>
$eventos
]);
}
}
...
@@ -63,7 +63,7 @@ class AdministradorController extends Controller
...
@@ -63,7 +63,7 @@ class AdministradorController extends Controller
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$trabalhosSubmetidos
=
$evento
->
trabalhos
->
where
(
'status'
,
'submetido'
);
$trabalhosSubmetidos
=
$evento
->
trabalhos
->
where
(
'status'
,
'submetido'
);
$trabalhosAvaliados
=
$evento
->
trabalhos
->
Where
(
'status'
,
'avaliado'
);
$trabalhosAvaliados
=
$evento
->
trabalhos
->
Where
(
'status'
,
'avaliado'
);
$trabalhos
=
$trabalhosSubmetidos
->
merge
(
$trabalhosAvaliados
);
$trabalhos
=
$trabalhosSubmetidos
->
merge
(
$trabalhosAvaliados
)
->
sortBy
(
'titulo'
)
;
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
// $participantes = Participante::where('trabalho_id', $id)->get();
// $participantes = Participante::where('trabalho_id', $id)->get();
...
...
app/Http/Controllers/EventoController.php
View file @
0f886707
...
@@ -32,7 +32,7 @@ class EventoController extends Controller
...
@@ -32,7 +32,7 @@ class EventoController extends Controller
public
function
index
(
Request
$request
)
public
function
index
(
Request
$request
)
{
{
if
(
$request
->
buscar
==
null
){
if
(
$request
->
buscar
==
null
){
$eventos
=
Evento
::
all
();
$eventos
=
Evento
::
all
()
->
sortBy
(
'nome'
)
;
// $comissaoEvento = ComissaoEvento::all();
// $comissaoEvento = ComissaoEvento::all();
// $eventos = Evento::where('coordenadorId', Auth::user()->id)->get();
// $eventos = Evento::where('coordenadorId', Auth::user()->id)->get();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
Carbon
::
today
(
'America/Recife'
);
...
@@ -51,7 +51,7 @@ class EventoController extends Controller
...
@@ -51,7 +51,7 @@ class EventoController extends Controller
public
function
listar
()
public
function
listar
()
{
{
//
//
$eventos
=
Evento
::
all
();
$eventos
=
Evento
::
all
()
->
sortBy
(
'nome'
)
;
// $comissaoEvento = ComissaoEvento::all();
// $comissaoEvento = ComissaoEvento::all();
// $eventos = Evento::where('coordenadorId', Auth::user()->id)->get();
// $eventos = Evento::where('coordenadorId', Auth::user()->id)->get();
...
...
app/Http/Controllers/ProponenteController.php
View file @
0f886707
...
@@ -105,7 +105,7 @@ class ProponenteController extends Controller
...
@@ -105,7 +105,7 @@ class ProponenteController extends Controller
}
}
public
function
projetosEdital
(
$id
)
{
public
function
projetosEdital
(
$id
)
{
$edital
=
Evento
::
find
(
$id
);
$edital
=
Evento
::
find
(
$id
);
$projetos
=
Trabalho
::
where
(
'evento_id'
,
'='
,
$id
)
->
get
();
$projetos
=
Trabalho
::
where
(
'evento_id'
,
'='
,
$id
)
->
orderBy
(
'titulo'
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
$hoje
=
$hoje
->
toDateString
();
...
...
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