This tutorial extends the zf2-tutorial by akabat by adding sorting and pagination capabilities.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
data/cache
module
public
vendor
.gitignore
README.md
composer.json
composer.lock
composer.phar
init_autoloader.php

README.md

zf2-tutorial-paginate-sort

================ ______ _ _____ _ | ___ () | | | | | |/ / __ _ | |_ _ __ ___ _ __ | | ___ _ _ ___ ___ | ___ \ |/ | | __|| '_ _ | ' | |/ _ | | | |/ _ / _
| |
/ / | (| | | || | | | | | |) | | () | || | _/ / _/||_, | _/|| || || .__/||_/ __, |_|__| / | | | / | |/ || |/

Introduction

This tutorial extends the zf2-tutorial by akabat by adding sorting and pagination capabilities.

Installation

Using Composer (recommended)

Clone the repository and manually invoke composer using the shipped composer.phar:

cd my/project/dir
git clone git://github.com/bigemployee/zf2-tutorial-paginate-sort.git
cd zf2-tutorial-paginate-sort
php composer.phar self-update
php composer.phar install

(The self-update directive is to ensure you have an up-to-date composer.phar available.)

Database

Create zf2tutorial Database and run the following SQL statements to create the table and insert sample data.

CREATE TABLE album (
  id int(11) NOT NULL auto_increment,
  artist varchar(100) NOT NULL,
  title varchar(100) NOT NULL,
  PRIMARY KEY (id)
);
INSERT INTO album (artist, title)
    VALUES  ('The  Military  Wives',  'In  My  Dreams');
INSERT INTO album (artist, title)
    VALUES  ('Adele',  '21');
INSERT INTO album (artist, title)
    VALUES  ('Bruce  Springsteen',  'Wrecking Ball (Deluxe)');
INSERT INTO album (artist, title)
    VALUES  ('Lana  Del  Rey',  'Born  To  Die');
INSERT INTO album (artist, title)
    VALUES  ('Gotye',  'Making  Mirrors');

open config/autoload/global.php and configure your Database credentials.

Virtual Host

Afterwards, set up a virtual host to point to the public/ directory of the project and you should be ready to go!