/**
  * Register any other events for your application.
  *
  * @param  \Illuminate\Contracts\Events\Dispatcher  $events
  * @return void
  */
 public function boot(DispatcherContract $events)
 {
     parent::boot($events);
     Feedback::created(function ($item) {
         Cache::tags('feedbacks')->flush();
         $this->dispatch(new SentenceProcessing($item));
     });
     Feedback::updated(function ($item) {
         Cache::tags('feedbacks')->flush();
     });
     Feedback::deleted(function ($item) {
         Cache::tags('feedbacks')->flush();
     });
     Comment::saved(function ($item) {
         Cache::tags('comments')->flush();
     });
     Comment::saved(function ($item) {
         Cache::tags('comments')->flush();
     });
     Sentence::saved(function ($item) {
         if ($item->feedback) {
             $item->feedback->calculateProbabilities();
         }
     });
 }