From 1935febe9007d7ab393e2b41d1b77756d879094e Mon Sep 17 00:00:00 2001 From: mruz Date: Sat, 12 Jul 2014 18:42:26 +0200 Subject: [PATCH] Readme, move info to doc --- README.md | 67 +------------------------- app/documentation/views/index/index.md | 8 ++- 2 files changed, 9 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index 958a2da..9727759 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,7 @@ # base-app 2.0 ##### The base application in PhalconPHP -Use this application as a way to quick start any new project. -See working [base-app](http://base-app.mruz.pl), user/pass: user user, admin admin. +Use this application as a way to quick start any new project. See working [base-app](http://base-app.mruz.pl), user/pass: user user, admin admin. #####Migration to 2.0 in progress, demo may not work properly! *** -### Features: -* Bootstrap file -* Config file -* [CLI](https://github.com/mruz/base-app/wiki/CLI) and Console file -* HMVC support -* [Volt](http://docs.phalconphp.com/en/latest/reference/volt.html), Markdown templates -* Frontend/Backend/Cli/Documentation modules -* Environment - * _development_ - display debug, always compile template files, always minify assets - * _testing_ - log debug, only checks for changes in the children templates, checks for changes and minify assets - * _staging_ - log debug, notify admin, only checks for changes in the children templates, checks for changes and minify assets - * _production_ - log debug, notify admin, don't check for differences, don't create missing files, compiled and minified files must exist before! -* Library - * [Arr](https://github.com/mruz/base-app/wiki/Arr) - * [Auth](https://github.com/mruz/base-app/wiki/Auth) - * [Email](https://github.com/mruz/base-app/wiki/Email) - * [I18n](https://github.com/mruz/base-app/wiki/I18n) - * Markdown - * [Tool](https://github.com/mruz/base-app/wiki/Tool) - * Payment - * [PayPal](http://www.paypal.com) - * [dotpay](http://www.dotpay.pl) -* User - * Models - * Auth schema mysql -* Twitter Bootstrap 3.2.0 - -### Configuration: -1. Set *base_uri* and other settings in */app/common/config/config.ini* -2. Use */auth-schema-mysql.sql* to create required tables -3. Make sure that these directories are writable by the web server: - * `/app/common/logs` - * `/app/common/cache` - * `/public/min` - -### Requirements: -* Phalcon **2.0.0** (temporarily works on 1.3.0) - -### Links: -* [Phalcon PHP](https://phalconphp.com) -* [Base-app](https://github.com/mruz/base-app) -* [Demo](http://base-app.mruz.pl) -* [Twitter Bootstrap](http://getbootstrap.com) - -### Example volt usage: -##### auth in views -```php -{% if auth.logged_in() %} - {{ auth.get_user().username }} -{% endif %} -``` - -##### easy translation with __() function -```php -{% if auth.logged_in('admin') %} - {{ __('Hello :user', [':user' : auth.get_user().username]) }} -{% endif %} -``` - -##### use static classes in volt -```php -{{ dump('string', 1, 2.5, TRUE, NULL, ['key': 'value'], users__findFirst(1)) }} -``` +[Documentation](http://base-app.mruz.pl/doc) \ No newline at end of file diff --git a/app/documentation/views/index/index.md b/app/documentation/views/index/index.md index 344d935..658c1c2 100644 --- a/app/documentation/views/index/index.md +++ b/app/documentation/views/index/index.md @@ -62,6 +62,12 @@ ``` ##### use static classes in volt +```django +{% set user = users__findFirst(1) %} +{{ user.username }} +``` + +##### debug variables ```php -{{ dump('string', 1, 2.5, TRUE, NULL, ['key': 'value'], users__findFirst(1)) }} +{{ dump('string', 1, 2.5, TRUE, NULL, ['key': 'value'], user) }} ``` \ No newline at end of file