PHPackages                             fuelviews/laravel-sabhero-wrapper - 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. fuelviews/laravel-sabhero-wrapper

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

fuelviews/laravel-sabhero-wrapper
=================================

Sabhero blog package

v2.1.0(6mo ago)02.9k1[2 PRs](https://github.com/fuelviews/laravel-sabhero-wrapper/pulls)1MITPHPPHP ^8.3CI passing

Since Oct 27Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/fuelviews/laravel-sabhero-wrapper)[ Packagist](https://packagist.org/packages/fuelviews/laravel-sabhero-wrapper)[ Docs](https://github.com/fuelviews/laravel-sabhero-wrapper)[ RSS](/packages/fuelviews-laravel-sabhero-wrapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (26)Used By (1)

Laravel SAB Hero Wrapper
========================

[](#laravel-sab-hero-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/703db904384ea39f66d34175878fa60403b18d826ee3dc4006038f7ad6760678/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6675656c76696577732f6c61726176656c2d7361626865726f2d777261707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fuelviews/laravel-sabhero-wrapper)[![Total Downloads](https://camo.githubusercontent.com/b55b89d425a9cff481ed80595e544baec1458b2cb26864991122ec033e19d6d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6675656c76696577732f6c61726176656c2d7361626865726f2d777261707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fuelviews/laravel-sabhero-wrapper)[![Tests](https://camo.githubusercontent.com/c1e120aaf58a560e12a67b98b60767c3f36f104157d28cd024fcd29e3af1b4ee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6675656c76696577732f6c61726176656c2d7361626865726f2d777261707065722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/fuelviews/laravel-sabhero-wrapper/actions/workflows/run-tests.yml)

A comprehensive Laravel package that provides a unified wrapper layout for integrating multiple Fuelviews components and third-party packages. This package serves as the foundation for building consistent, feature-rich web applications with integrated navigation, forms, SEO optimization, analytics, and more.

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

[](#requirements)

- PHP 8.3+
- Laravel 10.0+, 11.0+, or 12.0+
- Livewire 3.5+

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

[](#installation)

Install the package via Composer:

```
composer require fuelviews/laravel-sabhero-wrapper
```

### Quick Installation

[](#quick-installation)

The package will automatically register via Laravel's package discovery. To publish the configuration and migrations:

```
# Publish configuration and migrations
php artisan vendor:publish --tag="sabhero-wrapper-config"
php artisan vendor:publish --tag="sabhero-wrapper-migrations"

# Run migrations
php artisan migrate
```

### Additional Publishing Options

[](#additional-publishing-options)

You can publish additional components as needed:

```
# Publish views for customization
php artisan vendor:publish --tag="sabhero-wrapper-views"

# Publish seeders for sample data
php artisan vendor:publish --tag="sabhero-wrapper-seeders"

# Publish factories for testing
php artisan vendor:publish --tag="sabhero-wrapper-factories"

# Publish service provider for advanced customization
php artisan vendor:publish --tag="sabhero-wrapper-provider"
```

Basic Usage
-----------

[](#basic-usage)

### Using the Layout Component

[](#using-the-layout-component)

The primary way to use this package is through the layout component:

```

        Welcome to Your App
        This content is wrapped in the SAB Hero layout.

```

### Page Model Integration

[](#page-model-integration)

The package includes a `Page` model for managing SEO data:

```
use Fuelviews\SabHeroWrapper\Models\Page;

// Create a new page
$page = Page::create([
    'title' => 'About Us',
    'slug' => 'about',
    'description' => 'Learn more about our company and mission.',
    'page_feature_image' => 'path/to/image.jpg'
]);

// Add feature image via media library
$page->addMediaFromUrl('https://example.com/image.jpg')
      ->toMediaCollection('page_feature_image');

// The page automatically provides SEO data
$seoData = $page->getDynamicSEOData();
```

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

[](#configuration)

The package configuration file provides granular control over included features:

```
// config/sabhero-wrapper.php
return [
    'livewire_enabled' => env('SABHERO_LIVEWIRE_ENABLED', true),
    'navigation_enabled' => env('SABHERO_NAVIGATION_ENABLED', true),
    'footer_enabled' => env('SABHERO_FOOTER_ENABLED', true),
    'forms_modal_enabled' => env('SABHERO_FORMS_MODAL_ENABLED', true),
    'gtm_enabled' => env('SABHERO_GTM_ENABLED', false),
];
```

### Environment Variables

[](#environment-variables)

Add these variables to your `.env` file to control features:

```
# Livewire Integration (default: true)
SABHERO_LIVEWIRE_ENABLED=true

# Navigation Integration (default: true)
SABHERO_NAVIGATION_ENABLED=true

# Footer Integration (default: true)
SABHERO_FOOTER_ENABLED=true

# Forms Modal Integration (default: true)
SABHERO_FORMS_MODAL_ENABLED=true

# Google Tag Manager Integration (default: false)
SABHERO_GTM_ENABLED=false
```

Integrated Packages
-------------------

[](#integrated-packages)

The wrapper conditionally integrates with the following packages:

### Navigation (fuelviews/laravel-navigation)

[](#navigation-fuelviewslaravel-navigation)

When installed and enabled, provides:

- Responsive navigation header
- Footer component
- Mobile-friendly hamburger menu

### Forms (fuelviews/laravel-forms)

[](#forms-fuelviewslaravel-forms)

When installed and enabled, provides:

- Modal-based contact forms
- Lead capture functionality
- UTM parameter tracking

### SEO (ralphjsmit/laravel-seo)

[](#seo-ralphjsmitlaravel-seo)

When installed, provides:

- Dynamic meta tags
- Open Graph integration
- Twitter Card support
- JSON-LD structured data

### Media Library (spatie/laravel-medialibrary)

[](#media-library-spatielaravel-medialibrary)

Integrated for:

- Feature image management
- Responsive image conversions
- Media collection organization

### Google Fonts (spatie/laravel-google-fonts)

[](#google-fonts-spatielaravel-google-fonts)

When installed:

- Automatic font optimization
- GDPR-compliant font loading

Advanced Usage
--------------

[](#advanced-usage)

### Using the Facade

[](#using-the-facade)

Access package functionality programmatically:

```
use Fuelviews\SabHeroWrapper\Facades\SabHeroWrapper;

// Check if a feature is enabled
if (SabHeroWrapper::isFeatureEnabled('navigation_enabled')) {
    // Navigation is enabled
}

// Get all enabled features
$enabledFeatures = SabHeroWrapper::getEnabledFeatures();

// Get package version
$version = SabHeroWrapper::version();
```

### Custom View Composer

[](#custom-view-composer)

The package automatically provides SEO page data to views through a view composer that matches route names to page slugs:

```
// In your routes/web.php
Route::get('/', function () {
    return view('home');
})->name('home');

// The view composer will automatically look for a Page with slug 'home'
// and make it available as $seoPage in your views
```

### Service Provider Customization

[](#service-provider-customization)

For advanced customization, you can publish the service provider:

```
php artisan vendor:publish --tag="sabhero-wrapper-provider"
```

This creates `app/Providers/SabHeroWrapperServiceProvider.php` where you can:

- Customize view composers and SEO data logic
- Add custom service bindings
- Register additional event listeners
- Publish custom assets
- Override package behavior

After publishing, remember to register it in `config/app.php`:

```
'providers' => [
    // ...
    App\Providers\SabHeroWrapperServiceProvider::class,
],
```

### Database Seeding

[](#database-seeding)

Run the included seeder to create sample pages:

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

This creates a sample home page with:

- Title: "Title one"
- Slug: "home"
- Description: "Description here."
- Feature image from Unsplash

### Media Collections

[](#media-collections)

The Page model supports media collections for feature images:

```
$page = Page::find(1);

// Add feature image
$page->addMediaFromUrl('https://example.com/hero.jpg')
     ->toMediaCollection('page_feature_image');

// Get feature image URL
$imageUrl = $page->getFirstMediaUrl('page_feature_image');

// Get responsive images
$responsiveImages = $page->getFirstMedia('page_feature_image');
```

Tailwind CSS Integration
------------------------

[](#tailwind-css-integration)

Add the package views to your Tailwind CSS content configuration:

```
// tailwind.config.js
module.exports = {
    content: [
        './resources/**/*.{js,vue,blade.php}',
        './vendor/fuelviews/laravel-sabhero-wrapper/resources/**/*.{blade.php,js,vue}',
    ],
    // ... rest of your configuration
}
```

Testing
-------

[](#testing)

Run the package tests:

```
composer test
```

Run code style checks:

```
composer format
```

Troubleshooting
---------------

[](#troubleshooting)

### Navigation Not Showing

[](#navigation-not-showing)

Ensure the `fuelviews/laravel-navigation` package is installed and the feature is enabled:

```
composer require fuelviews/laravel-navigation
```

```
SABHERO_NAVIGATION_ENABLED=true
```

### Forms Modal Not Working

[](#forms-modal-not-working)

Ensure the `fuelviews/laravel-forms` package is installed and Livewire is enabled:

```
composer require fuelviews/laravel-forms
```

```
SABHERO_FORMS_MODAL_ENABLED=true
SABHERO_LIVEWIRE_ENABLED=true
```

### SEO Tags Not Appearing

[](#seo-tags-not-appearing)

Ensure the `ralphjsmit/laravel-seo` package is installed:

```
composer require ralphjsmit/laravel-seo
```

### Google Fonts Not Loading

[](#google-fonts-not-loading)

Install the required package:

```
composer require spatie/laravel-google-fonts
```

### Media Library Issues

[](#media-library-issues)

Ensure the Spatie Media Library is properly configured:

```
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations"
php artisan migrate
```

Package Dependencies
--------------------

[](#package-dependencies)

This package integrates with several optional packages:

**Required:**

- `php: ^8.3`
- `illuminate/contracts: ^10.0||^11.0||^12.0`
- `livewire/livewire: >=3.5`
- `ralphjsmit/laravel-seo: >=1.6.7`
- `spatie/laravel-google-fonts: >=1.4.1`
- `spatie/laravel-medialibrary: ^11||^10`
- `spatie/laravel-package-tools: ^1.92`

**Optional Integrations:**

- `fuelviews/laravel-navigation` - For header/footer navigation
- `fuelviews/laravel-forms` - For contact forms and modals
- `spatie/laravel-googletagmanager` - For Google Tag Manager integration

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Thejmitchener](https://github.com/thejmitchener)
- [Sweatybreeze](https://github.com/sweatybreeze)
- [Fuelviews](https://github.com/fuelviews)
- [All Contributors](../../contributors)

📜 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

Built with ❤️ by the [Fuelviews](https://fuelviews.com) team

 [⭐ Star us on GitHub](https://github.com/fuelviews/laravel-navigation) • [📦 View on Packagist](https://packagist.org/packages/fuelviews/laravel-navigation)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance80

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 70% 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 ~15 days

Total

24

Last Release

203d ago

Major Versions

v0.0.21 → v1.0.02025-08-20

v1.0.0 → v2.0.02025-10-14

PHP version history (5 changes)v0.0.1PHP ^8.2

v0.0.11PHP ^8.1||^8.2||^8.3||^8.4

v0.0.16PHP ^8.2||^8.3||^8.4

v0.0.17PHP ^8.3||^8.2

v1.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd4a27681d2fe0a911a7c32f6ce4a54822748a6443892a27d7f6c651370559d8?d=identicon)[fuelviews](/maintainers/fuelviews)

---

Top Contributors

[![thejmitchener](https://avatars.githubusercontent.com/u/64335706?v=4)](https://github.com/thejmitchener "thejmitchener (14 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")

---

Tags

laravelFuelviewssabhero-wrapper

###  Code Quality

TestsPest

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fuelviews-laravel-sabhero-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/fuelviews-laravel-sabhero-wrapper/health.svg)](https://phpackages.com/packages/fuelviews-laravel-sabhero-wrapper)
```

###  Alternatives

[leandrocfe/filament-apex-charts

Apex Charts integration for Filament PHP.

4861.2M8](/packages/leandrocfe-filament-apex-charts)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[codebar-ag/laravel-filament-json-field

A Laravel Filament JSON Field integration with CodeMirror support

1124.1k](/packages/codebar-ag-laravel-filament-json-field)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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