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
cd03d70e
Commit
cd03d70e
authored
Dec 29, 2022
by
Lucas Henrique
Browse files
Adiciona remoção dos campos de avaliação
parent
41f68936
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/EventoController.php
View file @
cd03d70e
...
...
@@ -636,6 +636,7 @@ class EventoController extends Controller
$comissao
=
ComissaoEvento
::
where
(
'eventosId'
,
$id
);
$revisores
=
Revisor
::
where
(
'eventoId'
,
$id
);
$trabalhos
=
Trabalho
::
where
(
'evento_id'
,
$id
);
$camposAvaliacao
=
CampoAvaliacao
::
where
(
'evento_id'
,
$id
);
// if(isset($areas)){
// $areas->delete();
...
...
@@ -653,6 +654,10 @@ class EventoController extends Controller
$trabalhos
->
delete
();
Trabalho
::
withTrashed
()
->
where
(
'evento_id'
,
$id
)
->
update
([
'evento_id'
=>
null
]);
}
if
(
isset
(
$camposAvaliacao
)){
$camposAvaliacao
->
delete
();
CampoAvaliacao
::
withTrashed
()
->
where
(
'evento_id'
,
$id
)
->
update
([
'evento_id'
=>
null
]);
}
Storage
::
deleteDirectory
(
'pdfEdital/'
.
$evento
->
id
);
Storage
::
deleteDirectory
(
'modeloDocumento/'
.
$evento
->
id
);
...
...
database/migrations/2022_12_29_215745_add_softdelete_campos_avaliacao.php
0 → 100644
View file @
cd03d70e
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddSoftdeleteCamposAvaliacao
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'campo_avaliacaos'
,
function
(
Blueprint
$table
)
{
$table
->
softDeletes
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'campo_avaliacaos'
,
function
(
Blueprint
$table
)
{
$table
->
dropSoftDeletes
();
});
}
}
database/migrations/2022_12_29_221814_alter_table_campo_avaliacaos.php
0 → 100644
View file @
cd03d70e
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AlterTableCampoAvaliacaos
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'campo_avaliacaos'
,
function
(
Blueprint
$table
)
{
$table
->
integer
(
'evento_id'
)
->
nullable
()
->
change
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
//
}
}
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