PHP code example of rad / rad-framework

1. Go to this page and download the library: Download rad/rad-framework 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/ */

    

rad / rad-framework example snippets





 new \Rad\Rad(__DIR__ . "/config/");

...




class Exemple extends \Rad\Controller\Controller {
    
    /**
     * @get /
     * @produce html
     */
    public function html(ServerRequestInterface $request, ResponseInterface $response, array $args): ResponseInterface {
        $response->getBody()->write("<b>Hello World</b>");
        return $response;
    }

}


$app->addControllers([
    Example:class
]);


$app->run();


$app->run(function(){
	echo "End";
});
bash

php -v