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
e8d95121
Commit
e8d95121
authored
Sep 14, 2021
by
José Rômulo
Browse files
Adicionando rota e função de baixar anexos de part
parent
b09290a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/ParticipanteController.php
View file @
e8d95121
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
App\Evento
;
use
App\Evento
;
use
App\Trabalho
;
use
App\Trabalho
;
...
@@ -75,4 +76,13 @@ class ParticipanteController extends Controller
...
@@ -75,4 +76,13 @@ class ParticipanteController extends Controller
$funcao
->
delete
();
$funcao
->
delete
();
return
redirect
()
->
back
()
->
with
([
'mensagem'
=>
'Função de participante deletada com sucesso!'
]);
return
redirect
()
->
back
()
->
with
([
'mensagem'
=>
'Função de participante deletada com sucesso!'
]);
}
}
public
function
baixarDocumento
(
Request
$request
)
{
if
(
Storage
::
disk
()
->
exists
(
$request
->
pathDocumento
))
{
ob_end_clean
();
return
Storage
::
download
(
$request
->
pathDocumento
);
}
return
abort
(
404
);
}
}
}
routes/web.php
View file @
e8d95121
...
@@ -156,6 +156,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
...
@@ -156,6 +156,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route
::
get
(
'/baixar/anexoGrupoPesquisa/{id}'
,
'TrabalhoController@baixarAnexoGrupoPesquisa'
)
->
name
(
'baixar.anexoGrupoPesquisa'
);
Route
::
get
(
'/baixar/anexoGrupoPesquisa/{id}'
,
'TrabalhoController@baixarAnexoGrupoPesquisa'
)
->
name
(
'baixar.anexoGrupoPesquisa'
);
Route
::
get
(
'/baixar/anexo-temp/{eventoId}/{nomeAnexo}'
,
'TrabalhoController@baixarAnexoTemp'
)
->
name
(
'baixar.anexo.temp'
);
Route
::
get
(
'/baixar/anexo-temp/{eventoId}/{nomeAnexo}'
,
'TrabalhoController@baixarAnexoTemp'
)
->
name
(
'baixar.anexo.temp'
);
Route
::
get
(
'/baixar/evento-temp/{nomeAnexo}'
,
'TrabalhoController@baixarEventoTemp'
)
->
name
(
'baixar.evento.temp'
);
Route
::
get
(
'/baixar/evento-temp/{nomeAnexo}'
,
'TrabalhoController@baixarEventoTemp'
)
->
name
(
'baixar.evento.temp'
);
Route
::
get
(
'/baixar/documentosParticipante'
,
'ParticipanteController@baixarDocumento'
)
->
name
(
'baixar.documentosParticipante'
);
});
});
Route
::
get
(
'/baixar/edital/{id}'
,
'EventoController@baixarEdital'
)
->
name
(
'baixar.edital'
);
Route
::
get
(
'/baixar/edital/{id}'
,
'EventoController@baixarEdital'
)
->
name
(
'baixar.edital'
);
...
...
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