PHPackages                             lighthouse/skeleton - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. lighthouse/skeleton

ActiveProject[Framework](/categories/framework)

lighthouse/skeleton
===================

Lighthouse Framework Application Skeleton

v0.1.0(6mo ago)02MITPHPPHP ^8.2CI passing

Since Dec 17Pushed 6mo agoCompare

[ Source](https://github.com/RichardTrujilloTorres/skeleton)[ Packagist](https://packagist.org/packages/lighthouse/skeleton)[ RSS](/packages/lighthouse-skeleton/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

Lighthouse Application
======================

[](#lighthouse-application)

A fresh [Lighthouse Framework](https://github.com/lighthouse-php) application.

Installation
------------

[](#installation)

```
composer create-project lighthouse/skeleton my-app
cd my-app
```

Development Server
------------------

[](#development-server)

Start the built-in PHP server:

```
composer start
```

Then visit

Project Structure
-----------------

[](#project-structure)

```
my-app/
├── config/
│   └── app.php          # Application configuration
├── public/
│   ├── index.php        # Entry point
│   └── .htaccess        # Apache rewrite rules
├── routes/
│   └── web.php          # Route definitions
├── src/
│   └── Controllers/     # Your controllers
├── views/
│   ├── layouts/         # Layout templates
│   └── *.php            # View templates
├── tests/               # Test files
├── .env.example         # Environment template
└── composer.json

```

Configuration
-------------

[](#configuration)

Copy `.env.example` to `.env` and adjust settings:

```
cp .env.example .env
```

Or configure directly in `config/app.php`.

Creating Routes
---------------

[](#creating-routes)

Edit `routes/web.php`:

```
// Closure route
$app->get('/hello', function () {
    return 'Hello, World!';
});

// Controller route
$app->get('/users', [UserController::class, 'index']);

// Route with parameter
$app->get('/users/{id}', [UserController::class, 'show']);

// Route group
$app->group('/api', function ($router) {
    $router->get('/users', [ApiUserController::class, 'index']);
});

// Named route
$app->get('/profile', [ProfileController::class, 'show'])->name('profile');
```

Creating Controllers
--------------------

[](#creating-controllers)

Create a new controller in `src/Controllers/`:

```
