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
349c9a02
Commit
349c9a02
authored
Jul 14, 2020
by
carlos
Browse files
erro ao clicar em baixar arquivo em editar edital
parent
9bd43e50
Changes
2
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/HomeController.php
View file @
349c9a02
...
@@ -51,6 +51,9 @@ class HomeController extends Controller
...
@@ -51,6 +51,9 @@ class HomeController extends Controller
}
}
public
function
downloadArquivo
(
Request
$request
){
public
function
downloadArquivo
(
Request
$request
){
if
(
Storage
::
disk
()
->
exists
(
$request
->
file
))
{
return
Storage
::
download
(
$request
->
file
);
return
Storage
::
download
(
$request
->
file
);
}
}
return
abort
(
404
);
}
}
}
resources/views/evento/editarEvento.blade.php
View file @
349c9a02
...
@@ -239,9 +239,11 @@
...
@@ -239,9 +239,11 @@
<
div
class
=
"col-sm-6"
>
<
div
class
=
"col-sm-6"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
<
label
for
=
"modeloDocumento"
>
Arquivo
com
os
modelos
de
documentos
do
edital
:</
label
>
<
label
for
=
"modeloDocumento"
>
Arquivo
com
os
modelos
de
documentos
do
edital
:</
label
>
@
if
(
$evento
->
modeloDocumento
!=
null
)
<
a
href
=
"{{route('download', ['file' =>
$evento->modeloDocumento
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
a
href
=
"{{route('download', ['file' =>
$evento->modeloDocumento
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
</
a
>
@
endif
<
input
type
=
"file"
class
=
"form-control-file @error('modeloDocumento') is-invalid @enderror"
name
=
"modeloDocumento"
value
=
"{{ old('modeloDocumento') }}"
id
=
"modeloDocumento"
>
<
input
type
=
"file"
class
=
"form-control-file @error('modeloDocumento') is-invalid @enderror"
name
=
"modeloDocumento"
value
=
"{{ old('modeloDocumento') }}"
id
=
"modeloDocumento"
>
<
small
>
O
arquivo
selecionado
deve
ter
até
2
mb
.
</
small
>
<
small
>
O
arquivo
selecionado
deve
ter
até
2
mb
.
</
small
>
@
error
(
'modeloDocumento'
)
@
error
(
'modeloDocumento'
)
...
...
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