1. Go to this page and download the library: Download ursuleacv/wallaby 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/ */
ursuleacv / wallaby example snippets
namespace App\Controllers;
use Wallaby\Base\Controller;
class BaseController extends Controller
{
/**
*
*
* @return void
*/
public function __construct()
{
parent::__construct();
$this->theme = 'default';
$this->layout = 'layouts/main';
}
}
namespace App\Controllers;
class HomeController extends BaseController
{
/**
*
*
* @return void
*/
public function __construct()
{
parent::__construct();
$this->theme = 'default'; // You can override the theme
$this->layout = 'layouts/main';
}
/**
* @return void
*/
public function autoLogin()
{
//
}
}
date_default_timezone_set('UTC');
use Wallaby\Router;
error_reporting(-1);
defined('ROOT') or define('ROOT', __DIR__);
defined('PUBLIC_DIR') or define('PUBLIC_DIR', 'public');
$config = $configRouter =