itsgoingd / slim-facades

"Static" interface for various Slim features
74 stars 9 forks source link

A simple example #1

Closed fdisotto closed 10 years ago

fdisotto commented 10 years ago

Hi, very nice for this work, I very like it :)

But I think we need a more complete example to a properly use of these facades. An example like this:

require_once __DIR__ . '/../vendor/autoload.php';

use SlimFacades\Facade;

$app = new \Slim\Slim();

Facade::setFacadeApplication($app);
Facade::registerAliases();

Config::set('debug', true);

Route::get('/hello/:name', function($name) {
    echo "Hello, $name";
});

App::run();

If you like it please add it to your readme :) Thanks in advance.

itsgoingd commented 10 years ago

Hey, I've updated the install section of the readme with a more complete example (https://github.com/itsgoingd/slim-facades/commit/6e41e61cce634181ddb96256056eada6b7683cea).

fdisotto commented 10 years ago

Thank you.