Example #1
0
 public function changeStatus($bookId, $ownerId, $status)
 {
     $statusId = \App\BookStatus::firstOrCreate(['name' => $status])->id;
     \DB::table('book_book_club')->where('book_club_id', $this->id)->where('book_id', $bookId)->where('owner_id', $ownerId)->update(['status_id' => $statusId]);
     return true;
 }