In addition to the below options we suggest configuring middleware for the API.
Enable the API policy to enforce the now required stream policy against the corresponding model policy method (viewAny
, view
, create
, update
, and delete
).
// streams/contacts.json
{
"api.policy": true
}
You can also specify a different policy to use for the API only:
// streams/contacts.json
{
"api.policy": "App\\Contacts\\ContactApiPolicy"
}
If you would like to run authorization even if no streams or route policy is specified; you can configure a fallback policy.
A blank TALL-stack Laravel project with Streams.
The fundamental features and utilities offered by the Streams platform.
A universal and extensible RESTful API for Streams.
Extensible, user-friendly, and performant control panel, components, and services.
Dev tooling for Laravel Streams.