'datetime', ]; public function participations() { return $this->hasMany(Participation::class); } public function hasWon() { return $this->hasMany(InstantGagnant::class); } public function winInfo() { return $this->hasMany(Winner::class); } public function unclaimedInstantGagnants() { $wonIds = $this->winInfo()->pluck('instant_gagnant_id')->all(); return $this->hasWon()->get()->filter(function (InstantGagnant $instanGagnant) use ($wonIds) { return !in_array($instanGagnant->id, $wonIds); }); } /** * Send the email verification notification. * * @return void */ public function sendEmailVerificationNotification() { $this->notify(new \App\Core\Auth\VerifyEmail); } }