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
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/HomeController.php
View file @
8fcd22b8
...
...
@@ -27,7 +27,7 @@ class HomeController extends Controller
public
function
index
()
{
$eventos
=
\
App\Evento
::
all
();
if
(
Auth
::
check
()){
if
(
Auth
::
user
()
->
administradors
!=
null
){
return
view
(
'administrador.index'
);
}
...
...
@@ -45,11 +45,10 @@ class HomeController extends Controller
}
else
if
(
Auth
::
user
()
->
participantes
!=
null
)
{
return
view
(
'participante.index'
);
}
}
Log
::
debug
(
'HomeController'
);
}
else
{
return
view
(
'index'
,
[
'eventos'
=>
$eventos
]);
}
}
public
function
downloadArquivo
(
Request
$request
){
return
Storage
::
download
(
$request
->
file
);
...
...
app/Http/Controllers/SubAreaController.php
View file @
8fcd22b8
...
...
@@ -112,6 +112,6 @@ class SubAreaController extends Controller
$id
=
json_decode
(
$request
->
id
)
;
$subAreas
=
SubArea
::
where
(
'area_id'
,
$id
)
->
orderBy
(
'nome'
)
->
get
();
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
return
view
(
'index'
,
[
'eventos'
=>
$eventos
,
'hoje'
=>
$hoje
]);
//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
(){
...
...
database/seeds/AreaSeeder.php
View file @
8fcd22b8
...
...
@@ -11,6 +11,7 @@ class AreaSeeder extends Seeder
*/
public
function
run
()
{
// Ciências Exatas e da Terra 1
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Matemática'
,
'grande_area_id'
=>
'1'
...
...
@@ -51,7 +52,7 @@ class AreaSeeder extends Seeder
'grande_area_id'
=>
'1'
]);
// Ciências Biológicas ----------------------
// Ciências Biológicas
2
----------------------
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Biologia Geral'
,
...
...
database/seeds/DatabaseSeeder.php
View file @
8fcd22b8
...
...
@@ -15,7 +15,7 @@ class DatabaseSeeder extends Seeder
$this
->
call
(
UsuarioSeeder
::
class
);
$this
->
call
(
AdministradorSeeder
::
class
);
$this
->
call
(
AdministradorResponsavelSeeder
::
class
);
//
$this->call(ProponenteSeeder::class);
$this
->
call
(
ProponenteSeeder
::
class
);
$this
->
call
(
GrandeAreaSeeder
::
class
);
$this
->
call
(
AreaSeeder
::
class
);
$this
->
call
(
SubAreaSeeder
::
class
);
...
...
database/seeds/GrandeAreaSeeder.php
View file @
8fcd22b8
...
...
@@ -11,27 +11,35 @@ class GrandeAreaSeeder extends Seeder
*/
public
function
run
()
{
//1
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Exatas e da Terra'
,
]);
//2
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Biológicas'
,
]);
//3
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Engenharias'
,
]);
//4
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências da Saúde '
,
]);
//5
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Agrárias'
,
]);
//6
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Sociais Aplicadas'
,
]);
//7
DB
::
table
(
'grande_areas'
)
->
insert
([
'nome'
=>
'Ciências Humanas'
,
]);
//8
DB
::
table
(
'grande_areas'
)
->
insert
([
'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 @@
<nav
class=
"navbar navbar-light backgroud-color-default shadow"
>
<div
class=
"container"
>
<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=
""
>
</a>
</div>
...
...
routes/web.php
View file @
8fcd22b8
...
...
@@ -13,6 +13,7 @@
Route
::
get
(
'/'
,
'UserController@index'
)
->
name
(
'home-user'
);
Route
::
get
(
'/'
,
'UserController@inicial'
)
->
name
(
'inicial'
);
Route
::
get
(
'/home'
,
'HomeController@index'
)
->
name
(
'home'
)
->
middleware
(
'verified'
);
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