So I wanted to create a form function set for my blades to automatically recover values after a failed validation. I succeeded by creating a facade. My goal was to have it work like:
{{!! Cform::input("text", $errors->all, 'name') !!}}
I succeeded but throughout the process had the sinking feeling that Facades were not the proper way for accomplishing this.
Is it?
I'm not sure what you're Facade is supposed to do exactly but if it's only the recovery of the old input I think the easier way would be this:
<input type="text" name="field1" value="{{ Input::old('field1') }}" />
If you pass the Input to the redirect (or use FormValidation) you can use the Input Facade to get the input that the user previously entered.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community