Installation
Requirements
- PHP 8.4+
- Laravel 13 host application
- Session-based authentication in the host app
Composer
composer require pepperfm/flashboard
If you are testing the package from a local checkout, add a path repository in the host application's composer.json first:
{
"repositories": [
{
"type": "path",
"url": "../flashboard"
}
]
}
Package bootstrap
php artisan flashboard:install
The installer asks for a panel path such as panel or admin and generates a matching provider class name automatically, for example:
panel->PanelPanelProvideradmin->AdminPanelProviderpartner-balance->PartnerBalancePanelProvider
It also asks which frontend package manager should be used for asset setup:
bunnpmpnpmyarnskip frontend install/build
Unless you choose skip, the installer runs the selected package manager install command and then builds Flashboard's published frontend assets automatically.
If you want to rebuild package assets later without re-running the full installer, use:
php artisan flashboard:build-assets
This command also republishes Flashboard views and assets after a successful build.
You can bypass the interactive package-manager prompt with an explicit flag:
php artisan flashboard:build-assets --bun
php artisan flashboard:build-assets --pnpm
php artisan flashboard:build-assets --skip
This publishes:
resources/views/vendor/flashboard/*public/vendor/flashboard/build/*
The package ships its own built frontend assets. A host application does not need to install Flashboard's Vue, Inertia, or Nuxt UI npm dependencies manually.
Configure Flashboard
Generate a host-side panel provider:
php artisan flashboard:make-provider
Then register it in your host app and configure Flashboard there:
<?php
use Pepperfm\Flashboard\Integration\Laravel\FlashboardPanelProvider;
final class AdminPanelProvider extends FlashboardPanelProvider
{
public function register(): void
{
$this->panelConfig()
->path('panel')
->discover();
}
}
flashboard:make-provider and flashboard:install both attempt to register the generated provider in bootstrap/providers.php automatically.
If automatic registration fails, add the provider to your host application's provider list manually.
By default this scans app/Flashboard for classes ending with Resource or Page.
Discovery controls
<?php
public function register(): void
{
$this->panelConfig()
->path('panel')
->discoverResources(in: app_path('Flashboard'))
->discoverPages(in: app_path('Flashboard'))
->except(
App\Flashboard\Support\DraftResource::class,
'LegacyQueuePage',
'Support/IgnoredResource.php',
);
}
discover()scans both resources and pagesdiscoverResources()scans only*ResourcediscoverPages()scans only*Pageexcept()excludes classes by FQCN, basename, or relative pathwithoutDiscovery()disables auto-discovery when you want explicit registration only
Explicit overrides
<?php
public function register(): void
{
$this->panelConfig()
->path('panel')
->discover()
->resource(App\Flashboard\UsersResource::class)
->page(App\Flashboard\ReviewQueuePage::class);
}
Explicit resource() and page() registration is merged with discovered classes and deduplicated automatically.
Environment
Optional environment variables:
FLASHBOARD_NAMEFLASHBOARD_PATHFLASHBOARD_GUARDFLASHBOARD_REPORT_BOOT
Access
- login:
/panel/loginwhenpath('panel')is configured - panel root:
/panel - resource index:
/panel/resources/<resource-key>
Quick validation
- Copy
examples/host-app/app/Flashboard/ReviewQueuePage.phpinto the host app atapp/Flashboard/ReviewQueuePage.php - Run
php artisan flashboard:make-provider - Run
php artisan flashboard:make-resource OrdersResource App\\Models\\Order - Confirm the generated provider is registered in
bootstrap/providers.phpand keeps$this->panelConfig()->path('panel')->discover() - Visit your configured panel login path, for example
/panel/login
Debug surfaces
- Visit any panel route with
Accept: application/jsonto inspect the runtime payload envelope - Use the playground helper:
php artisan flashboard:playground - Generate a resource:
php artisan flashboard:make-resource - Generate a page:
php artisan flashboard:make-page