/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $assignment = BookAssignment::find($id);
     if (!$assignment) {
         return response(null, 404);
     }
     $assignment->delete();
     return response(null, 200);
 }
 /**
  * Handle the event.
  *
  * @param  StudentAssignmentEnded  $event
  * @return void
  */
 public function handle(AssignmentEndedUpdateCreated $event)
 {
     $assignment = BookAssignment::find($event->assignmentId);
     $userId = $assignment->user->id;
     Artisan::queue('stats:update', ['userId' => $userId]);
 }