sample/Application/EncodeSamples.php
public function getBasicExample(): string
    {
        $author = Author::instance('123', 'John', 'Dow');

        $encoder = Encoder::instance([
            Author::class => AuthorSchema::class,
        ])->withEncodeOptions(JSON_PRETTY_PRINT);

        $result = $encoder->withUrlPrefix('http://example.com/api/v1')->encodeData($author);

        return $result;
    }
public function getBasicExample(): string
    {
        $author = Author::instance('123', 'John', 'Dow');

        $encoder = Encoder::instance([
            Author::class => AuthorSchema::class,
        ])->withEncodeOptions(JSON_PRETTY_PRINT);

        $result = $encoder->withUrlPrefix('http://example.com/api/v1')->encodeData($author);

        return $result;
    }
public function getBasicExample ( ) : string { $ author = Author :: instance ( '123' , 'John' , 'Dow' ) ; $ encoder = Encoder :: instance ( [ Author :: class => AuthorSchema :: class , ] ) -> withEncodeOptions ( JSON_PRETTY_PRINT ) ; $ result = $ encoder -> withUrlPrefix ( 'http://example.com/api/v1' ) -> encodeData ( $ author ) ; return $ result ; }
Get basic usage.

@return string
Get basic usage .