php - Trying to ensure distinct two column values in Model rows laravel
one text
I have a bookchapter model which has book_id as a foreign key from books model. I want to ensure a book_id doesnt have more that one unique chapter_id. i.e
one text
I have a bookchapter model which has book_id as a foreign key from books model. I want to ensure a book_id doesnt have more that one unique chapter_id. i.e