src/Models/Appointment.php
public function isOnTimeToCancel()
    {
        $graceHours = $this->business->pref('appointment_cancellation_pre_hs');

        $diff = $this->start_at->diffInHours(Carbon::now());

        return intval($diff) >= intval($graceHours);
    }
public function isOnTimeToCancel()
    {
        $graceHours = $this->business->pref('appointment_cancellation_pre_hs');

        $diff = $this->start_at->diffInHours(Carbon::now());

        return intval($diff) >= intval($graceHours);
    }
public function isOnTimeToCancel ( ) { $ graceHours = $ this -> business -> pref ( 'appointment_cancellation_pre_hs' ) ; $ diff = $ this -> start_at -> diffInHours ( Carbon :: now ( ) ) ; return intval ( $ diff ) >= intval ( $ graceHours ) ; }
Determine if it is still possible to cancel according business policy.

@return bool
Determine if it is still possible to cancel according business policy .