PHPackages                             bead/app - 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. bead/app

ActiveLibrary[Framework](/categories/framework)

bead/app
========

Skeleton app using the bead framework

09PHP

Since Feb 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/darrenedale/bead-app)[ Packagist](https://packagist.org/packages/bead/app)[ RSS](/packages/bead-app/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Bead App
========

[](#bead-app)

This is a skeleton application using the *bead* PHP MVC framework. Use it to kickstart your own project.

Models
------

[](#models)

Your model classes should extend `Bead\Database\Model` and should be placed in the `app/Models` directory. To create a basic model class for a table in your app's database, extend `Bead\Database\Model` and provide two static member variables: `$table` should contain the name of the table in the database and `$properties` should be an array of column names (array keys) and column types (array values) for each of the columns in the table. This is all that's needed for a simple table's model.

Views
-----

[](#views)

A simple layout - `layouts.main` - is provided for you to customise for your app. The home page view uses this layout for its content. Use layouts to keep pages in your app consistently structured. You can have as many layouts as you need if different parts of your app need different page structures. You can also use views and layouts for things like email bodies and downloads.

Views and layouts are ordinary PHP files. You should place them in the `views` directory. You can structure this directory however you wish, placing layouts and views in subdirectories that suit your app. Views are used by providing the view name and its data array to the `Bead\View` constructor (e.g. `new View("home", ["foo" => "bar"]))`. If you have views in subdirectories, use dot-notation for the name of the view. For example, if you have a view named `views/admin/edit-user.php` you would use it by calling `new View("admin.edit-user")`.

Views are isolated from the rest of the app. They only have access to the data explicitly provided to them, plus the variable `$app`, which is the `WebApplication` instance. Views access the data provided to them either using the `$data`variable (which is the array of data provided to the view) or by referencing the keys of the view data as variable names. For example, if a view is used by calling `new View("home", ["foo" => "bar"])` in the view file the variable `$foo` will have the value "bar".

Controllers
-----------

[](#controllers)

Controllers are PHP classes. They don't need to inherit any specific class, they just need some public methods to connect to routes. Place them in `app/Controllers`. One - `HomeController` - is provided as a simple example. The controller methods you connect to routes should return an object that implements the `Bead\Contracts\Web\Response`contract. All views implement this contract.

Routes
------

[](#routes)

Routes connect URLs with handlers (usually public methods in your controllers). Routes are defined in route files, which you should place in the `routes/` directory. Route files are plain PHP files that should register route handlers with the app's `Router`. If you're using the built-in router, this is a simple case of calling one of the register methods on the provided `Router` instance (e.g. `$router->registerGet()`). Each route file has two variables available to it: `$router` is the app's `Router` and `$app` is the `WebApplication` instance.

The example `routes/web.php` route file connects the `HomeController`'s `showHomePage()` method to the root URL of your app (i.e. the home page).

Route files are isolated from the rest of the app - they do not have access to any of the app's variables, only the `$app` and `$router` variables and PHP's superglobals. Every file inside the `routes/` directory is automatically loaded when you call `WebApplication::exec()`.

Config
------

[](#config)

Your app is configured by the files in the `config/` directory. Config files are plain PHP files that should each return an array of configuration directives. Configuration is accessed via the `WebApplication::config()` method, using dot-notation. For example, to access the application's title call `WebApplication::instance()->config("app.title")`. This call expects the file `config/app.php` to include the key "title" in the array it returns.

You can add as many configuration files as your app's requirements dictate. You cannot, however, place config files in subdirectories inside `config/`. All config files are loaded automatically as soon as you instantiate your `WebApplication` object.

Encryption
----------

[](#encryption)

The framework has encryption services built in. There are configured in the `crypto.php` config file (see the below for details on config files). In the default configuration the services are enabled and set up to use sodium, which means you need to specify an encryption key for your app. It is recommended that you do this by setting the `BEAD_APP_ENCRYPTION_KEY` environment variable in your app's `.env` file (never commit your .env file to your repository).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance56

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f02407f95953bc62df9f11df5d277e44a50c7bc752d500e1be79168fbd316329?d=identicon)[dedaleus](/maintainers/dedaleus)

---

Top Contributors

[![darrenedale](https://avatars.githubusercontent.com/u/26558174?v=4)](https://github.com/darrenedale "darrenedale (13 commits)")

### Embed Badge

![Health badge](/badges/bead-app/health.svg)

```
[![Health](https://phpackages.com/badges/bead-app/health.svg)](https://phpackages.com/packages/bead-app)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
