Getting Started

Installation

Install Flashboard into a Laravel 13 application and bootstrap a Nuxt UI-powered admin panel provider for internal dashboards.

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 -> PanelPanelProvider
  • admin -> AdminPanelProvider
  • partner-balance -> PartnerBalancePanelProvider

It also asks which frontend package manager should be used for asset setup:

  • bun
  • npm
  • pnpm
  • yarn
  • skip 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 pages
  • discoverResources() scans only *Resource
  • discoverPages() scans only *Page
  • except() excludes classes by FQCN, basename, or relative path
  • withoutDiscovery() 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_NAME
  • FLASHBOARD_PATH
  • FLASHBOARD_GUARD
  • FLASHBOARD_REPORT_BOOT

Access

  • login: /panel/login when path('panel') is configured
  • panel root: /panel
  • resource index: /panel/resources/<resource-key>

Quick validation

  1. Copy examples/host-app/app/Flashboard/ReviewQueuePage.php into the host app at app/Flashboard/ReviewQueuePage.php
  2. Run php artisan flashboard:make-provider
  3. Run php artisan flashboard:make-resource OrdersResource App\\Models\\Order
  4. Confirm the generated provider is registered in bootstrap/providers.php and keeps $this->panelConfig()->path('panel')->discover()
  5. Visit your configured panel login path, for example /panel/login

Debug surfaces

  • Visit any panel route with Accept: application/json to 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