src/Models/Vacancy.php
public function scopeForDateTime($query, Carbon $datetime)
    {
        return $query->where('start_at', '<=', $datetime->toDateTimeString())
                        ->where('finish_at', '>=', $datetime->toDateTimeString());
    }
public function scopeForDateTime($query, Carbon $datetime)
    {
        return $query->where('start_at', '<=', $datetime->toDateTimeString())
                        ->where('finish_at', '>=', $datetime->toDateTimeString());
    }
public function scopeForDateTime ( $ query , Carbon $ datetime ) { return $ query -> where ( 'start_at' , '<=' , $ datetime -> toDateTimeString ( ) ) -> where ( 'finish_at' , '>=' , $ datetime -> toDateTimeString ( ) ) ; }
Scope For DateTime.

@param Illuminate\Database\Query $query
@param Carbon                    $datetime Date and Time of inquiry

@return Illuminate\Database\Query Scoped query
Scope For DateTime .