Вот сама ошибка:
General error: 1366 Incorrect integer value: 'PUT' for column 'author_id' at row 1 (SQL: insert into `book_author` (`author_id`, `book_id`) values (PUT, 1))
Функция update и edit :
public function edit($id)
{
$book = Book::find($id);
$author = Author::all()->pluck('name', 'id')->toArray();
return view('book.edit',compact('book', 'author'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$book=Book::findOrFail($id, ['id']);
$book->authors()->sync($request->except('authors'));
return redirect()->route('books.index', compact('book'))
->with('success','Книга обновлена');
}