Addons are composer packages that are specifically designed for Laravel Streams. Addons and can be distributed anywhere composer packages can be distributed (Packagist, SATIS, etc.)
Creating addons is a great way to distribute reusable code as well as encapsulate and organize large project components. Before developing addons you should have a basic understanding of integrating with Laravel Streams as well as a general understanding of Composer packages.
Mark your composer package as a streams-addon
using the type
parameter:
// addons/example/widgets/composer.json
{
"name": "example/widgets",
"description": "Widgets for your example project.",
"type": "streams-addon",
}
Using service providers is the easiest way to integrate with Laravel and Streams. You can specify autodetected service providers using the composer.json
file.
// addons/example/widgets/composer.json
{
"extra": {
"laravel": {
"providers": [
"Example\\Widgets\\WidgetsProvider"
]
}
}
}
Using repository paths you can acheive local-only, application-specific, or development installations of addons.
// composer.json
{
"repositories": [{
"type": "path",
"url": "addons/examples/widget",
"options": {
"symlink": true
}
}]
}
Generally speaking, installing an addon requires downloading it with composer and optionally publishing it's assets and any migrations.
{
"require": {
// ...
"example/addon": "dev-master"
},
}
The fundamental features and utilities offered by the Streams platform.
A full featured, universal, and extensible RESTful API.
Extensible, user-friendly, and performant control panel and user interface utilities and services.
CLI Tooling for Laravel Streams.