Skip to content

this is another micro php framework with basic component like routing, group routing, middleware, dependency injection and service container thats' it.

License

Notifications You must be signed in to change notification settings

dheerajv4855/simplex-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simplex-php framework

this is small utility for creating laravel style routing and controller, not exactly similar but it is. it also have middleware support and symfony like service container. for intializing routing we have to initialize App

route.php

<?php
$app = new App();
$router = $app->get("Router");
$router->get('/home',function()
{
	echo "From Home Route";
});

we can get any class with automatic dependency resolve using get function of app class

Controller Example

<?php
$router->get('/app','AppController@index');

Grouping Routes

<?php
$router->group('/app',function($router)
	{
		$router->get('/about','AboutController@index');
	});

Creating Middleware

<?php
$router->group('/app',function($router)
  {
  	$router->get('/about','AboutController@index');
  },['auth']);

middleware class should be declare inside Config/app.php $middleware array

Route Params

$router->get('/:user',function(Request $request,Response $response,$user)
{
  echo "From Home Route";
});

more features coming soon...

About

this is another micro php framework with basic component like routing, group routing, middleware, dependency injection and service container thats' it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published