src/Gzero/Cms/Repositories/BlockReadRepository.php
public function getBlocksWithFilter($onlyActive = true)
    {
        $query = Block::query()->with(self::$loadRelations)
            ->where('filter', '!=', null);

        if ($onlyActive) {
            $query->where('is_active', '=', true);
        }

        $blocks = $query->orderBy('weight', 'ASC')->get();

        return $blocks;
    }
public function getBlocksWithFilter($onlyActive = true)
    {
        $query = Block::query()->with(self::$loadRelations)
            ->where('filter', '!=', null);

        if ($onlyActive) {
            $query->where('is_active', '=', true);
        }

        $blocks = $query->orderBy('weight', 'ASC')->get();

        return $blocks;
    }
public function getBlocksWithFilter ( $ onlyActive = true ) { $ query = Block :: query ( ) -> with ( self :: $ loadRelations ) -> where ( 'filter' , '!=' , null ) ; if ( $ onlyActive ) { $ query -> where ( 'is_active' , '=' , true ) ; } $ blocks = $ query -> orderBy ( 'weight' , 'ASC' ) -> get ( ) ; return $ blocks ; }
Returns all blocks with filter

@param bool $onlyActive Return only active blocks

@return Collection
Returns all blocks with filter