This readme is still underconstruction so please bear with us.A video tutorial will be added
Matrix is a lightweight PHP framework designed with speed at its core. Matrix follows a very simple model-view-controller architecture so if you have ever used Symfony, Laravel or CodeIgnitor framework then you should feel at home.
- PHP 7.*
- Composer 1.6*
-
Clone/Download into your project directory and run
composer install
to install dependencies -
To serve it navigate to
project_path/public
and runphp -S localhost:8000
in your terminal. If you arlready have xampp installed then copy to your htdocs and access it in browser with http://localhost/Matrix
Matrix is a model->view-controller based web application framework and its largely inspired by Laravel and asuch follows its syntax.
The best way to start is to configure the app for your environment. The configuration file is located at the root of the project directory.ie path_to_project/config.php
and it contains an array of configurations. Below are a list of some basic configurations to start with.
- app : it contains the details of the app.
All application routes are stored in /routes.php file. Routes are easy to define by using the $route variable using the syntax below.
$route-><request method>('<controllerName>@<method>')
where;
request method
is the request method it should accept. Matrix currently supports five(5) HTTP request methods and these areGET,POST,DELETE,PUT,PATCH
controllerName
is the controller class it should use.method
is the class method to be used. This is also the output function because only the code in this function will run So a typicalGET
route will look like:$route->get("PostController@get")
Controllers contains the business logics of the application and a stored in /app/controllers/
directory.