PHPackages                             solutionplus/dynamic-pages - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. solutionplus/dynamic-pages

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

solutionplus/dynamic-pages
==========================

A comprehensive dynamic-pages package with dynamic pages, sections, items, custom attributes, and keywords support

1.1.2(9mo ago)0392MITPHP

Since Jun 17Pushed 9mo agoCompare

[ Source](https://github.com/ah-mabrouk/dynamic_page_package)[ Packagist](https://packagist.org/packages/solutionplus/dynamic-pages)[ RSS](/packages/solutionplus-dynamic-pages/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

SolutionPlus Dynamic Pages
==========================

[](#solutionplus-dynamic-pages)

A comprehensive Laravel dynamic pages package that provides a robust content management system with pages, sections, items, custom attributes, and keywords support. Built with multilingual capabilities and media management integration.

Features
--------

[](#features)

- **Content Management**: Create and manage pages, sections, and section items
- **Multilingual Support**: Full Arabic and English translation support
- **Custom Attributes**: Flexible custom attribute system for enhanced content metadata
- **Keyword Management**: Organize content with a powerful keyword system
- **Media Integration**: Built-in media management capabilities
- **Admin Interface**: Complete admin controllers for content management
- **API Resources**: RESTful API endpoints for all entities
- **Filtering**: Advanced filtering capabilities for all content types
- **Validation**: Comprehensive form request validation
- **Database Migrations**: Automated database setup

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

[](#requirements)

- PHP 8.1+
- Laravel 11.0+
- MySQL/PostgreSQL database

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

[](#installation)

Install the package via Composer:

```
composer require solutionplus/dynamic-pages
```

### Quick Setup

[](#quick-setup)

Run the setup command to install and configure the package:

```
php artisan dynamic-pages:setup
```

This command will:

- Publish the configuration file
- Cache the configurations
- Optionally run migrations

### Manual Installation

[](#manual-installation)

If you prefer manual setup:

1. **Publish the configuration file:**

```
php artisan vendor:publish --provider="SolutionPlus\DynamicPages\DynamicPagesServiceProvider"
```

2. **Run the migrations:**

```
php artisan migrate
```

3. **Cache the configuration:**

```
php artisan config:cache
```

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

[](#configuration)

After installation, you can find the configuration file at `config/dynamic_pages.php`. Customize the package settings according to your needs.

Usage
-----

[](#usage)

### Models

[](#models)

The package provides several core models:

- **Page**: Main content pages
- **Section**: Content sections within pages
- **SectionItem**: Individual items within sections
- **CustomAttribute**: Flexible attribute system
- **Keyword**: Content organization and tagging

### Admin Controllers

[](#admin-controllers)

Access the admin functionality through the provided controllers:

- `PageController` - Manage pages
- `SectionController` - Manage sections
- `SectionItemController` - Manage section items
- `KeywordController` - Manage keywords
- `CustomAttributeController` - Manage custom attributes

### API Resources

[](#api-resources)

The package includes API resources for all entities, suitable for frontend frameworks or mobile applications.

### Multilingual Support

[](#multilingual-support)

All content models support Arabic and English translations out of the box. The package uses the `mabrouk/translatable` package for translation management.

### Filtering

[](#filtering)

Advanced filtering is available for all models using the `mabrouk/filterable` package. Filter classes are organized in:

- `Admin/` - Admin interface filters
- `Website/` - Frontend filters
- `Support/` - Support system filters

Dependencies
------------

[](#dependencies)

This package depends on:

- [mabrouk/translatable](https://github.com/ah-mabrouk/translatable) (&gt;=2.0) - Multilingual support
- [mabrouk/filterable](https://github.com/ah-mabrouk/filterable) (&gt;=1.0) - Advanced filtering
- [mabrouk/mediable](https://github.com/ah-mabrouk/mediable) (&gt;=3) - Media management

API Endpoints
-------------

[](#api-endpoints)

The package provides three types of API endpoints with different access levels:

### Admin Routes (Admin Interface)

[](#admin-routes-admin-interface)

Base prefix: Configurable via `dynamic_pages.package_admin_routes_prefix`

- **Pages Management:**

    - `GET /pages` - List all pages
    - `GET /pages/{path}` - Get specific page (by path)
    - `PUT /pages/{path}` - Update page
    - `PATCH /pages/{path}` - Partially update page
- **Keywords Management:**

    - `GET /keywords` - List all keywords
    - `POST /keywords` - Create keyword
    - `GET /keywords/{id}` - Get specific keyword
    - `PUT /keywords/{id}` - Update keyword
    - `PATCH /keywords/{id}` - Partially update keyword
    - `DELETE /keywords/{id}` - Delete keyword
- **Page Keywords:**

    - `GET /pages/{path}/keywords` - Get page keywords
    - `POST /pages/{path}/keywords` - Assign keyword to page
- **Sections Management:**

    - `GET /pages/{path}/sections` - List page sections
    - `GET /pages/{path}/sections/{identifier}` - Get specific section (by identifier)
    - `PUT /pages/{path}/sections/{identifier}` - Update section
    - `PATCH /pages/{path}/sections/{identifier}` - Partially update section
- **Section Media:**

    - `POST /sections/{identifier}/medias` - Upload section media
    - `DELETE /sections/{identifier}/medias/{id}` - Delete section media
- **Section Custom Attributes:**

    - `GET /pages/{path}/sections/{identifier}/custom-attributes` - List section attributes
    - `GET /pages/{path}/sections/{identifier}/custom-attributes/{key}` - Get specific attribute (by key)
    - `PUT /pages/{path}/sections/{identifier}/custom-attributes/{key}` - Update attribute
    - `PATCH /pages/{path}/sections/{identifier}/custom-attributes/{key}` - Partially update attribute
- **Section Items Management:**

    - `GET /pages/{path}/sections/{identifier}/section-items` - List section items
    - `GET /pages/{path}/sections/{identifier}/section-items/{item_identifier}` - Get specific item (by identifier)
    - `PUT /pages/{path}/sections/{identifier}/section-items/{item_identifier}` - Update item
    - `PATCH /pages/{path}/sections/{identifier}/section-items/{item_identifier}` - Partially update item
- **Section Item Media:**

    - `POST /section-items/{item_identifier}/medias` - Upload item media
    - `DELETE /section-items/{item_identifier}/medias/{id}` - Delete item media
- **Section Item Custom Attributes:**

    - `GET /pages/{path}/sections/{identifier}/section-items/{item_identifier}/custom-attributes` - List item attributes
    - `GET /pages/{path}/sections/{identifier}/section-items/{item_identifier}/custom-attributes/{key}` - Get specific attribute (by key)
    - `PUT /pages/{path}/sections/{identifier}/section-items/{item_identifier}/custom-attributes/{key}` - Update attribute
    - `PATCH /pages/{path}/sections/{identifier}/section-items/{item_identifier}/custom-attributes/{key}` - Partially update attribute

### Support Routes (Support Interface)

[](#support-routes-support-interface)

Base prefix: Configurable via `dynamic_pages.package_support_routes_prefix`

Full CRUD operations available for all resources:

- `POST /pages` - Create page
- `DELETE /pages/{path}` - Delete page (by path)
- `POST /pages/{path}/sections` - Create section
- `DELETE /pages/{path}/sections/{identifier}` - Delete section (by identifier)
- `POST /pages/{path}/sections/{identifier}/section-items` - Create section item
- `DELETE /pages/{path}/sections/{identifier}/section-items/{item_identifier}` - Delete section item (by identifier)
- `POST /pages/{path}/sections/{identifier}/custom-attributes` - Create section custom attribute
- `DELETE /pages/{path}/sections/{identifier}/custom-attributes/{key}` - Delete section custom attribute (by key)
- `POST /pages/{path}/sections/{identifier}/section-items/{item_identifier}/custom-attributes` - Create section item custom attribute
- `DELETE /pages/{path}/sections/{identifier}/section-items/{item_identifier}/custom-attributes/{key}` - Delete section item custom attribute (by key)
- All other endpoints same as Admin routes but with full CRUD capabilities

### Website Routes (Public Interface)

[](#website-routes-public-interface)

Base prefix: Configurable via `dynamic_pages.package_website_routes_prefix`

- `GET /pages` - List public pages
- `GET /pages/{path}` - Get specific public page (by path)

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

[](#configuration-1)

The package can be configured via the `config/dynamic_pages.php` file:

### Route Configuration

[](#route-configuration)

```
// Global API prefix for all routes
'package_routes_prefix' => 'api',

// Specific prefixes for different route types
'package_admin_routes_prefix' => '',
'package_support_routes_prefix' => '',
'package_website_routes_prefix' => '',

// Enable/disable route loading
'load_routes' => true,
```

### Middleware Configuration

[](#middleware-configuration)

```
'middlewares' => [
    'admin' => [
        // Add your admin middleware here
        // Example: 'auth:admin', 'permission:manage-dynamic-pages'
    ],
    'support' => [
        // Add your support middleware here
        // Example: 'auth:support', 'permission:support-access'
    ],
    'website' => [
        // Add your public middleware here
        // Example: 'throttle:60,1', 'cors'
    ],
],
```

### Configuration Keys Usage

[](#configuration-keys-usage)

- **`package_routes_prefix`**: Sets the global prefix for all dynamic pages routes (e.g., 'api' results in `/api/pages`)
- **`package_admin_routes_prefix`**: Additional prefix for admin routes (e.g., 'admin' with global prefix results in `/api/admin/pages`)
- **`package_support_routes_prefix`**: Additional prefix for support routes
- **`package_website_routes_prefix`**: Additional prefix for public website routes
- **`middlewares`**: Define different middleware stacks for each route type to control access and behavior
- **`load_routes`**: Control whether package routes should be loaded (useful for custom route implementations)

Content Seeding
---------------

[](#content-seeding)

The package provides a comprehensive content seeding system to help you populate your dynamic pages with initial content.

### Using the Content Seeder

[](#using-the-content-seeder)

1. **Publish the Content Seeder:**

```
php artisan vendor:publish --provider="SolutionPlus\DynamicPages\DynamicPagesServiceProvider"
```

2. **Locate the Seeder:** Find the published seeder at `database/seeders/DynamicPagesContentSeeder.php`
3. **Configure Content:** Edit the seeder file to define your content structure:

```
DynamicPagesSeeder::seedContent([
    [
        'page_path' => 'home',
        'translation_data' => [
            'en' => [
                'name' => 'Home',
                'title' => 'Page Title',
                'description' => 'Page Description',
            ],
            'ar' => [
                'name' => 'الرئيسية',
                'title' => 'عنوان الصفحة',
                'description' => 'تفاصيل الصفحة',
            ],
        ],
        'sections' => [
            [
                'identifier' => 'hero-section',
                'has_title' => true,
                'has_description' => true,
                'images_count' => 1,
                'has_items' => true,
                'item_images_count' => 1,
                'has_items_title' => true,
                'has_items_description' => true,
                'title_validation_text' => 'sometimes|string|min:3|max:190',
                'description_validation_text' => 'sometimes|string|min:3|max:1000',
                'translation_data' => [
                    'en' => ['name' => 'Hero Section'],
                    'ar' => ['name' => 'قسم البطل'],
                ],
                'items' => [
                    // Section items configuration
                ],
                'custom_attributes' => [
                    // Custom attributes configuration
                ],
            ],
        ],
    ],
]);
```

4. **Run the Seeder:**

```
php artisan db:seed --class=DynamicPagesContentSeeder
```

### Content Structure

[](#content-structure)

The seeder supports the following structure:

- **Pages**: Define page paths and multilingual content
- **Sections**: Configure section properties including validation rules
- **Section Items**: Add items within sections with their own attributes
- **Custom Attributes**: Flexible attribute system for both sections and section items
- **Multilingual Support**: Full Arabic and English translation support for all content

### Seeder Features

[](#seeder-features)

- **Transaction Safety**: All seeding operations are wrapped in database transactions
- **Duplicate Prevention**: The seeder checks for existing content to prevent duplicates
- **Flexible Configuration**: Support for various content types and validation rules
- **Multilingual Content**: Automatic translation handling for all supported languages

Database Structure
------------------

[](#database-structure)

The package creates the following tables:

- `pages` - Main content pages
- `page_translations` - Page translations
- `sections` - Content sections
- `section_translations` - Section translations
- `section_items` - Section items
- `section_item_translations` - Section item translations
- `custom_attributes` - Custom attributes
- `custom_attribute_translations` - Custom attribute translations
- `keywords` - Keywords
- `keyword_translations` - Keyword translations
- `keyword_related_objects` - Keyword relationships

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance55

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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.

###  Release Activity

Cadence

Every ~7 days

Total

6

Last Release

299d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae1caf4ecd93c7c892c1bacb1a4a4915b070f4af8db722eef91795d1ccf997a7?d=identicon)[a.mabrouk](/maintainers/a.mabrouk)

---

Top Contributors

[![mhmdahmd2422](https://avatars.githubusercontent.com/u/75953871?v=4)](https://github.com/mhmdahmd2422 "mhmdahmd2422 (18 commits)")[![mohamed-wael74](https://avatars.githubusercontent.com/u/96579247?v=4)](https://github.com/mohamed-wael74 "mohamed-wael74 (7 commits)")[![omar-ashraf-s](https://avatars.githubusercontent.com/u/175690905?v=4)](https://github.com/omar-ashraf-s "omar-ashraf-s (5 commits)")

### Embed Badge

![Health badge](/badges/solutionplus-dynamic-pages/health.svg)

```
[![Health](https://phpackages.com/badges/solutionplus-dynamic-pages/health.svg)](https://phpackages.com/packages/solutionplus-dynamic-pages)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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