Download the PHP package letsdrink/ouzo-app without Composer
On this page you can find all versions of the php package letsdrink/ouzo-app. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ouzo-app
Ouzo - 5 minutes tutorial
How to use Ouzo step by step. It takes only 5 minutes to set up sample project and start experiencing Ouzo.
Set up project
Simply use composer (http://getcomposer.org):
Where myproject
is your project's name.
After downloading Ouzo and its dependencies you will be asked what database you want to use. Ouzo will prepare config files for you. Database configuration can be changed manually later if needed.
PHP Version
You need:
- PHP 5.6 or later installed. Currently Ouzo is tested on 5.6, 7.0, and 7.1 environments.
- Database driver, accordingly to the database your are using.
In order to get list of available drivers check http://www.php.net/manual/en/pdo.getavailabledrivers.php.
Configure HTTP Server
Ouzo apps can be run on Apache web server. It needs mod_rewrite enabled. Once you have previous step completed, change document root to myproject
.
Ouzo Configuration
Ouzo configuration is located under config/prod/config.php
.
What's important for now is that debug is turned on by default. Please, leave it like this for installation purposes, as you will be able to see detailed error messages in case something goes wrong.
Database Configuration
Configuration is automatically generated for database of your choice. The only thing you need to do is to create database and database user first.
For MySQL:
For PostgreSQL:
If you do not use composer, sample project has PostgreSQL by default. Database config can be found in Ouzo configuration file:
You need to provide database name, user name & password, driver, host, port and SQL dialect class. For now Ouzo supports:
- PostgreSQL - \Ouzo\Db\Dialect\PostgresDialect
- MySQL - \Ouzo\Db\Dialect\MySqlDialect
- SQLite3 - \Ouzo\Db\Dialect\Sqlite3Dialect
Migrations
Your database is empty at the beginning. To demonstrate Ouzo capabilities we have created a sample database. Use db.sh script to apply migrations:
To see full list of possible migrations related actions run:
Ouzo uses Ruckusing framework for migrations (https://github.com/ruckus/ruckusing-migrations).
Check out the app!
Open your favourite browser and go to http://localhost/myproject. Your first Ouzo project is now running! You can play around by adding, browsing and editing users.
Running tests
Test configuration can be found in config/test/config.php
. You will need separate database for tests purposes only.
Set up for MySQL:
Set up for PostgreSQL:
Apply migrations:
Now run tests:
If all tests are passing, you're good to go!
More
Skeleton app explained: http://ouzo.readthedocs.org/en/latest/tutorials/project_structure_explained.html
Ouzo documentation: http://ouzo.readthedocs.org