mardi 6 mars 2018

Convenient way to store related data in Laravel 5.5

I have next data structure:

There is user table users. Each user can have 4 types of files.

Is it possible to save it in table structure like this : files ?

id | user_id | type1 | type2 | type3 | type4

Also is it possible to use code similar to next?

$user->files($type, $value);



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2HdiF5B
via IFTTT

Aucun commentaire:

Enregistrer un commentaire