If I understand you correctly, what you are after is a belongsTo - hasMany relationship or one to many. It's not polymorphic.
If you read it out: a BOOK belongs to a CATEGORY
A CATEGORY has many BOOKS
So in your book table, you'd have a category_id field.
http://laravel.com/docs/5.1/eloquent-relationships#one-to-many
Just make sure this is definately the right approach and you won't want a book to have more than one category. It would be a pain down the line if you had to change it.
Hope it helps.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community