Installation:
- Back end installation
composer install
app/console doctrine:schema:create
app/console doctrine:fixtures:load
- Front end installation
npm install
bower install
grunt prod
app/console assets:install web --symlink
- Run server with command:
app/console server:run
Project will be available at localhost:8000
Requirements: PHP, MySQL, npm, compass
SQL: List of all albums and images with MAX 10 images at an album
SET @album = 0;
SET @n = 0;
SELECT a.*, i.*, @n := IF(@album <> a.id, 1, @n + 1) num, @album := a.id
FROM album a
JOIN image i ON i.album_id = a.id
HAVING num <= 10
ORDER BY a.id, i.id