public function scopeOnlyUnkeptOlderThanHours(Builder $builder, $hours)
    {
        return $builder
            ->withoutGlobalScope(KeptFlagScope::class)
            ->where('is_kept', 0)
            ->where(static::getCreatedAtColumn(), '<=', Date::now()->subHours($hours)->toDateTimeString());
    }
public function scopeOnlyUnkeptOlderThanHours(Builder $builder, $hours)
    {
        return $builder
            ->withoutGlobalScope(KeptFlagScope::class)
            ->where('is_kept', 0)
            ->where(static::getCreatedAtColumn(), '<=', Date::now()->subHours($hours)->toDateTimeString());
    }
public function scopeOnlyUnkeptOlderThanHours ( Builder $ builder , $ hours ) { return $ builder -> withoutGlobalScope ( KeptFlagScope :: class ) -> where ( 'is_kept' , 0 ) -> where ( static :: getCreatedAtColumn ( ) , '<=' , Date :: now ( ) -> subHours ( $ hours ) -> toDateTimeString ( ) ) ; }
Get unkept models that are older than the given number of hours.

@param \Illuminate\Database\Eloquent\Builder $builder
@param int $hours
@return \Illuminate\Database\Eloquent\Builder
Get unkept models that are older than the given number of hours .