A simple PHP framework

dev-master 2020-05-06 09:00 UTC


A simple PHP framework inspired by Laravel

CircleCI Scrutinizer Code Quality CircleCI


Vertex makes use of Composer to autoload its dependencies. Be sure to run the following command after downloading the framework.

composer install


Once all the dependencies have been installed you can get started using Gulp. This step is completely optional and you can skip this if your project doesnt require a build step!

Firstly, ensure that you have both Node.js and NPM are installed on your machine. You can check this by running the -v command:

node -v
npm -v

Next, you will need to pull in Gulp as a global NPM package:

npm install --global gulp-cli

After that you will then need to run the npm install command to pull in all of the Gulp dependencies

npm install

Finally run the gulp commmand on the root of your project.


All configuration options are specified in the .env file in the root directory. By default you will get an example file to get you started.


There is also the option of manually declaring your setting in the /config directory. Simply go into any of the files in this directory and manually replace the getenv() functions with your desired configuration.

You can easily access any of your config options in Vertex by using the Config::get() method. Supply a string to the method (eg Config::get('database')) and it will return an array of all the values specified in that file, in this case it would be /config/database.php.


Vertex uses FastRoute for all its routing needs. Routes are stored in the app/routes.php file. Please visit the following repo for full documentation https://github.com/nikic/FastRoute.

Here are some example routes:

/* standard routes */
$route->get('/test', 'ControllerName@MethodName');
$route->post('/test', 'ControllerName@MethodName');
$route->put('/test', 'ControllerName@MethodName');
$route->delete('/test', 'ControllerName@MethodName');

/* route with parameters */
$route->get('/test/{parameter}', 'ControllerName@MethodName');

/* route with closure */
$route->get('/test', function(){
  return 'Test!';

/* route group */
$route->addGroup('/admin', function ($route) {
    $route->get('/dashboard', 'AdminController@dashboard'); // admin/dashboard
    $route->get('/pages', 'AdminController@pages');         // admin/pages
    $route->get('/posts', 'AdminController@posts');         // admin/posts


Vertex uses Laravels fantastic Blade templating engine. Views are stored in the app/resources/views/ directory and must have the file extension of .blade.php. Please visit https://laravel.com/docs/5.3/blade for full documentation.

Here is an example blade template:

        <title>App Name - @yield('title')</title>
            This is the master sidebar.

        <div class="container">