使用 Laravel 5.5 在画廊系统中制作相册
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49343896/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Making photo album in a gallery system with laravel 5.5
提问by Anand Mainali
I want to make a gallery system in laravel 5.5. So that every time i upload photos it shows in a different album with 1st photo and title that i uploaded. And after clicking to that album shows the other photos of that album. How can i do it?
我想在 Laravel 5.5 中制作一个画廊系统。因此,每次我上传照片时,它都会在不同的相册中显示我上传的第一张照片和标题。单击该相册后会显示该相册的其他照片。我该怎么做?
采纳答案by Xhemajl Bytyqi
Here is a good example for you : https://www.dunebook.com/tutorial-creating-a-photo-gallery-system-with-laravel/
这是一个很好的例子:https: //www.dunebook.com/tutorial-creating-a-photo-gallery-system-with-laravel/
回答by Saurav
Manke two database named gallery and photos. It will be something like this:
漫客有两个数据库名为gallery 和photos。它会是这样的:
Gallery: id name description timestamp cover_image more columns.....
图库:id 名称描述时间戳cover_image 更多列.....
Photo model: id gallery_id image name more columns.....
图片型号:id gallery_id 图片名称 更多栏目.....
Save gallery and then upload multiple files in photo table with one to many relationship
保存图库,然后以一对多的关系上传照片表中的多个文件