Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 382 Bytes

README.MD

File metadata and controls

27 lines (23 loc) · 382 Bytes

Run Slim Framework From Command-line

How To use?

$cliEnvironment = new \Slim\Extras\Environment();

$app = new \Slim\Slim(array(
    'environment' => $cliEnvironment
));
$app->get(
    '/hello/:name',
    function ($name) {
        echo "Hello, $name";
    }
);
$app->run();

Command-line

php test.php hello Ahmet
#Output
Hello, Ahmet