- clone it
- run
composer install
on the root folder - run
composer dump-autoload -o
on the root folder - run
cp .env.example .env
on the root folder - [in app folder] create your classes (routes will generate automatically from these classes)
- [in app folder] create your views
- if you like it, star it
route format is: example.com/foo/bar/slashed_params
this means: if you want above route, follow these steps:
- create FooController.php in app/controllers
- create
pubic function bar()
in it - specify request type,
post_bar()
, just gets POST request
- your options are HTTP request types:
get_
,post_
,put_
,patch_
,delete_
,... - if you are going to accept all kind of methods, use
any_
- no route.php file, because this is SIMPLE MVC
if you want to return a view as a result of a route in corresponded function (that described in Routing section), do this:
return View::show('home.index')
this means, send /app/views/home/index.blade.php to client
- You have powerful blade engine here, many thanks to @jenssegers
- Do not echo anything, because it is MVC
my next TODO ...
run artisan by php artisan
You can create your own commands simply by creating its class in app/commands
For a command like php artisan foo:bar params
just create a Foo.php
as a class and define public funtion bar()
in it
For a command like php artisan foo params
define method public function index()
like Demo class
To get version number of Simpha, run php artisan version
You have .env file here, and an ENV_Parser helps to parse it.
Read env flags like this:
env_get('flag_label','default_value')
If you want to participate in this repo, you always welcomed. Parts to contribution:
- Adding New Features
- Testing
- Performance Improvement
- Clean Code advices