Skip to content

Content Sections

This page is generated from public package documentation in capell-4/packages and the package manifest checked into the source repository.

FieldValue
Composer packagecapell-app/content-sections
Package slugcontent-sections
Product groupCapell Foundation
Tierfree
Bundlefoundation
Runtime contextsadmin, frontend
Capell version^4.0
Source repositorycapell-app/packages
Source pathpackages/content-sections
Docs sourcepackages/content-sections/docs
Manifestcapell.json

Reusable content sections for Capell.

  • Package: capell-app/content-sections
  • Namespace: Capell\ContentSections\
  • Surfaces: Filament admin, Livewire, database
  • Service providers: packages/content-sections/src/Providers/ContentSectionsServiceProvider.php
  • Capell dependencies: capell-app/admin, capell-app/content-blocks, capell-app/core, capell-app/frontend, capell-app/layout-builder
  • Lets teams reuse managed content sections across pages instead of hard-coding every repeatable marketing or content block.
  • Keeps section records, mutation behavior, and frontend rendering in one package so themes can render sections predictably.
  • Helps editors update shared content once while developers keep presentation in Blade and package-owned render surfaces.
  • Reusable content sections for Capell.
  • Content block definitions for each registered section, exposed through capell-app/content-blocks.
  • Admin resources: SectionResource.
  • Livewire components: AbstractAssets, ModalTableSelect, SectionAssets.

Install after Content Blocks and Layout Builder so section definitions can be registered as layout-selectable blocks.

AreaPathPurpose
Actionspackages/content-sections/src/ActionsDomain operations. Test these directly where possible.
Datapackages/content-sections/src/DataStructured payloads, form state, view models, and integration data.
Enumspackages/content-sections/src/EnumsPersisted states and Filament option values.
Modelspackages/content-sections/src/ModelsEloquent records owned by the package.
Filamentpackages/content-sections/src/FilamentAdmin resources, pages, blocks, and settings UI.
Livewirepackages/content-sections/src/LivewireInteractive frontend or admin components.
Providerspackages/content-sections/src/ProvidersRegistration, extension hooks, routes, migrations, and resources.
Resourcespackages/content-sections/resourcesViews, translations, assets, and package resources.
Configpackages/content-sections/configPackage configuration and publishable config.
Databasepackages/content-sections/databaseMigrations, seeders, and settings migrations.
Testspackages/content-sections/testsPackage-level Pest coverage.
  • Resources: SectionResource.
  • Pages: CreateSection, EditSection, ListSections.
  • Blocks: SectionAlertsBlock.
  • Livewire: AbstractAssets, ModalTableSelect, SectionAssets.
  • Models: ComposhipsJsonRelationshipsTrait, Section.
  • Migrations: 2026_05_10_190844_01_create_sections_table.php.
  • Config: packages/content-sections/config/capell-content-sections.php.
  • Data objects live in src/Data/; use them for payloads, form state, and view models.
  • Contracts: SectionDefinitionProvider.
  • Content block bridge: registered sections are exposed as section.{key} block definitions through BlockDefinitionProvider::TAG.
  • Register Capell extension points, routes, migrations, settings, render hooks, and resources from service providers.
  • Install with composer require capell-app/content-sections in the host Capell application.
  • Run migrations through the host application package install flow.
  • In this repository, verify package changes with vendor/bin/pest; do not use php artisan.

Run package tests from the repository root:

Terminal window
vendor/bin/pest packages/content-sections/tests --configuration=phpunit.xml
  • Put behaviour changes in src/Actions/; UI classes, commands, and controllers should call actions instead of owning domain logic.
  • Use package Data classes at boundaries instead of passing anonymous arrays between layers.
  • Use backed enums for persisted values and enum labels for Filament options.