public function chatExists($id)
 {
     if (Chat::where('innovation_id', '=', $id)->where('investor_id', '=', \Auth::user()->id)->first() == null) {
         return 1;
     } else {
         return 2;
     }
 }
Esempio n. 2
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     Message::created(function ($message) {
         Event::fire(new ItemCreated($message));
     });
     Chat::updated(function ($item) {
         Event::fire(new ItemUpdated($item));
     });
     Chat::deleted(function ($item) {
         Event::fire(new ItemDeleted($item));
     });
 }