joydeep-bhowmik / editable-section
Laravel package providing editable sections with media support.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:Blade
pkg:composer/joydeep-bhowmik/editable-section
Requires
- php: >=8.0
- illuminate/support: ^8.0|^9.0|^10.0
- spatie/laravel-medialibrary: ^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0
- phpunit/phpunit: ^9.5|^10.0
README
Simple Laravel package to manage small editable sections with optional media attachments.
Installation
- Require the package (replace with your Packagist vendor):
composer require joydeep-bhowmik/editable-section
- Publish configuration, views and migrations:
php artisan vendor:publish --provider="JoydeepBhowmik\EditableSection\Providers\EditableSectionServiceProvider" --tag="config" php artisan vendor:publish --provider="JoydeepBhowmik\EditableSection\Providers\EditableSectionServiceProvider" --tag="views" php artisan vendor:publish --provider="JoydeepBhowmik\EditableSection\Providers\EditableSectionServiceProvider" --tag="migrations"
Configuration
Edit the published config config/editable-section.php to set media collection name, upload limits and access callback.
Usage
- The package provides views under the
editable-sectionview namespace. Publish and override views inresources/views/vendor/editable-section. - Routes are loaded from the package
web/web.phpfile. If you need to customize, copy the route file into your app and adjust. - The
EditableSectionmodel is provided and namespaced to the package; if you reference it directly, useJoydeepBhowmik\EditableSection\Models\EditableSection.
Notes
- Update
composer.jsonnameandauthorsto your package vendor and author information before publishing.
example usage
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <meta name="csrf-token" content="{{ csrf_token() }}"> @vite(['resources/js/app.js']) <x-editable.head /> </head> <body> <h1>hello</h1> <x-editable.section name="hero-text-2"> hello text placeholder </x-editable.section> <x-editable /> </body> </html>