From 74a066b9a199f641ff3a61652ddc85428b560367 Mon Sep 17 00:00:00 2001 From: Bryan Crowe Date: Sun, 26 Jul 2015 17:22:10 -0400 Subject: [PATCH] Add some basic instructions to README --- README.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ffe6908..710d2d9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# cakephp-api-pagination +# CakePhp API Pagination [![Latest Version on Packagist][ico-version]][link-packagist] [![Software License][ico-license]](LICENSE.md) @@ -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 @@ -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