public function checkChatWithInnovator($id) { if (Progress::where('investor_id', '=', \Auth::user()->id)->where('innovation_id', '=', $id)->exists()) { return true; } else { return false; } }
/** * Gets all innovations that are on progress * @return mixed */ public function getOnProgress() { return Progress::where('investor_id', '=', \Auth::user()->id)->where('progress_status', '=', 1)->with('innovation.category', 'innovation.user')->latest()->paginate(9); }