Skip to content

Hero

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/hero
Package slughero
Product groupCapell Foundation
Tierfree
Bundlefoundation
Runtime contextsfrontend, console
Capell version^4.0
Source repositorycapell-app/packages
Source pathpackages/hero
Docs sourcepackages/hero/docs
Manifestcapell.json

Hero renders and seeds the default home-page hero block used by Capell frontend themes.

  • Package: capell-app/hero
  • Namespace: Capell\Hero\
  • Surfaces: frontend Blade components, console
  • Service providers: packages/hero/src/Providers/HeroServiceProvider.php
  • Capell dependencies: capell-app/core, capell-app/frontend, capell-app/layout-builder
  • Third-party dependencies: lorisleiva/laravel-actions, spatie/laravel-package-tools
  • Provides a default Capell home hero block, rendering, and setup path so new sites start with a useful first-screen component.
  • Helps designers and editors begin from a package-owned hero instead of hard-coding a one-off homepage header.
  • Keeps the default hero small and replaceable while Layout Builder and themes own broader composition.
  • Hero renders and seeds the default home-page hero block used by Capell frontend themes.
  • Blade component: capell::block.hero.
  • Package setup or maintenance commands.
  • HeroServiceProvider registers the hero view components and setup/demo commands.
  • Hero data objects shape the payload used by the default homepage hero view.
  • The package is intentionally small because themes consume it as a shared visual primitive.
AreaPathPurpose
Actionspackages/hero/src/ActionsDomain operations. Test these directly where possible.
Datapackages/hero/src/DataStructured payloads, form state, view models, and integration data.
Providerspackages/hero/src/ProvidersRegistration, extension hooks, routes, migrations, and resources.
Resourcespackages/hero/resourcesViews, translations, assets, and package resources.
Testspackages/hero/testsPackage-level Pest coverage.
  • capell:hero-setup {--force : Rebuild Hero-managed home layout defaults} (packages/hero/src/Console/Commands/SetupCommand.php)
  • Data objects live in src/Data/; use them for payloads, form state, and view models.
  • Register Capell extension points, routes, migrations, settings, render hooks, and resources from service providers.
  • Adds default hero rendering support for frontend themes.
  • Adds setup/demo commands for home hero content.
  • Adds no Filament admin screen, public route, settings screen, or package-owned table.
  • Install with composer require capell-app/hero in the host Capell application.
  • Install after Layout Builder when the host setup flow should seed default home-page hero layout data.
  • 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/hero/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.