Download the PHP package takethelead/laravel-storyblok without Composer
On this page you can find all versions of the php package takethelead/laravel-storyblok. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download takethelead/laravel-storyblok
More information about takethelead/laravel-storyblok
Files in takethelead/laravel-storyblok
Package laravel-storyblok
Short Description laravel-storyblok
License MIT
Homepage https://github.com/takethelead/laravel-storyblok
Informations about the package laravel-storyblok
Laravel Storyblok
Laravel storyblok is a wrapper around the official Storyblok php client with some extra Laravel perks.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
The base class
This package provides a wrapper around the default Storyblok client class and registers it within the Laravel service container.
Need something else?
If you need more functionality you get an instance of the underlying Storyblok API with:
Handling webhooks
This package ships with a preconfigured setup for handling webhooks. Simply add the route below to your routes file.
Make sure to add this route to the
except
array within theVerifyCsrfToken
middleware to prevent token mismatches.
Verifing the webhook signature
If you have configured a webhook secret in Storyblok, make sure to add it as an environment variable to your env file.
Out of the box a middleware is applied to your route to verify the signature. You are however free to add your own implementation (or add extra middleware) from within route_middleware
setting in the config file.
Performing actions whenever the webhook is called
Within the config file you can specify which actions should be performed whenever the webhook is being called. The setting key is called webhook_actions
.
When adding your own action classes, make sure they implement the \TakeTheLead\LaravelStoryblok\Actions\ActionInterface
. Otheriwse your action won't be exectued.
Example:
The ClearStoryblokCacheCommand
This package provides a way to specify content cache versions to Storyblok, you can clear the current cache version by executing the below artisan command.
Note: it is recommended to have a workflow for handling deployments & content changes from within Storyblok. This can be done by adding the command to your deploy script and by configureting a webhook in Storyblok to listen for content changes.
Richtext resolver
The package automatically requires and installs the Storyblok richtecht resolver package for php to parse storry content formats. More information can be found in the official package.
Testing
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.
Credits
- Joren Van Hocht
- Take The Lead
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-storyblok with dependencies
ext-json Version *
illuminate/console Version ^9.0|^10.0
illuminate/contracts Version ^9.0|^10.0
illuminate/filesystem Version ^9.0|^10.0
illuminate/routing Version ^9.0|^10.0
illuminate/support Version ^9.0|^10.0
storyblok/php-client Version ^2.6
storyblok/richtext-resolver Version ^2.1