O'Reilly logo
  • GIL EG thinks this is interesting:

$category = Category::where('name', '=', 'Opera')->first(); $book = Book::where('title', '=', 'Journey to the Center of the Earth')->first(); // oh, come on... $category->books->detach($book->id);

From

Cover of Learning Laravel's Eloquent

Note

detach() to delete a pivot table record