Member Since 2 Months Ago
4,940 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Earned once your experience points ranks in the top 10 of all Laracasts users.
Started a new Conversation Multiple Images Upload In Vuejs And Inertia(Jetstream & Laravel8)
I have Simple Form in VueJs for creating User's Post ,the post consists of title, keyword ,description and Photos The Backend Logic for storing the post to the database works well,but the problem is I don't know exactly how to get multiple images from the file input
Here is vuejs codes for selecting photos and preview
<jet-label for="photo" />
<div class="mt-2" v-show="photoPreview">
<span class="block rounded w-20 h-20"
:style="'background-size: cover; background-repeat: no-repeat; background-position: center center; background-image: url(\'' + photoPreview + '\');'">
</span>
</div>
<jet-secondary-button class="mt-2 mr-2" type="button" @click.native.prevent="selectNewPhoto">
Choose Photos
</jet-secondary-button>
<jet-input-error :message="form.error('photo_path')" class="mt-2" />
</div>
My method:
createPost() {
if (this.$refs.photo) {
for (let index = 0; index < this.$refs.photo.files.length; index++) {
let file = this.$refs.photo.files[index]
this.form.photo_path = file
}
}
this.form.post('/post/store', {
preserveScroll: true
});
},
When user click submit button, only one photo is stored in database....How can i fix above codes to allow multiple images upload?