1. Go to this page and download the library: Download ibnusyuhada/slim-tegar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ibnusyuhada / slim-tegar example snippets
ll Slim Tegar
$app = new IS\Slim\Tegar\App();
// register route with Closure
$app->get("/", function($response){
$response->write("Welcome to Slim!");
return $response;
});
// run Slim
$app->run();
namespace App\Controllers;
class ExampleController
{
public function index($response)
{
$response->write("Controller example with index as method");
return $response;
}
}