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
ee45b275
Commit
ee45b275
authored
May 12, 2023
by
José Fernando Mendes da Costa
Browse files
log da razão do request falhar
parent
216ef469
Changes
1
Show whitespace changes
Inline
Side-by-side
app/Http/Requests/StoreTrabalho.php
View file @
ee45b275
...
@@ -7,6 +7,7 @@ use Illuminate\Validation\Rule;
...
@@ -7,6 +7,7 @@ use Illuminate\Validation\Rule;
use
Illuminate\Support\Facades\Auth
;
use
Illuminate\Support\Facades\Auth
;
use
Illuminate\Foundation\Http\FormRequest
;
use
Illuminate\Foundation\Http\FormRequest
;
use
Illuminate\Contracts\Validation\Validator
;
use
Illuminate\Contracts\Validation\Validator
;
use
Illuminate\Support\Facades\Log
;
class
StoreTrabalho
extends
FormRequest
class
StoreTrabalho
extends
FormRequest
{
{
...
@@ -20,6 +21,14 @@ class StoreTrabalho extends FormRequest
...
@@ -20,6 +21,14 @@ class StoreTrabalho extends FormRequest
return
Auth
::
check
();
return
Auth
::
check
();
}
}
protected
function
failedValidation
(
Validator
$validator
)
{
Log
::
info
(
print_r
(
$validator
,
true
));
throw
(
new
ValidationException
(
$validator
))
->
errorBag
(
$this
->
errorBag
)
->
redirectTo
(
$this
->
getRedirectUrl
());
}
protected
function
prepareForValidation
()
protected
function
prepareForValidation
()
{
{
$func
=
function
(
$value
)
{
$func
=
function
(
$value
)
{
...
...
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