Installation
Requirements
- PHP 8.2 or higher
- Composer
Creating a New Project
The easiest way to get started is with the Lighthouse skeleton:
bash
composer create-project lighthouse/skeleton my-appThis creates a new directory with a fully configured Lighthouse application.
Starting the Development Server
bash
cd my-app
composer startThis starts PHP's built-in server at http://localhost:8000.
Manual Installation
If you prefer to start from scratch:
bash
mkdir my-app
cd my-app
composer init
composer require lighthouse/frameworkThen create your entry point:
php
// public/index.php
<?php
require __DIR__ . '/../vendor/autoload.php';
use Lighthouse\Application;
$app = new Application(
basePath: dirname(__DIR__),
debug: true
);
$app->get('/', function () {
return 'Hello, Lighthouse!';
});
$app->run();What's Included
The skeleton includes:
my-app/
├── config/
│ └── app.php # Application configuration
├── public/
│ └── index.php # Entry point
├── routes/
│ └── web.php # Route definitions
├── src/
│ └── Controllers/ # Your controllers
├── views/
│ └── layouts/ # View templates
└── composer.jsonNext Steps
- Configuration — Configure your application
- Routing — Define routes
- Controllers — Create controllers