PHP code example of junker / controller-service-provider

1. Go to this page and download the library: Download junker/controller-service-provider 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/ */

    

junker / controller-service-provider example snippets


use Junker\Silex\Provider\ControllerServiceProvider;

$app->register(new ControllerServiceProvider());

$app->get('/', 'AppController::index');


use Junker\Silex\Controller;

class AppController extends Controller
{

	public function index()
	{
		$app = $this->app;
		$request = $this->request;

		return 'hello';
	}
	
}