I'm thinking of creating a stripped-down version of Laravel that can be used as a micro-wireframe, sort of like the Silex of the Symfony world.
It seems to me that I need to use the Illuminate \ Routing component from Laravel (available through Packagist) and create a new Router instance, and then call → send the Request object on the router, but I'm not quite sure the right way to do this.
I would be grateful for your suggestions / solution.
This post by Mohammad Gufran, entitled “ Bring YOUR ROUTER FAILURE STATEMENT , may give you a preliminary overview of what can be done.
Summarizing:
Et voilà!
$app['router']->get('/', function() { // Because 'Hello, World!' is too mainstream return 'Are you looking for me ?'; });
Lumen " Laravel" .
:
<?php /** * Reimagine what you expect... */ $app->get('/', function() { return view('lumen'); }); /** * From your micro-framework... */ $app->post('framework/{id}', function($framework) { $this->dispatch(new Energy($framework)); });
, , "" Laravel, . Laravel .
-
, / HTTP Symfony
,
CLI
MVC Blade Eloquent ORM .
.
Levereging Composer.
, , Laravel . Laravel. , . , - Laravel, - , Laravel, .
Laravel Lumen, - Laravel. nikic/fast-route Symfony Routing .
nikic/fast-route
Laravel Symfony ( ), HTTP Foundation Symfony HTTP Foundation, - Symfony.
, , Laravel, Symfony, - Symfony ( composer).
, , , , Symfony, , .
Symfony
Check out the Laravel Framework Micro version here .