PHPackages                             indatus/active-resource - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. indatus/active-resource

ActiveLibrary[API Development](/categories/api)

indatus/active-resource
=======================

A simple active resource implementation written in PHP to consume any REST API

73.1k5PHP

Since Jan 9Pushed 12y ago1 watchersCompare

[ Source](https://github.com/Indatus/ActiveResource)[ Packagist](https://packagist.org/packages/indatus/active-resource)[ RSS](/packages/indatus-active-resource/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Depricated
==========

[](#depricated)

This package has been officially depricated, please see [Trucker](https://github.com/Indatus/trucker) which is the replacement.

PHP ActiveResource Library
--------------------------

[](#php-activeresource-library)

[![Build Status](https://camo.githubusercontent.com/f2abffd38bfbd31c4bfb9e73f0288e2949e86d3c4d4ef126a626145236db8551/68747470733a2f2f7472617669732d63692e6f72672f496e64617475732f4163746976655265736f757263652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Indatus/ActiveResource)

This is a PHP library for accessing REST APIs in an ActiveResource style of coding. The benefit is easier use of REST APIs in a fast and clean programming interface.

The library follows convention over configuration. So you should be able to get up to speed consuming a REST API in a very short time.

#### Installation

[](#installation)

You can install the library via [Composer](http://getcomposer.org) by adding the following line to the **require** block of your *composer.json* file:

```
"indatus/active-resource": "dev-master"

```

Next run `composer update` or `composer install`

### Examples

[](#examples)

#### Base Class

[](#base-class)

It may be a good idea to create a base class from which your models will extend that contains settings that will be shared across everything.

```
