Use pivot tables. Inside the pivot you will make a start_time and end_time column. Eloquent doesn't support models with composite primary keys, so if you really need that time model, then make a foreign key in the pivot.
Firtzberg said:
Use pivot tables. Inside the pivot you will make a start_time and end_time column. Eloquent doesn't support models with composite primary keys, so if you really need that time model, then make a foreign key in the pivot.
won't I have to make the primary id of hall_movie table the foreign key of times table?
also, how would I go about accessing these times with eloquent?
Take a look at http://laravel.io/forum/10-16-2014-eloquent-will-also-assume-that-each-table-has-a-primary-key-column-named-id I posted some code there that might point you in the right direction.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.