PHP code example of fgascon / microframe

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

    

fgascon / microframe example snippets




$appPath = dirname(__FILE__).'/app';




return array(
    '),
	'urls'=>array(
		'/'=>'main/index',
		'login'=>'auth/login',
		'logout'=>'auth/logout',
	),
	'databases'=>array(
		'default'=>array(
			'dsn'=>'mysql:unix_socket=/var/lib/mysql/mysql.sock;dbname=defaultdb',
			'username'=>'myuser',
			'password'=>'mypassword',
		),
	),
    'services'=>array(
        'states'=>array(
            'type'=>'redis',
        ),
        'redis'=>array(
        	'socket'=>'/tmp/redis.sock',
        ),
    ),
);




class MainController extends MFJsonController
{
	
	public function actionIndex()
	{
		return array(
			'name'=>"My App",
			'version'=>'1.0.0',
		);
	}
}