How to make a Laravel microcard version?

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.

+3
source share
6 answers

This post by Mohammad Gufran, entitled “ Bring YOUR ROUTER FAILURE STATEMENT , may give you a preliminary overview of what can be done.

Summarizing:

  • , Composer.
  • , : "/": "4.1. *" "/": "4.1. *".
  • "index.php" "routes.php", .

Et voilà!

route.php:

$app['router']->get('/', function() {
    // Because 'Hello, World!' is too mainstream
    return 'Are you looking for me ?';
});
+7

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));
});
+5

, , "" Laravel, . Laravel .

:

  • -

  • , / HTTP Symfony

  • ,

  • CLI

  • MVC Blade Eloquent ORM .

  • .

  • Levereging Composer.

, , Laravel . Laravel. , . , - Laravel, - , Laravel, .

+4

Laravel Lumen, - Laravel. nikic/fast-route Symfony Routing .

+3

Laravel Symfony ( ), HTTP Foundation Symfony HTTP Foundation, - Symfony.

, , Laravel, Symfony, - Symfony ( composer).

:

, , , , Symfony, , .

+1

Check out the Laravel Framework Micro version here .

+1
source

All Articles