Aligned item creation wording and updated shelf-book-add logic

This commit is contained in:
Dan Brown
2019-04-15 20:43:25 +01:00
parent 84419005e7
commit 7f3f6e65b9
9 changed files with 55 additions and 35 deletions

View File

@ -26,7 +26,9 @@ class Bookshelf extends Entity
*/
public function books()
{
return $this->belongsToMany(Book::class, 'bookshelves_books', 'bookshelf_id', 'book_id')->orderBy('order', 'asc');
return $this->belongsToMany(Book::class, 'bookshelves_books', 'bookshelf_id', 'book_id')
->withPivot('order')
->orderBy('order', 'asc');
}
/**