1. Go to this page and download the library: Download windwalker/warder 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/ */
windwalker / warder example snippets
php
// src/Windwalker/Windwalker.php
use Phoenix\PhoenixPackage;
use Lyrasoft\Warder\WarderPackage;
// ...
public static function loadPackages()
{
return array(
'system' => new SystemPackage,
'phoenix' => new PhoenixPackage, // You must install phoenix first
'warder' => new WarderPackage, // Add warder package
// Prepare an admin and frontend package
'admin' => AdminPackage,
'front' => FrontPackage
);
}
// ...
php
// src/Front/FrontPackage.php
use Lyrasoft\Warder\Helper\WarderHelper;
// ...
// ...
public function loadRouting()
{
// ...
$routes = array_merge($routes, WarderHelper::getFrontendRouting());
return $routes;
}
php
// src/Admin/AdminPackage.php
// ...
public function loadRouting()
{
// ...
$routes = array_merge($routes, WarderHelper::getAdminRouting());
return $routes;
}
// ...
php
namespace Front\Controller\User;
class LoginGetController extends \Lyrasoft\Warder\Controller\User\LoginGetController
{
protected function prepareModelState(Model $repository)
{
// Do something
parent::prepareModelState($repository);
}
}