Hi, I started with a new application, but I struggle with setting up my Models and Relations. Let me give you a quick idea of my project:
I have 3 Models: User, Playlist and Radio. I want Users to select radio stations from a predefined list of stations and add them to their playlists. A User has playlists and these playlists have radio stations. But the User isn't the actual owner of the radio station.
So my question is: How do I handle the removal of a station for example? What if a User wants to delete a station from his playlist? Or the other way arround: How can I associate a station with a user/playlist?
I know this question sounds weird, but thats because I can't really find the right words to describe my problem.
I hope you will understand :)
Lukas
You need a many to many relationship for stations and users. an intermediate pivot table would do just fine. https://laracasts.com/series/laravel-5-fundamentals/episodes/21
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community