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
d9ff3f1d
Unverified
Commit
d9ff3f1d
authored
May 27, 2020
by
Gabriel Antônio da Silva
Committed by
GitHub
May 27, 2020
Browse files
Merge pull request #2 from lmts-ufape/submeter
Submeter
parents
c5c05b21
20c75a31
Changes
33
Hide whitespace changes
Inline
Side-by-side
app/Avaliador.php
View file @
d9ff3f1d
...
@@ -9,4 +9,7 @@ class Avaliador extends Model
...
@@ -9,4 +9,7 @@ class Avaliador extends Model
public
function
user
(){
public
function
user
(){
return
$this
->
belongsTo
(
'App\User'
);
return
$this
->
belongsTo
(
'App\User'
);
}
}
public
function
trabalhos
(){
return
$this
->
belongsToMany
(
'App\Trabalho'
);
}
}
}
app/CoordenadorComissao.php
View file @
d9ff3f1d
...
@@ -11,7 +11,7 @@ class CoordenadorComissao extends Model
...
@@ -11,7 +11,7 @@ class CoordenadorComissao extends Model
}
}
public
function
editais
(){
public
function
editais
(){
return
$this
->
hasMany
(
'App\Evento'
,
'coordenadorId'
);
return
$this
->
hasMany
(
'App\Evento'
);
}
}
public
function
trabalho
(){
public
function
trabalho
(){
...
...
app/Evento.php
View file @
d9ff3f1d
...
@@ -15,7 +15,7 @@ class Evento extends Model
...
@@ -15,7 +15,7 @@ class Evento extends Model
'nome'
,
'descricao'
,
'tipo'
,
'nome'
,
'descricao'
,
'tipo'
,
'inicioSubmissao'
,
'fimSubmissao'
,
'inicioRevisao'
,
'fimRevisao'
,
'inicioSubmissao'
,
'fimSubmissao'
,
'inicioRevisao'
,
'fimRevisao'
,
'resultado'
,
'coordenadorId'
,
'resultado'
,
'coordenadorId'
,
'numMaxTrabalhos'
,
'numMaxCoautores'
,
'hasResumo'
,
'numMaxTrabalhos'
,
'numMaxCoautores'
,
'hasResumo'
,
'criador_id'
];
];
public
function
endereco
(){
public
function
endereco
(){
...
...
app/Http/Controllers/AdministradorController.php
View file @
d9ff3f1d
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
App\Administrador
;
use
App\Evento
;
class
AdministradorController
extends
Controller
class
AdministradorController
extends
Controller
{
{
...
@@ -18,4 +20,12 @@ class AdministradorController extends Controller
...
@@ -18,4 +20,12 @@ class AdministradorController extends Controller
return
view
(
'administrador.usuarios'
);
return
view
(
'administrador.usuarios'
);
}
}
public
function
editais
(){
//$admin = Administrador::with('user')->where('user_id', Auth()->user()->id)->first();
//$eventos = Evento::where('coordenadorId',$admin->id )->get();
$eventos
=
Evento
::
where
(
'criador_id'
,
Auth
()
->
user
()
->
id
)
->
get
();
return
view
(
'administrador.editais'
,
[
'eventos'
=>
$eventos
]);
}
}
}
app/Http/Controllers/AdministradorResponsavelController.php
0 → 100644
View file @
d9ff3f1d
<?php
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
App\AdministradorResponsavel
;
use
App\User
;
use
App\Evento
;
use
App\Avaliador
;
class
AdministradorResponsavelController
extends
Controller
{
public
function
index
(){
return
view
(
'administradorResponsavel.index'
);
}
public
function
editais
(){
//$admResponsavel = AdministradorResponsavel::with('user')->where('user_id', Auth()->user()->id)->first();
$eventos
=
Evento
::
where
(
'criador_id'
,
Auth
()
->
user
()
->
id
)
->
get
();
return
view
(
'administradorResponsavel.editais'
,
[
'eventos'
=>
$eventos
]);
}
public
function
usuarios
(){
return
view
(
'administradorResponsavel.usuarios'
);
}
public
function
atribuirPermissao
(
Request
$request
){
$user
=
User
::
where
(
'id'
,
$request
->
user_id
)
->
first
();
$isAvaliador
=
Avaliador
::
where
(
'user_id'
,
$request
->
user_id
)
->
count
();
$avaliador
=
new
Avaliador
();
$avaliador
->
save
();
if
(
$isAvaliador
==
0
){
//$user->avaliadors()->save($user);
$avaliador
->
user
()
->
associate
(
$user
);
// um avaliador tem um usuario
$avaliador
->
save
();
//$user->avaliadors()->save($avaliador); //um usuario pode ter muitos avaliadores
//$user->save();
//$avaliador->user_id = $user->id;
$success
=
true
;
}
else
{
$avaliador
=
Avaliador
::
where
(
'user_id'
,
$request
->
user_id
)
->
first
();
$avaliador
->
user
()
->
dissociate
(
$user
);
// um avaliador tem um usuario
$avaliador
->
save
();
$success
=
false
;
}
return
response
()
->
json
(
$success
);
}
public
function
verPermissao
(
Request
$request
){
$user
=
User
::
where
(
'id'
,
$request
->
user_id
)
->
first
();
$isAvaliador
=
Avaliador
::
where
(
'user_id'
,
$request
->
user_id
)
->
count
();
if
(
$isAvaliador
!=
0
){
$success
=
true
;
}
else
{
$success
=
false
;
}
return
response
()
->
json
(
[
$success
]
);
//return response()->json( $request->user_id );
}
}
app/Http/Controllers/CoordenadorComissaoController.php
View file @
d9ff3f1d
...
@@ -24,8 +24,8 @@ class CoordenadorComissaoController extends Controller
...
@@ -24,8 +24,8 @@ class CoordenadorComissaoController extends Controller
public
function
editais
(){
public
function
editais
(){
$coordenador
=
CoordenadorComissao
::
with
(
'user'
)
->
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
first
();
$eventos
=
Evento
::
where
(
'coordenadorId'
,
Auth
()
->
user
()
->
id
)
->
get
();
$eventos
=
Evento
::
where
(
'coordenadorId'
,
$coordenador
->
id
)
->
get
();
return
view
(
'coordenadorComissao.editais'
,
[
'eventos'
=>
$eventos
]);
return
view
(
'coordenadorComissao.editais'
,
[
'eventos'
=>
$eventos
]);
...
...
app/Http/Controllers/EventoController.php
View file @
d9ff3f1d
...
@@ -72,8 +72,10 @@ class EventoController extends Controller
...
@@ -72,8 +72,10 @@ class EventoController extends Controller
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$yesterday
=
Carbon
::
yesterday
(
'America/Recife'
);
$yesterday
=
Carbon
::
yesterday
(
'America/Recife'
);
$yesterday
=
$yesterday
->
toDateString
();
$yesterday
=
$yesterday
->
toDateString
();
//$admResponsavel = AdministradorResponsavel::with('user')->where('user_id', Auth()->user()->id)->first();
$user_id
=
Auth
()
->
user
()
->
id
;
//dd($
request
);
//dd($
user_id
);
// validar datas nulas antes, pois pode gerar um bug
// validar datas nulas antes, pois pode gerar um bug
if
(
if
(
...
@@ -123,8 +125,9 @@ class EventoController extends Controller
...
@@ -123,8 +125,9 @@ class EventoController extends Controller
'fimRevisao'
=>
$request
->
fimRevisao
,
'fimRevisao'
=>
$request
->
fimRevisao
,
'resultado'
=>
$request
->
resultado
,
'resultado'
=>
$request
->
resultado
,
'coordenadorId'
=>
$request
->
coordenador_id
,
'coordenadorId'
=>
$request
->
coordenador_id
,
'criador_id'
=>
$user_id
,
]);
]);
//dd($evento);
// $user = User::find($request->coordenador_id);
// $user = User::find($request->coordenador_id);
// $user->coordenadorComissao()->editais()->save($evento);
// $user->coordenadorComissao()->editais()->save($evento);
...
...
app/Http/Controllers/TrabalhoController.php
View file @
d9ff3f1d
...
@@ -187,6 +187,7 @@ class TrabalhoController extends Controller
...
@@ -187,6 +187,7 @@ class TrabalhoController extends Controller
'password'
=>
bcrypt
(
$passwordTemporario
),
'password'
=>
bcrypt
(
$passwordTemporario
),
'usuarioTemp'
=>
true
,
'usuarioTemp'
=>
true
,
'name'
=>
$request
->
nomeParticipante
[
$key
],
'name'
=>
$request
->
nomeParticipante
[
$key
],
'tipo'
=>
'participante'
,
'funcao_participante_id'
=>
$request
->
funcaoParticipante
[
$key
],
'funcao_participante_id'
=>
$request
->
funcaoParticipante
[
$key
],
]);
]);
...
...
app/Http/Controllers/UserController.php
View file @
d9ff3f1d
...
@@ -10,6 +10,7 @@ use App\Endereco;
...
@@ -10,6 +10,7 @@ use App\Endereco;
use
App\Trabalho
;
use
App\Trabalho
;
use
App\Coautor
;
use
App\Coautor
;
use
App\Evento
;
use
App\Evento
;
use
App\Proponente
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Log
;
class
UserController
extends
Controller
class
UserController
extends
Controller
...
@@ -108,9 +109,13 @@ class UserController extends Controller
...
@@ -108,9 +109,13 @@ class UserController extends Controller
public
function
meusTrabalhos
(){
public
function
meusTrabalhos
(){
$trabalhos
=
Trabalho
::
where
(
'autorId'
,
Auth
::
user
()
->
id
)
->
get
();
//$trabalhos = Trabalho::where('autorId', Auth::user()->id)->get();
$proponente
=
Proponente
::
with
(
'user'
)
->
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
$trabalhos
=
$proponente
->
trabalhos
;
//dd($trabalhos);
return
view
(
'user.meusTrabalhos'
,[
return
view
(
'user.meusTrabalhos'
,[
'trabalhos'
=>
$trabalhos
,
'trabalhos'
=>
$trabalhos
,
]);
]);
}
}
}
}
app/Policies/EventoPolicy.php
View file @
d9ff3f1d
...
@@ -4,6 +4,8 @@ namespace App\Policies;
...
@@ -4,6 +4,8 @@ namespace App\Policies;
use
App\User
;
use
App\User
;
use
App\Evento
;
use
App\Evento
;
use
App\CoordenadorComissao
;
use
App\AdministradorResponsavel
;
use
Illuminate\Auth\Access\HandlesAuthorization
;
use
Illuminate\Auth\Access\HandlesAuthorization
;
class
EventoPolicy
class
EventoPolicy
...
@@ -21,6 +23,9 @@ class EventoPolicy
...
@@ -21,6 +23,9 @@ class EventoPolicy
}
}
public
function
isCoordenador
(
User
$user
,
Evento
$evento
){
public
function
isCoordenador
(
User
$user
,
Evento
$evento
){
return
$user
->
id
===
$evento
->
coordenador
->
id
;
return
$evento
->
criador_id
==
Auth
()
->
user
()
->
id
;
}
}
}
}
app/Trabalho.php
View file @
d9ff3f1d
...
@@ -81,4 +81,7 @@ class Trabalho extends Model
...
@@ -81,4 +81,7 @@ class Trabalho extends Model
public
function
coordenador
(){
public
function
coordenador
(){
return
$this
->
belongsTo
(
'App\CoordenadorComissao'
);
return
$this
->
belongsTo
(
'App\CoordenadorComissao'
);
}
}
public
function
avaliadors
(){
return
$this
->
belongsToMany
(
'App\Avaliador'
);
}
}
}
app/User.php
View file @
d9ff3f1d
...
@@ -20,7 +20,7 @@ class User extends Authenticatable implements MustVerifyEmail
...
@@ -20,7 +20,7 @@ class User extends Authenticatable implements MustVerifyEmail
protected
$fillable
=
[
protected
$fillable
=
[
'name'
,
'email'
,
'password'
,
'cpf'
,
'instituicao'
,
'celular'
,
'name'
,
'email'
,
'password'
,
'cpf'
,
'instituicao'
,
'celular'
,
'especProfissional'
,
'enderecoId'
,
'especProfissional'
,
'enderecoId'
,
'usuarioTemp'
,
'usuarioTemp'
,
'tipo'
,
'user_id'
];
];
/**
/**
...
@@ -79,7 +79,7 @@ class User extends Authenticatable implements MustVerifyEmail
...
@@ -79,7 +79,7 @@ class User extends Authenticatable implements MustVerifyEmail
public
function
administradors
(){
public
function
administradors
(){
return
$this
->
hasMany
(
'App\Administrador'
);
return
$this
->
hasMany
(
'App\Administrador'
);
}
}
public
function
P
roponentes
(){
public
function
p
roponentes
(){
return
$this
->
hasMany
(
'App\Proponente'
);
return
$this
->
hasMany
(
'App\Proponente'
);
}
}
public
function
AdministradorResponsavel
(){
public
function
AdministradorResponsavel
(){
...
...
database/migrations/2020_02_05_123153_create_eventos_table.php
View file @
d9ff3f1d
...
@@ -27,7 +27,7 @@ class CreateEventosTable extends Migration
...
@@ -27,7 +27,7 @@ class CreateEventosTable extends Migration
$table
->
integer
(
'numMaxTrabalhos'
)
->
nullable
();
$table
->
integer
(
'numMaxTrabalhos'
)
->
nullable
();
$table
->
integer
(
'numMaxCoautores'
)
->
nullable
();
$table
->
integer
(
'numMaxCoautores'
)
->
nullable
();
$table
->
boolean
(
'hasResumo'
)
->
nullable
();
$table
->
boolean
(
'hasResumo'
)
->
nullable
();
$table
->
integer
(
'c
oordComissaoI
d'
)
->
nullable
();
$table
->
integer
(
'c
riador_i
d'
)
->
nullable
();
$table
->
integer
(
'coordenadorId'
)
->
nullable
();
$table
->
integer
(
'coordenadorId'
)
->
nullable
();
$table
->
string
(
'pdfEdital'
)
->
nullable
();
$table
->
string
(
'pdfEdital'
)
->
nullable
();
$table
->
string
(
'modeloDocumento'
)
->
nullable
();
$table
->
string
(
'modeloDocumento'
)
->
nullable
();
...
...
database/migrations/2020_02_06_132418_chaves_estrangeiras.php
View file @
d9ff3f1d
...
@@ -131,9 +131,9 @@ class ChavesEstrangeiras extends Migration
...
@@ -131,9 +131,9 @@ class ChavesEstrangeiras extends Migration
// Schema::table('revisors', function (Blueprint $table) {
// Schema::table('revisors', function (Blueprint $table) {
// $table->foreign('areaId')->references('id')->on('areas');
// $table->foreign('areaId')->references('id')->on('areas');
// });
// });
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
){
//
Schema::table('eventos',function (Blueprint $table){
$table
->
foreign
(
'coordComissaoId'
)
->
references
(
'id'
)
->
on
(
'users'
);
//
$table->foreign('coordComissaoId')->references('id')->on('users');
});
//
});
//------------------------------------------------------------------------
//------------------------------------------------------------------------
}
}
...
...
database/migrations/2020_05_23_054805_create_avaliadors_table.php
View file @
d9ff3f1d
...
@@ -17,7 +17,7 @@ class CreateAvaliadorsTable extends Migration
...
@@ -17,7 +17,7 @@ class CreateAvaliadorsTable extends Migration
$table
->
bigIncrements
(
'id'
);
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
unsignedBigInteger
(
'user_id'
)
->
nullable
()
;
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
});
}
}
...
...
database/migrations/2020_05_26_223341_create_avaliadors_trabalhos_table.php
0 → 100644
View file @
d9ff3f1d
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateAvaliadorsTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'avaliador_trabalho'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
unsignedBigInteger
(
'avaliador_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
$table
->
foreign
(
'avaliador_id'
)
->
references
(
'id'
)
->
on
(
'avaliadors'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'avaliador_trabalho'
);
}
}
database/seeds/AdministradorResponsavelSeeder.php
View file @
d9ff3f1d
...
@@ -12,11 +12,18 @@ class AdministradorResponsavelSeeder extends Seeder
...
@@ -12,11 +12,18 @@ class AdministradorResponsavelSeeder extends Seeder
*/
*/
public
function
run
()
public
function
run
()
{
{
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'AdministradorResponsavel'
)
->
pluck
(
'id'
);
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'AdministradorResponsavel
1
'
)
->
pluck
(
'id'
);
DB
::
table
(
'administrador_responsavels'
)
->
insert
([
DB
::
table
(
'administrador_responsavels'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
'user_id'
=>
$user_id
[
0
],
]);
]);
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'AdministradorResponsavel2'
)
->
pluck
(
'id'
);
DB
::
table
(
'administrador_responsavels'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
]);
}
}
}
}
database/seeds/DatabaseSeeder.php
View file @
d9ff3f1d
...
@@ -21,6 +21,7 @@ class DatabaseSeeder extends Seeder
...
@@ -21,6 +21,7 @@ class DatabaseSeeder extends Seeder
$this
->
call
(
SubAreaSeeder
::
class
);
$this
->
call
(
SubAreaSeeder
::
class
);
$this
->
call
(
FuncaoParticipanteSeeder
::
class
);
$this
->
call
(
FuncaoParticipanteSeeder
::
class
);
$this
->
call
(
CoordenadorComissaoSeeder
::
class
);
$this
->
call
(
CoordenadorComissaoSeeder
::
class
);
$this
->
call
(
ParticipanteSeeder
::
class
);
// $this->call(UsersTableSeeder::class);
// $this->call(UsersTableSeeder::class);
// DB::table('enderecos')->insert([ // 1
// DB::table('enderecos')->insert([ // 1
...
@@ -65,6 +66,24 @@ class DatabaseSeeder extends Seeder
...
@@ -65,6 +66,24 @@ class DatabaseSeeder extends Seeder
// 'email_verified_at' => '2020-02-15',
// 'email_verified_at' => '2020-02-15',
// ]);
// ]);
DB
::
table
(
'eventos'
)
->
insert
([
'nome'
=>
'I CONGRESSO REGIONAL DE ZOOTECNIA'
,
// 'numeroParticipantes'=>60,
'descricao'
=>
'Cada autor inscrito poderá submeter até dois (2) resumos;
O número máximo de autores por trabalho será seis autores;
Os trabalhos deverão ser submetidos na forma de resumo simples com no máximo uma (01) página, no formato PDF;'
,
'tipo'
=>
'PIBIC'
,
'inicioSubmissao'
=>
'2020-03-30'
,
'fimSubmissao'
=>
'2020-09-20'
,
'inicioRevisao'
=>
'2020-04-21'
,
'fimRevisao'
=>
'2020-05-21'
,
'resultado'
=>
'2020-05-22'
,
'numMaxTrabalhos'
=>
2
,
'numMaxCoautores'
=>
5
,
'coordenadorId'
=>
1
,
'criador_id'
=>
1
,
]);
DB
::
table
(
'eventos'
)
->
insert
([
DB
::
table
(
'eventos'
)
->
insert
([
'nome'
=>
'II CONGRESSO REGIONAL DE ZOOTECNIA'
,
'nome'
=>
'II CONGRESSO REGIONAL DE ZOOTECNIA'
,
// 'numeroParticipantes'=>60,
// 'numeroParticipantes'=>60,
...
@@ -80,6 +99,25 @@ class DatabaseSeeder extends Seeder
...
@@ -80,6 +99,25 @@ class DatabaseSeeder extends Seeder
'numMaxTrabalhos'
=>
2
,
'numMaxTrabalhos'
=>
2
,
'numMaxCoautores'
=>
5
,
'numMaxCoautores'
=>
5
,
'coordenadorId'
=>
1
,
'coordenadorId'
=>
1
,
'criador_id'
=>
2
,
]);
DB
::
table
(
'eventos'
)
->
insert
([
'nome'
=>
'III CONGRESSO REGIONAL DE ZOOTECNIA'
,
// 'numeroParticipantes'=>60,
'descricao'
=>
'Cada autor inscrito poderá submeter até dois (2) resumos;
O número máximo de autores por trabalho será seis autores;
Os trabalhos deverão ser submetidos na forma de resumo simples com no máximo uma (01) página, no formato PDF;'
,
'tipo'
=>
'PIBIC'
,
'inicioSubmissao'
=>
'2020-03-30'
,
'fimSubmissao'
=>
'2020-09-20'
,
'inicioRevisao'
=>
'2020-04-21'
,
'fimRevisao'
=>
'2020-05-21'
,
'resultado'
=>
'2020-05-22'
,
'numMaxTrabalhos'
=>
2
,
'numMaxCoautores'
=>
5
,
'coordenadorId'
=>
1
,
'criador_id'
=>
3
,
]);
]);
// $areasEventoZoo = [
// $areasEventoZoo = [
...
...
database/seeds/ParticipanteSeeder.php
0 → 100644
View file @
d9ff3f1d
<?php
use
Illuminate\Database\Seeder
;
class
ParticipanteSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Participante1'
)
->
pluck
(
'id'
);
DB
::
table
(
'participantes'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
]);
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Participante2'
)
->
pluck
(
'id'
);
DB
::
table
(
'participantes'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
]);
}
}
database/seeds/UsuarioSeeder.php
View file @
d9ff3f1d
...
@@ -24,8 +24,16 @@ class UsuarioSeeder extends Seeder
...
@@ -24,8 +24,16 @@ class UsuarioSeeder extends Seeder
DB
::
table
(
'users'
)
->
insert
([
DB
::
table
(
'users'
)
->
insert
([
'name'
=>
'AdministradorResponsavel'
,
'name'
=>
'AdministradorResponsavel1'
,
'email'
=>
'adminResp@ufrpe.br'
,
'email'
=>
'adminResp1@ufrpe.br'
,
'password'
=>
Hash
::
make
(
'12345678'
),
'tipo'
=>
'administradorResponsavel'
,
'email_verified_at'
=>
'2020-01-01'
]);
DB
::
table
(
'users'
)
->
insert
([
'name'
=>
'AdministradorResponsavel2'
,
'email'
=>
'adminResp2@ufrpe.br'
,
'password'
=>
Hash
::
make
(
'12345678'
),
'password'
=>
Hash
::
make
(
'12345678'
),
'tipo'
=>
'administradorResponsavel'
,
'tipo'
=>
'administradorResponsavel'
,
'email_verified_at'
=>
'2020-01-01'
'email_verified_at'
=>
'2020-01-01'
...
@@ -57,5 +65,24 @@ class UsuarioSeeder extends Seeder
...
@@ -57,5 +65,24 @@ class UsuarioSeeder extends Seeder
'tipo'
=>
'coordenador'
,
'tipo'
=>
'coordenador'
,
'email_verified_at'
=>
'2020-01-01'
'email_verified_at'
=>
'2020-01-01'
]);
]);
DB
::
table
(
'users'
)
->
insert
([
'name'
=>
'Participante1'
,
'email'
=>
'part1@ufrpe.br'
,
'password'
=>
Hash
::
make
(
'12345678'
),
'tipo'
=>
'participante'
,
'email_verified_at'
=>
'2020-01-01'
]);
DB
::
table
(
'users'
)
->
insert
([
'name'
=>
'Participante2'
,
'email'
=>
'part2@ufrpe.br'
,
'password'
=>
Hash
::
make
(
'12345678'
),
'tipo'
=>
'participante'
,
'email_verified_at'
=>
'2020-01-01'
]);
}
}
}
}
Prev
1
2
Next
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