src/Menu/Entities/Menu.php
public function scopeVisible($query)
    {
        return $query->where(function ($query) {

            $query->where('visible', true);

            $query->where(function ($query) {
                $query->where('published_at', '<=', Carbon::now())
                    ->orWhere('published_at', null);
            });

            $query->where(function ($query) {
                $query->where('concealed_at', '>=', Carbon::now())
                    ->orWhere('concealed_at', null);
            });
        });
    }
public function scopeVisible($query)
    {
        return $query->where(function ($query) {

            $query->where('visible', true);

            $query->where(function ($query) {
                $query->where('published_at', '<=', Carbon::now())
                    ->orWhere('published_at', null);
            });

            $query->where(function ($query) {
                $query->where('concealed_at', '>=', Carbon::now())
                    ->orWhere('concealed_at', null);
            });
        });
    }
@param Builder $query

@return mixed