I am wondering if anyone knows how I can do this.
Currently, I am using form request validation so my store method looks something like
public function store(ProfileStore $request)
{
// do stuff.
Input::flush();
return redirect()->back();
}
^ Note the input flush, I don't want certain input stored as "old input" or passed back to the form so I am flushing it.
and then in my ProfileStore I have a some basic validation (eg.
public function rules()
{
return [
'title' => 'required|max:255',
'body' => 'required',
];
}
The problem is when I use Request Validation, its passing the the input back into the form along with the error messages. I have tried flushing input from the validation file, but doesn't work.
If I manually create a validator from my store method and not use Request Validation it works fine and will not pass back input.
Any ideas?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire