private function getPopupEloquentEntry($resource, $limit = 1, $offset = 0)
    {
        $eloquent = $this->eloqent($resource);
        $builder = $eloquent::active()
            ->where('is_popup', 1)
            ->orderBy('active_from', 'DESC')
            ->offset($offset);

        if ($limit == 1) {
            return $builder->first();
        }

        return $builder->limit($limit)->get();
    }
private function getPopupEloquentEntry($resource, $limit = 1, $offset = 0)
    {
        $eloquent = $this->eloqent($resource);
        $builder = $eloquent::active()
            ->where('is_popup', 1)
            ->orderBy('active_from', 'DESC')
            ->offset($offset);

        if ($limit == 1) {
            return $builder->first();
        }

        return $builder->limit($limit)->get();
    }
private function getPopupEloquentEntry ( $ resource , $ limit = 1 , $ offset = 0 ) { $ eloquent = $ this -> eloqent ( $ resource ) ; $ builder = $ eloquent :: active ( ) -> where ( 'is_popup' , 1 ) -> orderBy ( 'active_from' , 'DESC' ) -> offset ( $ offset ) ; if ( $ limit == 1 ) { return $ builder -> first ( ) ; } return $ builder -> limit ( $ limit ) -> get ( ) ; }
Get a featured item
@param     $resource
@param int $limit
@param int $offset
@return mixed
Get a featured item