PHPackages                             aichadigital/lara-content - 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. aichadigital/lara-content

ActiveLibrary

aichadigital/lara-content
=========================

Content management package for Laravel with pages, posts, blocks and menus. Blade + Livewire, multilingual support.

012↓100%[1 PRs](https://github.com/AichaDigital/lara-content/pulls)PHPCI passing

Since Jan 25Pushed 1mo agoCompare

[ Source](https://github.com/AichaDigital/lara-content)[ Packagist](https://packagist.org/packages/aichadigital/lara-content)[ RSS](/packages/aichadigital-lara-content/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Lara Content
============

[](#lara-content)

> **ALPHA VERSION**: This package is in early development. The API may change without notice. Not recommended for production use yet.

[![Latest Version on Packagist](https://camo.githubusercontent.com/3aad976abba29d9b115fe4e30bddee4e31781b1f6d50c8c7b53c8b166ba5d258/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61696368616469676974616c2f6c6172612d636f6e74656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aichadigital/lara-content)[![GitHub Tests Action Status](https://camo.githubusercontent.com/6f496cf382938d3d4ce5454876155f32da7eebfb7cc2923ddd99d4e7affbd37e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61696368616469676974616c2f6c6172612d636f6e74656e742f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/aichadigital/lara-content/actions?query=workflow%3ACI+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f08ece19756b5c42390c67f6d17d0792589333d5e100afb68824aa10148f2bf2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61696368616469676974616c2f6c6172612d636f6e74656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aichadigital/lara-content)

Content management package for Laravel with pages, posts, blocks and menus. Supports Blade templates with optional Livewire components for interactivity. Includes multilingual support via Spatie Translatable.

Features
--------

[](#features)

- **Pages**: Flexible page system with customizable layouts and block zones
- **Posts**: Blog/news posts with author attribution and publishing workflow
- **Menus**: Hierarchical menu system with nested items
- **Blocks**: Modular content blocks (HTML, Recent Posts, Menu, Contact Form)
- **Layouts**: Pre-built page layouts (Single, Sidebar Left/Right, Two/Three Column)
- **Multilingual**: Full translation support via spatie/laravel-translatable
- **Extensible**: Register custom layouts and blocks via registries
- **Secure**: HTML sanitization with configurable allowed tags

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 12+
- Livewire 3+ (optional, for interactive blocks)

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

[](#installation)

Install via composer:

```
composer require aichadigital/lara-content
```

Publish and run migrations:

```
php artisan vendor:publish --tag="lara-content-migrations"
php artisan migrate
```

Publish the config file:

```
php artisan vendor:publish --tag="lara-content-config"
```

Optionally publish views for customization:

```
php artisan vendor:publish --tag="lara-content-views"
```

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

[](#configuration)

Key configuration options in `config/content.php`:

```
return [
    // User ID type: 'auto', 'int', 'uuid', 'ulid'
    'user_id_type' => env('CONTENT_USER_ID_TYPE', 'auto'),

    // Author model for posts
    'author_model' => env('CONTENT_AUTHOR_MODEL', 'App\\Models\\User'),

    // Cache settings
    'cache' => [
        'enabled' => env('CONTENT_CACHE_ENABLED', true),
        'default_ttl' => env('CONTENT_CACHE_TTL', 3600),
    ],

    // Security: allowed HTML tags and attributes
    'security' => [
        'allowed_tags' => ['p', 'br', 'strong', 'em', 'a', 'img', ...],
        'allowed_attributes' => [...],
    ],
];
```

Usage
-----

[](#usage)

### Pages

[](#pages)

Pages support flexible layouts with multiple content zones:

```
use AichaDigital\LaraContent\Models\Page;

// Create a page
$page = Page::create([
    'title' => 'About Us',
    'slug' => 'about-us',
    'layout' => 'sidebar-right',
    'status' => 'published',
]);

// Add blocks to zones
$page->blocks()->create([
    'zone' => 'main',
    'block_type' => 'html',
    'content' => ['html' => 'Welcome to our company...'],
    'order' => 1,
]);
```

### Posts

[](#posts)

Blog posts with author attribution:

```
use AichaDigital\LaraContent\Models\Post;

$post = Post::create([
    'title' => 'Getting Started',
    'slug' => 'getting-started',
    'content' => '# Introduction...',
    'author_id' => auth()->id(),
    'status' => 'published',
    'published_at' => now(),
]);
```

### Menus

[](#menus)

Hierarchical menus with nested items:

```
use AichaDigital\LaraContent\Models\Menu;

$menu = Menu::create([
    'name' => 'Main Navigation',
    'slug' => 'main-nav',
]);

$menu->items()->create([
    'title' => 'Home',
    'url' => '/',
    'order' => 1,
]);
```

### Blocks

[](#blocks)

Render blocks in your views:

```
@foreach($page->blocks as $block)
    {!! app(BlockRenderer::class)->render($block) !!}
@endforeach
```

Available Layouts
-----------------

[](#available-layouts)

SlugNameZones`single`Single Columnmain`sidebar-left`Sidebar Leftmain, sidebar`sidebar-right`Sidebar Rightmain, sidebar`two-column`Two Columnleft, right`three-column`Three Columnleft, center, rightAvailable Blocks
----------------

[](#available-blocks)

SlugNameInteractiveDescription`html`HTML BlockNoRaw HTML content`recent-posts`Recent PostsNoList of recent posts`menu`Menu BlockNoRender a menu`contact-form`Contact FormYesLivewire contact formExtending
---------

[](#extending)

### Custom Layouts

[](#custom-layouts)

Register custom layouts in your service provider:

```
use AichaDigital\LaraContent\Registries\LayoutRegistry;
use App\Content\Layouts\CustomLayout;

public function boot(): void
{
    app(LayoutRegistry::class)->register(new CustomLayout());
}
```

### Custom Blocks

[](#custom-blocks)

Register custom blocks:

```
use AichaDigital\LaraContent\Registries\BlockRegistry;
use App\Content\Blocks\CustomBlock;

public function boot(): void
{
    app(BlockRegistry::class)->register(new CustomBlock());
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for recent changes.

License
-------

[](#license)

AGPL-3.0-or-later. See [License File](LICENSE.md) for details.

---

Lara Content (Español)
======================

[](#lara-content-español)

> **VERSION ALPHA**: Este paquete está en desarrollo inicial. La API puede cambiar sin previo aviso. No recomendado para producción todavía.

Paquete de gestión de contenido para Laravel con páginas, posts, bloques y menús. Soporta plantillas Blade con componentes Livewire opcionales para interactividad. Incluye soporte multilingüe via Spatie Translatable.

Características
---------------

[](#características)

- **Páginas**: Sistema flexible de páginas con layouts personalizables y zonas de bloques
- **Posts**: Posts de blog/noticias con atribución de autor y flujo de publicación
- **Menús**: Sistema jerárquico de menús con elementos anidados
- **Bloques**: Bloques de contenido modulares (HTML, Posts Recientes, Menú, Formulario de Contacto)
- **Layouts**: Layouts predefinidos (Una Columna, Sidebar Izquierda/Derecha, Dos/Tres Columnas)
- **Multilingüe**: Soporte completo de traducciones via spatie/laravel-translatable
- **Extensible**: Registra layouts y bloques personalizados via registries
- **Seguro**: Sanitización HTML con tags permitidos configurables

Requisitos
----------

[](#requisitos)

- PHP 8.3+
- Laravel 12+
- Livewire 3+ (opcional, para bloques interactivos)

Instalación
-----------

[](#instalación)

Instalar via composer:

```
composer require aichadigital/lara-content
```

Publicar y ejecutar migraciones:

```
php artisan vendor:publish --tag="lara-content-migrations"
php artisan migrate
```

Publicar archivo de configuración:

```
php artisan vendor:publish --tag="lara-content-config"
```

Opcionalmente publicar vistas para personalización:

```
php artisan vendor:publish --tag="lara-content-views"
```

Uso
---

[](#uso)

### Páginas

[](#páginas)

```
use AichaDigital\LaraContent\Models\Page;

// Crear una página
$page = Page::create([
    'title' => 'Sobre Nosotros',
    'slug' => 'sobre-nosotros',
    'layout' => 'sidebar-right',
    'status' => 'published',
]);

// Añadir bloques a zonas
$page->blocks()->create([
    'zone' => 'main',
    'block_type' => 'html',
    'content' => ['html' => 'Bienvenido a nuestra empresa...'],
    'order' => 1,
]);
```

### Posts

[](#posts-1)

```
use AichaDigital\LaraContent\Models\Post;

$post = Post::create([
    'title' => 'Primeros Pasos',
    'slug' => 'primeros-pasos',
    'content' => '# Introducción...',
    'author_id' => auth()->id(),
    'status' => 'published',
    'published_at' => now(),
]);
```

### Menús

[](#menús)

```
use AichaDigital\LaraContent\Models\Menu;

$menu = Menu::create([
    'name' => 'Navegación Principal',
    'slug' => 'nav-principal',
]);

$menu->items()->create([
    'title' => 'Inicio',
    'url' => '/',
    'order' => 1,
]);
```

Layouts Disponibles
-------------------

[](#layouts-disponibles)

SlugNombreZonas`single`Una Columnamain`sidebar-left`Sidebar Izquierdamain, sidebar`sidebar-right`Sidebar Derechamain, sidebar`two-column`Dos Columnasleft, right`three-column`Tres Columnasleft, center, rightBloques Disponibles
-------------------

[](#bloques-disponibles)

SlugNombreInteractivoDescripción`html`Bloque HTMLNoContenido HTML`recent-posts`Posts RecientesNoLista de posts recientes`menu`Bloque MenúNoRenderiza un menú`contact-form`Formulario ContactoSíFormulario LivewireExtensión
---------

[](#extensión)

### Layouts Personalizados

[](#layouts-personalizados)

```
use AichaDigital\LaraContent\Registries\LayoutRegistry;
use App\Content\Layouts\MiLayout;

public function boot(): void
{
    app(LayoutRegistry::class)->register(new MiLayout());
}
```

### Bloques Personalizados

[](#bloques-personalizados)

```
use AichaDigital\LaraContent\Registries\BlockRegistry;
use App\Content\Blocks\MiBloque;

public function boot(): void
{
    app(BlockRegistry::class)->register(new MiBloque());
}
```

Tests
-----

[](#tests)

```
composer test
```

Licencia
--------

[](#licencia)

AGPL-3.0-or-later. Ver [archivo de licencia](LICENSE.md) para detalles.

###  Health Score

22

—

LowBetter than 24% of packages

Maintenance61

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

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/0a4694c48c325d3dfbc4c43d97c2617f9317d7a447971750c338f943a88bd164?d=identicon)[abkrim](/maintainers/abkrim)

---

Top Contributors

[![abkrim](https://avatars.githubusercontent.com/u/1238625?v=4)](https://github.com/abkrim "abkrim (5 commits)")

### Embed Badge

![Health badge](/badges/aichadigital-lara-content/health.svg)

```
[![Health](https://phpackages.com/badges/aichadigital-lara-content/health.svg)](https://phpackages.com/packages/aichadigital-lara-content)
```

PHPackages © 2026

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