src/JsonFeed.php
public function build()
    {
        if (!$this->hasCorrectStructure()) {
            throw (new IncorrectFeedStructureException)->setProperties($this->getMissingProperties());
        }

        return $this
            ->filterProperties() + ['version' => $this->getVersion(), 'items' => $this->buildItems()];
    }
public function build()
    {
        if (!$this->hasCorrectStructure()) {
            throw (new IncorrectFeedStructureException)->setProperties($this->getMissingProperties());
        }

        return $this
            ->filterProperties() + ['version' => $this->getVersion(), 'items' => $this->buildItems()];
    }
public function build ( ) { if ( ! $ this -> hasCorrectStructure ( ) ) { throw ( new IncorrectFeedStructureException ) -> setProperties ( $ this -> getMissingProperties ( ) ) ; } return $ this -> filterProperties ( ) + [ 'version' => $ this -> getVersion ( ) , 'items' => $ this -> buildItems ( ) ] ; }
Builds a collection following the JSON Feed spec

@throws \Mateusjatenee\JsonFeed\Exceptions\IncorrectFeedStructureException
@return \Illuminate\Support\Collection
Builds a collection following the JSON Feed spec