devvoh / parable
Parable is a PHP micro framework
Installs: 500
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 6
Forks: 4
Open Issues: 1
Type:framework
Requires
- php: >=5.6
- ext-json: *
- ext-mbstring: *
- ext-pdo: *
Requires (Dev)
- phpunit/phpunit: ^5.7
- dev-master
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.0
- 0.12.14
- 0.12.13
- 0.12.12
- 0.12.11
- 0.12.10
- 0.12.9
- 0.12.8
- 0.12.7
- 0.12.6
- 0.12.5
- 0.12.4
- 0.12.3
- 0.12.2
- 0.12.1
- 0.12.0
- 0.11.5
- 0.11.4
- 0.11.3
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.9
- 0.9.8
- 0.9.7
- 0.9.6
- 0.9.5
- 0.9.4
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.18
- 0.8.17
- 0.8.16
- 0.8.15
- 0.8.14
- 0.8.13
- 0.8.12
- 0.8.11
- 0.8.10
- 0.8.9
- 0.8.8
- 0.8.7
- 0.8.6
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.3
- 0.3.4
- dev-develop
This package is auto-updated.
Last update: 2021-03-12 10:22:48 UTC
README
NOTE: devvoh/parable:1.2.2
is now no longer being developed. For the next chapter in Parable's future, go to parable-php/framework
for the 2.0.0 version.
Parable 2.0.0 is a full rewrite, but it is possible to move over an application built on the 1.0 family to 2.0 in a reasonable time. If you need any assistance, please open an issue here.
Thank you for supporting Parable!
Parable PHP Framework
Parable is a PHP micro-framework intended to be readable, extensible and out-of-your-way.
Installation
Parable can be installed by using Composer.
$ composer require devvoh/parable
This will install Parable and all required dependencies. Parable requires PHP 5.6 or higher.
Simple Usage
Create an index.php
file and include the composer autoloader:
<?php require_once __DIR__ . '/vendor/autoload.php'; $app = \Parable\DI\Container::create(\Parable\Framework\App::class); $app->get('/hello/{name}', function ($name) use ($app) { return "Hello, {$name}!"; }); $app->run();
Then go into the vendor/devvoh/parable
directory and run make server
. You can then open http://127.0.0.1:5678/hello/parable
and you should be greeted by "Hello, parable!". You can also serve it through a regular webserver.
Advanced Usage
To use Parable for more than straightforward apps like in the Basic Usage above, and you want to use Controllers, Actions, Views and more, after installation, run the following command:
$ vendor/bin/parable init-structure
Now you're ready! Simply open the url it should be at in in your browser and you should see a welcome page.
If you want to use nginx or another server, that's cool too, but as of yet there's no example configuration available.
Getting Started
After you've run parable init-structure
, you should have a basic structure to work from. The example files show most of what you'll need to build something. The example \Config\App
file includes some of the most important things Parable itself will listen to.
Now, if you want to keep this out of your git (or other vcs) repository, you can place this in a separate config file and exclude it using a .gitignore
file.
More information
Read the documentation for more detailed information on how to use Parable, and CHANGELOG.md for recent changes.
Contributing
Any help in improving Parable is much appreciated, but check CONTRIBUTING.md before creating any pull requests.
Contact
Any questions or constructive feedback? Find me at devvoh.com or ask me a question by adding an issue on github. I generally respond fairly quickly, since this is a passion project, after all.
License
Parable PHP Framework is open-sourced software licensed under the MIT license.