PHP code example of starlit / app
1. Go to this page and download the library: Download starlit/app 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/ */
starlit / app example snippets
// In public index.php file
$app = new BaseApp();
$request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
$response = $app->handle($request);
$response->send();
// IndexController.php
class IndexController extends AbstractController
{
public function indexAction()
{
$this->view->headline = 'Hello, world!"
}
}
// index.html.php