A Webflow-like inline content management system for Laravel applications.
composer require webook/laravel-cms
php artisan vendor:publish --provider="Webook\LaravelCMS\CMSServiceProvider" --tag=cms-config
php artisan vendor:publish --provider="Webook\LaravelCMS\CMSServiceProvider" --tag=cms-migrations
php artisan migrate
For image uploads to work properly, you need to create a symbolic link:
php artisan storage:link
If you want to customize the CMS assets:
php artisan vendor:publish --provider="Webook\LaravelCMS\CMSServiceProvider" --tag=cms-assets
The configuration file will be published to config/cms.php
. You can customize:
- Toolbar settings: Position (top/bottom), theme (dark/light), auto-injection
- Storage settings: Disk and path for media uploads
- Cache settings: Enable/disable caching, TTL
- Editor settings: Toolbar buttons available in the rich text editor
- Media settings: Upload disk, path, max file size, allowed file types
Once installed, the CMS toolbar will automatically be injected into your pages when enabled.
- Navigate to any page in your application
- Click "Edit" in the toolbar to enter edit mode
- Hover over any content to see editable areas
- Click to edit text inline
- For images, hover to see the gear icon for changing images
- Click "Save" to persist changes
By default, the CMS is available without authentication. To restrict access, add your own middleware to the configuration:
// config/cms.php
'middleware' => [
'web',
'auth', // Add authentication
'can:edit-content', // Add authorization
],
To prevent content from being editable, add the data-cms-ignore
attribute:
<div data-cms-ignore="true">
This content won't be editable
</div>
Content fetched from database models will automatically be marked as "coming soon" and won't be editable yet.
- ✅ Inline content editing
- ✅ Rich text editor with formatting options
- ✅ Image upload with drag-and-drop
- ✅ Link editing
- ✅ Automatic backup system
- ✅ Dark mode toolbar
- ✅ Mobile responsive
- ✅ Pages explorer
- ✅ Multi-language ready (coming soon)
- ✅ Media library (coming soon)
Make sure you've created the storage link:
php artisan storage:link
Clear the view cache after updates:
php artisan view:clear
php artisan config:clear
-
Check that CMS is enabled in your
.env
:CMS_ENABLED=true
-
Clear caches:
php artisan cache:clear php artisan config:clear
- PHP 8.1 or higher
- Laravel 10.x or 11.x
MIT License
For issues and questions, please use the GitHub issue tracker.