Coupon */ public function coupon() { return $this->belongsTo('App\Models\Coupon', 'calendrier_couponId'); } // * METHODS /** * Check if the current date is between the calendar publication dates. * * @return boolean */ public function isPublished(): bool { return now()->betweenIncluded($this->calendrier_startdate, $this->calendrier_enddate->endOfDay()); } }