Where To Start Editing
Add a new page
The minimal workflow is controller + route + view.
1. Create a controller method
<?php
namespace Keel\App\Controllers;
use Keel\Core\Controller;
use Keel\Core\Request;
class ExampleController extends Controller
{
public function index(Request $request): void
{
$this->view('example.index', ['title' => 'Example']);
}
}
2. Register the route in routes/web.php
use Keel\App\Controllers\ExampleController;
$router->get('/example', [ExampleController::class, 'index']);
3. Create the view
<!-- views/example/index.php -->
<!DOCTYPE html>
<html lang="en">
<head>
<?php require __DIR__ . '/../partials/head.php'; ?>
</head>
<body>
<main class="mx-auto max-w-4xl p-6">
<h1 class="text-2xl font-semibold">Example</h1>
</main>
</body>
</html>
Renaming Keel for a new project
- Update
composer.jsonpackagename. - Update
package.jsonpackagename. - Update
.env:APP_NAME,APP_URL, andDB_DATABASE. - Swap brand assets in
public_html/images/brand/and matching resource images. - Review landing-page copy in
views/welcome.php.