fuelviews / laravel-sabhero-portfolio
This is my package laravel-sabhero-portfolio
Requires
- php: ^8.3
- filament/spatie-laravel-media-library-plugin: ^3.3
- filament/support: ^3.3
- illuminate/contracts: ^10.0||^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- driftingly/rector-laravel: ^2.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- rector/rector: ^2.0
This package is auto-updated.
Last update: 2025-03-31 21:01:14 UTC
README
A Laravel package for managing and displaying before/after image portfolios with a dynamic slider component. Perfect for renovation projects, home improvements, design transformations, or any visual comparison showcase.
Features
- Filament admin panel integration for easy content management
- Before/After interactive slider component
- Customizable portfolio types with Filament UI integration
- Responsive image handling with transparent PNG support
- Configurable media storage disk support
- Livewire components for seamless frontend integration
Installation
You can install the package via composer:
composer require fuelviews/laravel-sabhero-portfolio
You can publish and run the migrations with:
php artisan vendor:publish --tag="sabhero-portfolio-migrations"
php artisan migrate
Optionally, you can seed the database with sample data:
php artisan db:seed --class="Fuelviews\\SabHeroPortfolio\\Database\\Seeders\\SabHeroPortfolioSeeder"
You can publish the config file with:
php artisan vendor:publish --tag="sabhero-portfolio-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="sabhero-portfolio-views"
Usage
Admin Panel
After installation, you'll find a new "Portfolio" section in your Filament admin panel where you can
- Create, edit, and delete portfolio entries
- Upload before and after images
- Categorize entries by type
- Control spacing and ordering
- Publish/unpublish entries
Frontend Display
You can display the before/after slider in your Blade views using Livewire:
For all portfolio types
@livewire('sabhero-portfolio::before-after-slider')
Or
<livewire:sabhero-portfolio::before-after-slider />
For specific portfolio types
@livewire('sabhero-portfolio::before-after-slider', ['type' => 'commercial'])
Or
<livewire:sabhero-portfolio::before-after-slider type="commercial" />
Custom Portfolio Types
You can define custom portfolio types in the configuration file. Each type requires:
- A unique key (used in the database)
- A label (displayed in the UI, stored in lowercase)
- A color (used in the Filament admin panel)
Custom Media Storage
By default, the package uses the disk configured in your Spatie Media Library config. You can override this in the package config
// config/sabhero-portfolio.php 'media_disk' => 's3',
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Requirements
- PHP 8.3 or higher
- Laravel 10.0 or higher
- Filament 3.0 or higher
- Spatie Media Library 10.0 or higher
Credits
License
The MIT License (MIT). Please see License File for more information.