1. Go to this page and download the library: Download danc0/gimliduck-php 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/ */
declare(strict_types=1);
p\Core\Config;
use App\Core\Cache;
define('APP_ROOT', __DIR__);
$App = Application::create(APP_ROOT, $_SERVER);
// set up your config and add it to the Application
$config_file = parse_ini_file(APP_ROOT . '/App/Core/config.ini', true);
$App->Config = $App->Injector->resolveFresh(Config::class, ['config' => $config_file]);
// Register a cache class with the Injector
$App->Injector->register(Cache::class, Cache::getCache($App->Config->admin_cache));
// Run Application
$App->run();
// Load routes from a file(s)
$App->loadRouteFiles([
'App/routes/web.php',
]);
Route::get('/', function(){
echo "Hello World"
});
// Single action controller, must use __invoke method
Route::get('/', Home_Controller::class);
// cli routes are single action Job classes
Route::cli('build-cache', Cache_Job::class);
Route::get('/', Home_Controller::class . '@homePage');
Route::get('/', [Home_Controller::class, 'homePage']);