Skip to content

This is a PHP library for those wanting to build an API and return structured data to the requesting client.

License

Notifications You must be signed in to change notification settings

michaeldrennen/JSONAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSONAPI

GitHub Build Status Codecov GitHub issues Packagist Beerpay

This is a PHP library for those wanting to build an API and return structured data to the requesting client.

// This $user is the object we want to return to the client requesting the User data.
$user  = new User( 74, "Mike", TRUE );

// Create the response object, set the $user as the data you want to return, and 
// specify the Transformer you want to use to munge the User data. 
$array = \MichaelDrennen\JSONAPI\Response::create()
                                         ->setData( $user )
                                         ->transformWith( new UserTransformer() )
                                         ->toArray();

About

This is a PHP library for those wanting to build an API and return structured data to the requesting client.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages