riclep / laravel-storyblok
A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs
Fund package maintenance!
Ko Fi
Installs: 41 142
Dependents: 3
Suggesters: 0
Security: 0
Stars: 58
Watchers: 3
Forks: 15
Open Issues: 4
Requires
- php: ^8.1|^8.2|^8.3
- ext-json: *
- barryvdh/reflection-docblock: ^2.0
- embed/embed: ^3.4|^4
- illuminate/support: ^9.0|^10.0|^11.0
- imgix/imgix-php: ^3.3|^4.0
- ivopetkov/html5-dom-document-php: 2.*
- league/commonmark: ^2.0
- spatie/laravel-ignition: ^2.8
- spatie/schema-org: ^3.3
- storyblok/php-client: ^2.3
- storyblok/richtext-resolver: ^2.2
Requires (Dev)
- mockery/mockery: ^1.2
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^10
- dev-master
- 2.36.0
- 2.35.1
- 2.35.0
- 2.34.0
- 2.33.1
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.1
- 2.30
- 2.29.1
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.2
- 2.26.1
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.1
- 2.21.0
- 2.20.2
- 2.20.1
- 2.20.0
- 2.19.3
- 2.19.2
- 2.19.1
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.1
- 2.15.0
- 2.14.1
- 2.14.0
- 2.13.1
- 2.13.0
- 2.12.6
- 2.12.5
- 2.12.4
- 2.12.3
- 2.12.2
- 2.12.1
- 2.12.0
- 2.11.3
- 2.11.2
- 2.11.1
- 2.11.0
- 2.10.6
- 2.10.5
- 2.10.4
- 2.10.3
- 2.10.2
- 2.10.1
- 2.10.0
- 2.9.2
- 2.9.1
- 2.9.0
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8.0
- 2.8.0-beta
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.4
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.1
- 2.6.0
- 2.5.22
- 2.5.21
- 2.5.20
- 2.5.19
- 2.5.18
- 2.5.17
- 2.5.16
- 2.5.15
- 2.5.14
- 2.5.13
- 2.5.12
- 2.5.11
- 2.5.10
- 2.5.9
- 2.5.8
- 2.5.7
- 2.5.6
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-beta4
- 2.0.0-beta3
- 2.0.0-beta2
- 2.0.0-beta1
- 1.8.2
- 1.2.1
- 1.2.0
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-beta2
- 1.0.0-beta1
- 0.2.0
- 0.1.10
- 0.1.9
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-renovate/phpunit-phpunit-11.x
- dev-rector
- dev-renovate/php-actions-phpunit-4.x
- dev-renovate/actions-checkout-4.x
- dev-develop
This package is auto-updated.
Last update: 2024-11-22 10:22:12 UTC
README
This package allows you to use fantastic Storyblok headless CMS with the amazing Laravel PHP framework. It’s designed to try and feel natural to Laravel developers and part of the ecosystem whilst also converting Storyblok’s API JSON responses into something powerful with minimal effort.
Key Features
- Pages from Storyblok mapped to PHP Pages classes giving access to the nested content (Blocks) and meta data for SEO, OpenGraph and more.
- Quickly and easily resolve relations and inverse relations between content.
- Each Storyblok component is automatically transformed into a PHP class using a simple naming convention - just match your class and component names.
- Fields in your components are converted to a Field PHP class allowing you to manipulate their data. The package automatically detects common types like richtext fields, assets and markdown. Easily cast fields to classes.
- Asset fields are converted to Assets and Image classes allowing you to manipulate them as required. Images can be easily transformed using Storyblok’s Asset CDN or external services like Imgix.
- Blocks and fields know where they sit in relation to their ancestors and CSS classes can be created to help your styling.
- The structure of the JSON data is preserved but super powered making it simple to loop over in your views.
- It’s simple to link to the Storyblok visual composer by including one view and printing a string in a Block’s Blade template.
- Request ‘Folders’ of content such as a list of articles or a team of people complete with support for pagination.
- Richer Typography using a supporting package utilising PHP Typography.
Documentation
Other Packages
Laravel Storyblok Embed
Embed all types of media in your Storyblok site using only their URL. Package Docs
Laravel Storyblok Typography
Improve your content’s typography. Package Docs
Laravel Storyblok Layout & CSS
Helpers for layout, block positioning and CSS class name generation. Package Docs
Laravel Storyblok Form builder (BETA)
Build forms with Storyblok complete with Laravel’s validation. Package Docs
Laravel Storyblok CLI
Useful Artisan commands to help manage your content? Check out my Laravel Storyblok CLI package
Testing
The tests are mostly up-to-date and cover the majority of the code. A few areas that would require hitting the Storyblok API are not tested. If you have experience mocking API please feel free to contribute tests.
Changelog
Contributing
Please feel free to help expand and improve this project.
Security
If you discover any security related issues, please email ric@sirric.co.uk instead of using the issue tracker.
Credits
- Ric Le Poidevin GitHub / Twitter
- The contributors 😍
- Storyblok 😻
- Laravel 🥰
- Built and developed at U&US 💕
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.