The application shows basic usage of Yii framework, Composer and Imagine library. It allows to upload photos and automatically create thumbnails for them.
- Create a folder under DOCUMENT_ROOT of your server (e.g. yii-composer).
- Clone this repo to the folder
git clone https://github.com/vladimir-s/yii-composer.git .
- Run
composer install
(this command will download all dependencies). You should install Composer before running this command. - Create database and set its credentials in
public_html/protected/config/main.php
andpublic_html/protected/config/console.php
. - Run
yiic migrate
from the folderpublic_html/protected/
(this command will create images table in the database).
- Open
http://localhost/yii-composer/public_html/index.php
and login withadmin/admin
. - Go to
http://localhost/yii-composer/public_html/index.php?r=images/create
to upload image.