ravipw1801's avatar

Laravel 5.6 - Bulk File Upload

I am building a blog-post app. Users can upload their DP as well as COVER IMAGE. How should I validate & save it in the database? Please help!

0 likes
2 replies
Cronix's avatar

File uploads: https://laravel.com/docs/5.6/requests#storing-uploaded-files

Validation: https://laravel.com/docs/5.6/validation

There are a number of validation rules that can be used for images.

Start with just getting the image uploading working, save the image, store the path to the image in the db. After you get that working, then start adding the validation.

You can search for "upload" on the site using the search bar. It's been discussed many times.

After you work on it and if you still need help, then come back and post your code.

ravipw1801's avatar

I can save single image / even multiple images to database, but my question is how to save 2 different images from two different inputs (but both in single form) in the database.

Please or to participate in this conversation.