Skip to content

Commit

Permalink
Add some basic instructions to README
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrowe committed Jul 26, 2015
1 parent 591732e commit 74a066b
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cakephp-api-pagination
# CakePhp API Pagination

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
Expand All @@ -7,8 +7,8 @@
[![Quality Score][ico-code-quality]][link-code-quality]
[![Total Downloads][ico-downloads]][link-downloads]

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what
PSRs you support to avoid any confusion with users and contributors.
This is a simple component for CakePHP 3 which injects pagination information
from CakePHP's Paginator, into Json and Xml View responses.

## Install

Expand All @@ -18,11 +18,23 @@ Via Composer
$ composer require bcrowe/cakephp-api-pagination
```

Then make sure to load the plugin in your application's `bootstrap.php` file.

``` php
Plugin::load('BryanCrowe/ApiPagination');
```

## Usage

Load the component in a controller's `initialize()` method:


``` php
$skeleton = new BryanCrowe\Skeleton();
echo $skeleton->echoPhrase('Hello, Bryan!');
public function initialize()
{
parent::initialize();
$this->loadComponent('BryanCrowe/ApiPagination');
}
```

## Change log
Expand Down

0 comments on commit 74a066b

Please sign in to comment.