在laravel中创建动态集合

我有一个问题,我不知道如何创建要存储在数据库中的动态集合。

Suppose that I have some sort of files I'm accepting from the user and I want to store their pathes in the database as JSON. I need to put every path and its id in this collection.

我试图将其创建为普通数组,但我想我搞砸了。 任何帮助都会帮我一个大忙。

评论