Installation
Requirements
- PHP ^8.5
- Laravel ^13.0
Install the package
Arrel is proprietary software distributed from a private repository; a valid license is required to use it in production (see Pricing).
Because the repository is private, Composer needs to know where to download it from and how to authenticate. Add it to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/arrelphp/arrel"
}
]
}And install the package:
composer require arrel/arrelAuthenticating with the private repository
Composer authenticates with a GitHub token that has read access to the repository. Locally, composer config --global github-oauth.github.com <token> stores it in ~/.composer/auth.json.
On a server (Forge, for example) and in CI, the token is also stored in an auth.json, or injected with the COMPOSER_AUTH environment variable:
COMPOSER_AUTH='{"github-oauth":{"github.com":"<token>"}}' composer installUse a token with the minimum scope (read-only on the Arrel repository) and an expiry date, and never leave it inside your application's repository.
The ServiceProvider is registered automatically through extra.laravel.providers in composer.json (there is no need to add it by hand). On boot, it publishes:
- The configuration file
config/arrel.php, which you can publish withphp artisan vendor:publish --tag=arrel-config. - Arrel's web and API routes (
/{prefix}/{panel}/...and/arrel/api/{panel}/...). - The package translations, under the
arrel::namespace. - A
PanelRegistrysingleton, where you will register your Panels.
Publish the compiled assets
Arrel's frontend (Vue, precompiled) ships inside the package and must be published to your application's public/ directory:
php artisan arrel:assetsThis copies dist/ to public/vendor/arrel and writes a .hash file there. Every HTML response of the panel (resources/views/panel.blade.php) includes that hash as a query string (arrel.css?v=..., arrel.js?v=...), and AssetsManifest::ensureFresh() fails loudly in debug mode if it detects that the published assets do not match those of the installed package, so that you do not serve stale JS without noticing after a composer update.
Run php artisan arrel:assets again every time you update the version of arrel/arrel.
Verify the installation
Once the assets are published and a Panel is registered, open /arrel/{panel-id} in the browser. You should see the sign-in screen. If you do not, check that sanctum.stateful contains the domain you are working on.
Cleaning up temporary uploads
File/Image fields first upload to a temporary directory (arrel-temp, local disk) before being moved to their final location when the form is saved (see Fields). Schedule this command so that it cleans up the ones that end up orphaned:
php artisan arrel:prune-uploadsIt deletes any file in arrel-temp older than 24 hours. A good place to schedule it is your application's routes/console.php, with the Laravel scheduler:
Schedule::command('arrel:prune-uploads')->daily();Next step
With the package installed, the next step is to configure a Panel: decide which Resources, pages and widgets live in it, and embed it in a route of your application.