将图像上传到s3并将路径存储在数据库中时的laravel问题

I am new the this PHP things and I wanna create a article model which has title and some images

what I can do is save the title to my database but not the uploaded images , even more , I don't know how to upload multiple images with php or should I call laravel ?

one single image is fine with me and I know the callback will tell me the image address but what indeed should I do to store them in database and relate them in the specific article model ?

many many thanks

Ok let me address this issue, your uploaded image should be renamed using timestamp reason is to avoid name collision. Look at this for example $filename_path = md5(time().uniqid()).".jpg"; This ensures that you will always have unique name for the file. Once you rename the file and move to s3 then you save $filename_path into a table.

During retrieval you get the name and search your s3 bucket for the image.

Hope this helps