src/Models/Appointment.php
public function scopeOfDate($query, Carbon $date)
    {
        $date->timezone('UTC');

        return $query->whereRaw('date(`start_at`) = ?', [$date->toDateString()]);
    }
public function scopeOfDate($query, Carbon $date)
    {
        $date->timezone('UTC');

        return $query->whereRaw('date(`start_at`) = ?', [$date->toDateString()]);
    }
public function scopeOfDate ( $ query , Carbon $ date ) { $ date -> timezone ( 'UTC' ) ; return $ query -> whereRaw ( 'date(`start_at`) = ?' , [ $ date -> toDateString ( ) ] ) ; }
Scope of date.

@param Illuminate\Database\Query $query
@param Carbon                    $date

@return Illuminate\Database\Query
Scope of date .