PHPackages                             antonioprimera/laravel-web-page - 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. [Templating &amp; Views](/categories/templating)
4. /
5. antonioprimera/laravel-web-page

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

antonioprimera/laravel-web-page
===============================

An extensible, translatable and manageable web page component

v2.2(4y ago)020MITPHP

Since Feb 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/AntonioPrimera/laravel-web-page)[ Packagist](https://packagist.org/packages/antonioprimera/laravel-web-page)[ RSS](/packages/antonioprimera-laravel-web-page/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (21)Used By (0)

Your new package name
=====================

[](#your-new-package-name)

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

[](#installation)

Usage
-----

[](#usage)

Architecture
------------

[](#architecture)

The web page uses Components and Bits to be able to store any configurable data. Components are used to group other components and bits. Bits are used to store texts, image urls or any other data which will be displayed.

### Components

[](#components)

Components are Eloquent Models,

### Bits

[](#bits)

### Creating a recipe (via Artisan)

[](#creating-a-recipe-via-artisan)

To create a new recipe file, you can use the following artisan command:

`php artisan web-page:make:recipe RecipeName`

This will generate a simple recipe file, something like a database migration, where you can define the list of components and bits to be created at root level and their component and bit structures.

If you want to create a complex recipe, defining the components, aliases and bit aliases, you can add the flag `--complex` to the above artisan command.

### Creating / deleting components using a recipe file

[](#creating--deleting-components-using-a-recipe-file)

Once you have created a recipe file, with the necessary components and bits for your web page, you can use another artisan command to actually create the Web Components defined in the file as Eloquent Models in the database:

`php artisan web-page:recipe RecipeName`

This will use the recipe file `RecipeName` and run its `up()` method to create the structure you returned from the `recipe()` method.

If you want to undo the creation of components from a recipe file, you can use the `--down` flag on the above command, which will look for all created Web Components and Bits and remove them (something like the 'migrate:rollback' command). This basically just runs the `down()` method of the recipe, which, if not overridden, will blindly try to remove all Eloquent Models created by the `up()`method recursively.

### ComponentManager

[](#componentmanager)

#### Creating a component

[](#creating-a-component)

Method signature:

`createComponent(string $description, array $definition = []): ?Component`

The description format is as follows: "**type:name:uid**". The type is mandatory, but the name and the uid are optional. If not provided, the uid will be the component name in kebab case. If not provided, the name will be the component type.

Examples:

- "Page:Home:home-page" will create a component of type "Page", with the name "Home" and the uid "home-page"
- "Page:Home" will create a component of type "Page", with the name "Home" and the uid "home"
- "Page" will create a component of type "Page", with the name "Page" and the uid "page"

The types must be described in the config: **webComponents.components**. Each component type must have the type as the key and an array with the component definition as the value. If a component must contain other components the list of components will be provided as an indexed array. If a component must contain a set of bits, the list of bits will be provided as an indexed array.

Config sample (webComponents.php):

```
    return [
        'components' => [
            'Page' => [],

            'Section' => [],

            'Link' => [
                'bits' => [
                    'Label', 'Url'
                ]
            ],

            'Picture' => [
                'bits' => [
                    'Source', 'Label'
                ]
            ],
        ],

        'bits' => [
            'ShortText' => [
                'editor'   => 'input#text',				//default editor, so it can be omitted
                'rules'    => ['string', 'max:255'],
            ],

            'LongText' => [
                'editor' => 'textarea',
                'rules'  => ['string'],					//default rule, so it can be omitted
            ],

            //short text aliases
            'Label' => 'alias:ShortText',
            'Title' => 'alias:ShortText|required',
            'Url'   => 'alias:ShortText|rules:url',

            //used for file uploads by the admin
            'File' => [
                'editor' => 'input#file',
            ],
        ],
    ];
```

#### Creating a bit

[](#creating-a-bit)

Method signature:

`createBit(string $description): ?Bit`

The description format is as follows: "**type:name:uid**". The type is mandatory, but the name and the uid are optional. If not provided, the uid will be the bit name in kebab case. If not provided, the name will be the bit type.

Examples:

- "Title:MainTitle:main-title" will create a Bit of type "Title", with the name "MainTitle" and the uid "main-title"
- "Title:PageTitle" will create a Bit of type "Title", with the name "PageTitle" and the uid "page-title"
- "Title" will create a Bit of type "Title", with the name "Title" and the uid "title"

### Helper

[](#helper)

webPage()-&gt;getLanguage()

### Facade

[](#facade)

WebPage::getLanguage()

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~4 days

Total

11

Last Release

1506d ago

Major Versions

v0.4 → v2.12022-02-24

v1.0 → v2.02022-03-16

v1.3 → v2.22022-03-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/77cac31fc31444fb45ef19e3628a7b243b5456679a9e6db635aa3b979bfdbefc?d=identicon)[AntonioPrimera](/maintainers/AntonioPrimera)

### Embed Badge

![Health badge](/badges/antonioprimera-laravel-web-page/health.svg)

```
[![Health](https://phpackages.com/badges/antonioprimera-laravel-web-page/health.svg)](https://phpackages.com/packages/antonioprimera-laravel-web-page)
```

###  Alternatives

[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

703141.0k7](/packages/tallstackui-tallstackui)[laravel-views/laravel-views

Laravel package to create beautiful common views like tables using only PHP code

63891.6k](/packages/laravel-views-laravel-views)[vildanbina/livewire-wizard

Laravel Livewire Wizard (Multi-Step Form) component

34919.4k](/packages/vildanbina-livewire-wizard)[livewire-filemanager/filemanager

A simple, friendly and practical Livewire filemanager for your applications

3587.6k1](/packages/livewire-filemanager-filemanager)[victorybiz/laravel-simple-select

Laravel Simple Select inputs component for Blade and Livewire.

13721.1k](/packages/victorybiz-laravel-simple-select)[dasundev/livewire-quill-text-editor

A powerful livewire rich text editor component built top of Quill.

3833.9k](/packages/dasundev-livewire-quill-text-editor)

PHPackages © 2026

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