bluzphp / skeleton
Skeleton application for Bluz, a lightweight PHP framework
Installs: 1 709
Dependents: 0
Suggesters: 0
Security: 0
Stars: 41
Watchers: 19
Forks: 26
Open Issues: 14
Requires
- php: >=7.3
- ext-gd: *
- ext-json: *
- bluzphp/bluzman: ~2.5
- bluzphp/composer-plugin: ~2.4
- bluzphp/framework: ~7.13
- phpmailer/phpmailer: ~6.5
- public/bootstrap-icons: dev-master
- public/jquery: dev-master
- public/require: dev-master
- public/swagger-ui: dev-master
- robmorgan/phinx: ~0.12
- twbs/bootstrap: ~5.0
- zircote/swagger-php: ~3.2
Requires (Dev)
- codeception/codeception: ~4.1
- codeception/module-asserts: ~1.3
- codeception/module-phpbrowser: ~1.0
- codeception/module-rest: dev-master
- laminas/laminas-dom: ~2.9
- php-coveralls/php-coveralls: ~2.4
- squizlabs/php_codesniffer: ~3.6
- dev-master
- 7.10.1
- 7.10
- 7.9.1
- 7.9.0
- 7.8.0
- 7.7.1
- 7.7.0
- 7.6.5
- 7.6.4
- 7.6.3
- 7.6.2
- 7.6.1
- 7.6.0
- 7.5.5
- 7.5.4
- 7.5.3
- 7.5.2
- 7.5.1
- 7.5.0
- 7.3.1
- 7.3.0
- 7.2.2
- 7.2.1
- 7.2.0
- 7.1.0
- 7.0.4
- 7.0.3
- 7.0.2
- 7.0.0
- 2.0.2
- 1.0.1
- 1.0.0
- 0.9.3
- 0.9.2
- 0.9.1
- 0.8.0
- 0.6.0
- 0.4.5
- 0.4.4
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.2.6
- 0.2.3
- 0.2.1
- 0.1.0
- dev-develop
This package is auto-updated.
Last update: 2024-12-15 14:10:52 UTC
README
Easy to setup, easy to use. Skeleton application
Achievements
Installation
Bluz works with PHP 7.0 or later and MySQL 5.4 or later (please check requirements)
I.a. From composer
Download composer.phar
, it's easy:
curl -s https://getcomposer.org/installer | php
Run create-project
command (replace %path%
;):
php composer.phar create-project bluzphp/skeleton %path% --stability=dev
I.b. From repository
Get Bluz skeleton source files from GitHub repository:
git clone git://github.com/bluzphp/skeleton.git %path%
Download composer.phar
to the project folder:
cd %path% curl -s https://getcomposer.org/installer | php
Install composer dependencies with the following command:
php composer.phar install
I.c. With PhpStorm
For install you need any web-server (for Windows) and PhpStorm. dows) и PhpStorm.
Create project in PhpStorm:
- File -> New project;
- Set the project name and location;
- In a Project type field choose Composer project;
- Check that radiobutton is set opposite "Download composer.phar from getcomposer.org", type in a search field "bluzphp/skeleton", select this package in Available packages window and click OK.
- After that file composer.phar and all dependencies will be loaded.
II. Configuration
Edit your configuration's files /path/to/application/configs/dev/*.php
(configuration for development environment).
I think you need to change only
db.php
for first run
III. Setup database
To run the migrations, execute the command:
/path/to/vendor/bin/bluzman db:migrate
To fill database with data example, execute the command:
/path/to/vendor/bin/bluzman db:seed:run
IV.a. Run built-in web-server
You can run internal PHP web-server with simple console tool:
/path/to/vendor/bin/bluzman server:start --host[="..."] --port[="..."]
IV.b. Use Apache
Or create symlink to Apache document root (required FollowSymlinks option):
# for Linux
ln -s /path/to/public /path/to/web
# for Windows
mklink /D /path/to/web path/to/public
Usage
You can create models, controllers and views with Bluzman console tool, or following old school style:
Model
Model consists from two classes Table
and Row
:
<?php namespace Application\Users; class Table extends \Bluz\Db\Table { protected $table = 'users'; protected $primary = ['id']; }
<?php namespace Application\Users; /** * @property integer $id * @property string $login */ class Row extends \Bluz\Db\Row { }
Controller
Controller is file with anonymous function:
<?php namespace Application; /** * @privilege ViewProfile * @cache 5 minutes * @param integer $id * @return array */ return function($id) { return [ 'user' => Users\Table::findRow($id) ]; };
View
View is native:
<h2><?=$user->login?></h2>
Documentation
Demo
License
The project is developed by NIX PHP team and distributed under MIT LICENSE
NIX has OEM License of Redactor. Full text of Redactor License you can read at http://imperavi.com/redactor/license/