sahibalejandro / form-object Goto Github PK
View Code? Open in Web Editor NEWForm object to use with Vue components for sending data to a Laravel application using axios.
Form object to use with Vue components for sending data to a Laravel application using axios.
Images are not uploaded/parsed when using an array. The hasFiles()
doesn't do a deep search.
Example of structure:
data: {
name: 'oh hi mark',
images: [ File, File ],
}
Potential solution:
bool forceFormDataObject
in the Form()
constructor.Perhaps an enchancement to clear the inputs after a successful submission?
Reference issue: laravel/framework#13457
A workaround is to automatically append the field _method=PUT/PATCH
on every put/patch request containing files.
On new Laravel 5.5 project I'm working I'm experiencing an issue that I think is a Vue reactivity issue. Calling:
this.form.errors.clear('email');
certainly calls delete
on the field, but even in my Vue Inspector in Chrome devtools I have to hit refresh
to see the Vue instance update - and the error class on the wrapping div is not getting removed. This seems pretty straightforward to me, and that it should work. Is there something wrong here that others have experienced this too?
Here's the simple template code:
<div class="form-group" :class="{ 'has-error': form.errors.has('email') }">
<label for="email" class="col-md-3 control-label">email</label>
<div class="col-md-9">
<input type="text" class="form-control" id="email" name="email" v-model="vattr.email">
<div class="help-block" v-for="(error, key) in form.errors.getAll('email')" :key="key" v-text="error"></div>
</div>
</div>
Please add support for using a custom axios object when making the requests. Sometimes you need to manage headers, use interceptors, etc.
All data is sent using FormData, causing PUT/PATCH requests to be empty on PHP since PHP does not support PUT/PATCH when using multipart/form-data.
This change has to be reverted or addressed.
Related to issue #10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.