F
F
fiter2017-07-14 03:20:22
Laravel
fiter, 2017-07-14 03:20:22

Laravel 5.4 - What is the best way to store playlists in the database?

Hello! I just can’t decide how best to organize the storage of playlists in the database.
1) There is a Player model, it has a lot of Playlist
2) Playlist has a lot of Track
3) It should be possible to change the order of tracks in the playlist
4) Tracks should be displayed page by page using the paginate() method
What would be the 'best practice' in solving such a problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RidgeA, 2017-07-14
@RidgeA

Can the same track be in different playlists?
In the table where the connection will be stored - Playlist-Track add another order field

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question