public function getItems($pathToClass = null, $table = null)
    {
        if(!$pathToClass) {
            $pathToClass = self::$_pathToClass;
        }
        if(!$table) {
            $table = self::$_modelTable;
        }
        // TODO nese ne nje collection query e thirr nje collection tjeter, proprties
        // nuk barten se where-at e ri-inicializojne klasen me new static
        // keshtu qe duhet me ja gjet nje zgjidhje. Rasti i select categories me postTypeID

        $backtrace = debug_backtrace();
        return $this->map(
            function ($item) use ($pathToClass,$table) {
                $modelInstance = (new $pathToClass())->setTable($table);
                $modelInstance->disableCasts = true;
                return $modelInstance->newFromBuilder($item);
            }
        )->values();
    }
public function getItems($pathToClass = null, $table = null)
    {
        if(!$pathToClass) {
            $pathToClass = self::$_pathToClass;
        }
        if(!$table) {
            $table = self::$_modelTable;
        }
        // TODO nese ne nje collection query e thirr nje collection tjeter, proprties
        // nuk barten se where-at e ri-inicializojne klasen me new static
        // keshtu qe duhet me ja gjet nje zgjidhje. Rasti i select categories me postTypeID

        $backtrace = debug_backtrace();
        return $this->map(
            function ($item) use ($pathToClass,$table) {
                $modelInstance = (new $pathToClass())->setTable($table);
                $modelInstance->disableCasts = true;
                return $modelInstance->newFromBuilder($item);
            }
        )->values();
    }
public function getItems ( $ pathToClass = null , $ table = null ) { if ( ! $ pathToClass ) { $ pathToClass = self :: $ _pathToClass ; } if ( ! $ table ) { $ table = self :: $ _modelTable ; } // TODO nese ne nje collection query e thirr nje collection tjeter, proprties // nuk barten se where-at e ri-inicializojne klasen me new static // keshtu qe duhet me ja gjet nje zgjidhje. Rasti i select categories me postTypeID $ backtrace = debug_backtrace ( ) ; return $ this -> map ( function ( $ item ) use ( $ pathToClass , $ table ) { $ modelInstance = ( new $ pathToClass ( ) ) -> setTable ( $ table ) ; $ modelInstance -> disableCasts = true ; return $ modelInstance -> newFromBuilder ( $ item ) ; } ) -> values ( ) ; }
Appends a model to each of cache items.

@param  null $pathToClass
@param  null $table
@return AccioCollection|\Illuminate\Support\Collection
Appends a model to each of cache items .