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
649fe47c
Commit
649fe47c
authored
Jun 29, 2020
by
Gabriel-31415
Browse files
add novo admin
parent
0b2ea19b
Changes
4
Hide whitespace changes
Inline
Side-by-side
database/migrations/2020_05_20_163253_create_administradors_table.php
View file @
649fe47c
...
@@ -15,8 +15,6 @@ class CreateAdministradorsTable extends Migration
...
@@ -15,8 +15,6 @@ class CreateAdministradorsTable extends Migration
{
{
Schema
::
create
(
'administradors'
,
function
(
Blueprint
$table
)
{
Schema
::
create
(
'administradors'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'matricula'
)
->
unique
();
$table
->
timestamps
();
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
unsignedBigInteger
(
'user_id'
);
...
...
database/seeds/AdministradorSeeder.php
View file @
649fe47c
...
@@ -15,8 +15,15 @@ class AdministradorSeeder extends Seeder
...
@@ -15,8 +15,15 @@ class AdministradorSeeder extends Seeder
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Administrador'
)
->
pluck
(
'id'
);
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Administrador'
)
->
pluck
(
'id'
);
DB
::
table
(
'administradors'
)
->
insert
([
DB
::
table
(
'administradors'
)
->
insert
([
'matricula'
=>
'123456789'
,
'user_id'
=>
$user_id
[
0
],
'user_id'
=>
$user_id
[
0
],
]);
]);
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Comitê do PIBIC'
)
->
pluck
(
'id'
);
DB
::
table
(
'administradors'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
]);
}
}
}
}
database/seeds/UsuarioSeeder.php
View file @
649fe47c
...
@@ -21,6 +21,14 @@ class UsuarioSeeder extends Seeder
...
@@ -21,6 +21,14 @@ class UsuarioSeeder extends Seeder
'tipo'
=>
'administrador'
,
'tipo'
=>
'administrador'
,
'email_verified_at'
=>
'2020-01-01'
'email_verified_at'
=>
'2020-01-01'
]);
]);
DB
::
table
(
'users'
)
->
insert
([
'name'
=>
'Comitê do PIBIC'
,
'email'
=>
'ciic.pibic.uag@gmail.com'
,
'password'
=>
Hash
::
make
(
'12345678'
),
'tipo'
=>
'administrador'
,
'email_verified_at'
=>
'2020-01-01'
]);
DB
::
table
(
'users'
)
->
insert
([
DB
::
table
(
'users'
)
->
insert
([
...
...
resources/views/administrador/novo_user.blade.php
View file @
649fe47c
...
@@ -277,7 +277,7 @@
...
@@ -277,7 +277,7 @@
<
div
class
=
"row justify-content-center"
style
=
"margin: 20px 0 20px 0"
>
<
div
class
=
"row justify-content-center"
style
=
"margin: 20px 0 20px 0"
>
<
div
class
=
"col-md-6"
style
=
"padding-left:0"
>
<
div
class
=
"col-md-6"
style
=
"padding-left:0"
>
<
a
class
=
"btn btn-secondary botao-form"
href
=
"
/
"
style
=
"width:100%"
>
Cancelar
Cadastro
</
a
>
<
a
class
=
"btn btn-secondary botao-form"
href
=
"
{{ route('home') }}
"
style
=
"width:100%"
>
Cancelar
Cadastro
</
a
>
</
div
>
</
div
>
<
div
class
=
"col-md-6"
style
=
"padding-right:0"
>
<
div
class
=
"col-md-6"
style
=
"padding-right:0"
>
<
button
type
=
"submit"
class
=
"btn btn-primary botao-form"
style
=
"width:100%"
>
<
button
type
=
"submit"
class
=
"btn btn-primary botao-form"
style
=
"width:100%"
>
...
...
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