Skip to content

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

Notifications You must be signed in to change notification settings

bigemployee/zf2-tutorial-paginate-sort

Repository files navigation

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!

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published