sephy framework
1.0.0
A simple php framework using MVC structure and components of Symfony and Illuminate.
Some of the features supported by Sephy:
There are lots of features that have yet to be implemented, if you have any good ideas, feel free to submit a pull request!
Get started now!
git clone https://github.com/adrielov/sephy-framework.git
cd sephy-framework
composer install
Blade is the simple, yet powerful templating engine provided with Laravel. Unlike other popular PHP templating engines, Blade does not restrict you from using plain PHP code in your views.
class HomeController extends Controller
{
public function index() {
$this->params['title'] = "Sephy Simple PHP Framework";
$this->view('home.index',$this->params);
}
}
Configure yours routes in App/config.php
$router->add('/', 'HomeController::index');
$router->get('/profile', 'UserController::profile');
$router->get('/profile/{id}', 'UserController::profile',[
'id' => '[0-9]'
]);
The prefix group attribute may be used to prefix each route in the group with a given URI, like /dashboard/home
$router->prefix('dashboard', function (CoreRouter $router) {
$router->add('/home', 'DashboardController::index');
$router->add('/config', 'DashboardController::config');
});
Middleware are filters to your routes, and often used for modifying or authenticating requests.
$router->group(['middleware' => ['auth']], function (CoreRouter $router) {
$router->add('/profile', 'UserController::profile');
});