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
8fcd22b8
Unverified
Commit
8fcd22b8
authored
Jun 25, 2020
by
Gabriel Antônio da Silva
Committed by
GitHub
Jun 25, 2020
Browse files
Merge pull request #40 from lmts-ufape/fixbugs
ajuste nos seeds de area e subarea
parents
95d3fc62
5a869d71
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/HomeController.php
View file @
8fcd22b8
...
@@ -27,7 +27,7 @@ class HomeController extends Controller
...
@@ -27,7 +27,7 @@ class HomeController extends Controller
public
function
index
()
public
function
index
()
{
{
$eventos
=
\
App\Evento
::
all
();
$eventos
=
\
App\Evento
::
all
();
if
(
Auth
::
check
()){
if
(
Auth
::
user
()
->
administradors
!=
null
){
if
(
Auth
::
user
()
->
administradors
!=
null
){
return
view
(
'administrador.index'
);
return
view
(
'administrador.index'
);
}
}
...
@@ -45,10 +45,9 @@ class HomeController extends Controller
...
@@ -45,10 +45,9 @@ class HomeController extends Controller
}
}
else
if
(
Auth
::
user
()
->
participantes
!=
null
)
{
else
if
(
Auth
::
user
()
->
participantes
!=
null
)
{
return
view
(
'participante.index'
);
return
view
(
'participante.index'
);
}
}
else
{
}
return
view
(
'index'
,
[
'eventos'
=>
$eventos
]);
Log
::
debug
(
'HomeController'
);
}
return
view
(
'index'
,
[
'eventos'
=>
$eventos
]);
}
}
public
function
downloadArquivo
(
Request
$request
){
public
function
downloadArquivo
(
Request
$request
){
...
...
app/Http/Controllers/SubAreaController.php
View file @
8fcd22b8
...
@@ -112,6 +112,6 @@ class SubAreaController extends Controller
...
@@ -112,6 +112,6 @@ class SubAreaController extends Controller
$id
=
json_decode
(
$request
->
id
)
;
$id
=
json_decode
(
$request
->
id
)
;
$subAreas
=
SubArea
::
where
(
'area_id'
,
$id
)
->
orderBy
(
'nome'
)
->
get
();
$subAreas
=
SubArea
::
where
(
'area_id'
,
$id
)
->
orderBy
(
'nome'
)
->
get
();
return
response
()
->
json
(
$subAreas
);
return
response
()
->
json
(
$subAreas
);
return
$subAreas
->
toJson
();
//
return $subAreas->toJson();
}
}
}
}
app/Http/Controllers/UserController.php
View file @
8fcd22b8
...
@@ -35,6 +35,15 @@ class UserController extends Controller
...
@@ -35,6 +35,15 @@ class UserController extends Controller
return
view
(
'index'
,
[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
]);
return
view
(
'index'
,
[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
]);
//return view('auth.login');
//return view('auth.login');
}
}
public
function
inicial
()
{
$eventos
=
Evento
::
all
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'index'
,
[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
]);
//return view('auth.login');
}
function
perfil
(){
function
perfil
(){
...
...
database/seeds/AreaSeeder.php
View file @
8fcd22b8
...
@@ -11,6 +11,7 @@ class AreaSeeder extends Seeder
...
@@ -11,6 +11,7 @@ class AreaSeeder extends Seeder
*/
*/
public
function
run
()
public
function
run
()
{
{
// Ciências Exatas e da Terra 1
DB
::
table
(
'areas'
)
->
insert
([
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Matemática'
,
'nome'
=>
'Matemática'
,
'grande_area_id'
=>
'1'
'grande_area_id'
=>
'1'
...
@@ -51,7 +52,7 @@ class AreaSeeder extends Seeder
...
@@ -51,7 +52,7 @@ class AreaSeeder extends Seeder
'grande_area_id'
=>
'1'
'grande_area_id'
=>
'1'
]);
]);
// Ciências Biológicas ----------------------
// Ciências Biológicas
2
----------------------
DB
::
table
(
'areas'
)
->
insert
([
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Biologia Geral'
,
'nome'
=>
'Biologia Geral'
,
...
...
database/seeds/DatabaseSeeder.php
View file @
8fcd22b8
...
@@ -15,7 +15,7 @@ class DatabaseSeeder extends Seeder
...
@@ -15,7 +15,7 @@ class DatabaseSeeder extends Seeder
$this
->
call
(
UsuarioSeeder
::
class
);
$this
->
call
(
UsuarioSeeder
::
class
);
$this
->
call
(
AdministradorSeeder
::
class
);
$this
->
call
(
AdministradorSeeder
::
class
);
$this
->
call
(
AdministradorResponsavelSeeder
::
class
);
$this
->
call
(
AdministradorResponsavelSeeder
::
class
);
//
$this->call(ProponenteSeeder::class);
$this
->
call
(
ProponenteSeeder
::
class
);
$this
->
call
(
GrandeAreaSeeder
::
class
);
$this
->
call
(
GrandeAreaSeeder
::
class
);
$this
->
call
(
AreaSeeder
::
class
);
$this
->
call
(
AreaSeeder
::
class
);
$this
->
call
(
SubAreaSeeder
::
class
);
$this
->
call
(
SubAreaSeeder
::
class
);
...
...
database/seeds/GrandeAreaSeeder.php
View file @
8fcd22b8
...
@@ -11,27 +11,35 @@ class GrandeAreaSeeder extends Seeder
...
@@ -11,27 +11,35 @@ class GrandeAreaSeeder extends Seeder
*/
*/
public
function
run
()
public
function
run
()
{
{
//1
DB
::
table
(
'grande_areas'
)
->
insert
([
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Exatas e da Terra'
,
'nome'
=>
'Ciências Exatas e da Terra'
,
]);
]);
//2
DB
::
table
(
'grande_areas'
)
->
insert
([
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Biológicas'
,
'nome'
=>
'Ciências Biológicas'
,
]);
]);
//3
DB
::
table
(
'grande_areas'
)
->
insert
([
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Engenharias'
,
'nome'
=>
'Engenharias'
,
]);
]);
//4
DB
::
table
(
'grande_areas'
)
->
insert
([
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências da Saúde '
,
'nome'
=>
'Ciências da Saúde '
,
]);
]);
//5
DB
::
table
(
'grande_areas'
)
->
insert
([
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Agrárias'
,
'nome'
=>
'Ciências Agrárias'
,
]);
]);
//6
DB
::
table
(
'grande_areas'
)
->
insert
([
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Sociais Aplicadas'
,
'nome'
=>
'Ciências Sociais Aplicadas'
,
]);
]);
//7
DB
::
table
(
'grande_areas'
)
->
insert
([
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Humanas'
,
'nome'
=>
'Ciências Humanas'
,
]);
]);
//8
DB
::
table
(
'grande_areas'
)
->
insert
([
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Lingüística, Letras e Artes'
,
'nome'
=>
'Lingüística, Letras e Artes'
,
]);
]);
...
...
database/seeds/SubAreaSeeder.php
View file @
8fcd22b8
This diff is collapsed.
Click to expand it.
resources/views/layouts/app.blade.php
View file @
8fcd22b8
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
<nav
class=
"navbar navbar-light backgroud-color-default shadow"
>
<nav
class=
"navbar navbar-light backgroud-color-default shadow"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"links-menu"
>
<div
class=
"links-menu"
>
<a
class=
"navbar-brand"
href=
"{{route('
home-user
')}}"
>
<a
class=
"navbar-brand"
href=
"{{route('
inicial
')}}"
>
<img
id=
"logo-menu"
src=
"{{ asset('img/icons/logo_submeta_pemenor.png') }}"
alt=
""
>
<img
id=
"logo-menu"
src=
"{{ asset('img/icons/logo_submeta_pemenor.png') }}"
alt=
""
>
</a>
</a>
</div>
</div>
...
...
routes/web.php
View file @
8fcd22b8
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
Route
::
get
(
'/'
,
'UserController@index'
)
->
name
(
'home-user'
);
Route
::
get
(
'/'
,
'UserController@index'
)
->
name
(
'home-user'
);
Route
::
get
(
'/'
,
'UserController@inicial'
)
->
name
(
'inicial'
);
Route
::
get
(
'/home'
,
'HomeController@index'
)
->
name
(
'home'
)
->
middleware
(
'verified'
);
Route
::
get
(
'/home'
,
'HomeController@index'
)
->
name
(
'home'
)
->
middleware
(
'verified'
);
Route
::
get
(
'/evento/visualizar/naologado/{id}'
,
'EventoController@showNaoLogado'
)
->
name
(
'evento.visualizarNaoLogado'
);
Route
::
get
(
'/evento/visualizar/naologado/{id}'
,
'EventoController@showNaoLogado'
)
->
name
(
'evento.visualizarNaoLogado'
);
...
...
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