Cmd/Ctrl + K

Getting started

Annabel is a small PHP framework for building web applications with explicit configuration, service providers, a container, routing, middleware, views, database access, queues, scheduled tasks, and testing helpers.

The framework is assembled from independent Codemonster packages, but application documentation is organized around the tasks you perform in an Annabel app: routing, configuration, validation, sessions, queues, migrations, and deployment.

Create your first application

Create a project from the skeleton and start its local development server.

Open http://localhost:8000.

Directory overview

The generated project separates application code, configuration, routes, resources, and runtime data.

  • app/: application controllers and models.
  • bootstrap/app.php: application bootstrap.
  • bootstrap/providers/: application service providers.
  • config/: framework and package configuration.
  • database/migrations/: application migrations.
  • public/index.php: front controller.
  • resources/: views, CSS, and JavaScript.
  • routes/web.php: HTTP routes.
  • routes/schedule.php: scheduled tasks.

First route

Register a route that delegates the home page request to a controller.

First controller

The controller prepares the data passed to the corresponding view.

Next steps

Start with these pages:

Then try a recipe: