›
›
›
  1. docs
  2. ›
  3. byrcsc/laravel-whitelabel
1.x
Browse documentationOpenClose

Getting started

  • Introduction
  • Installation and setup
  • Quick start

Core concepts

  • Brand definitions
  • Fallback and clearing
  • Brand resolution
  • Brand repositories

Using brands

  • Blade components
  • Mail and notifications
  • Queues
  • Spatie Multitenancy

Operations

  • Manage database brands
  • Custom drivers and resolvers
  • Events and listeners
  • Cache management

Reference

  • Configuration
  • Public API
  • Console commands
  • Testing
  • Troubleshooting

Getting started

  • Introduction
  • Installation and setup
  • Quick start

Core concepts

  • Brand definitions
  • Fallback and clearing
  • Brand resolution
  • Brand repositories

Using brands

  • Blade components
  • Mail and notifications
  • Queues
  • Spatie Multitenancy

Operations

  • Manage database brands
  • Custom drivers and resolvers
  • Events and listeners
  • Cache management

Reference

  • Configuration
  • Public API
  • Console commands
  • Testing
  • Troubleshooting

byrcsc/laravel-whitelabel · 1.x

Configuration.

Reference every published configuration key and its default value.

Use config/whitelabel.php to select storage, resolution, assets, mail, and cache behavior. Publish it with php artisan whitelabel:install.

Top-level keys

KeyDefaultPurpose
whitelabel.driverconfigRepository driver name
whitelabel.defaultdefaultDefault brand identifier and fallback source
whitelabel.brands['default' => []]Definitions used by the config driver
whitelabel.resolversfour included resolver classesOrdered active-brand resolver chain

An empty or non-string driver falls back to config. A null or empty default identifier disables the default fallback and makes DefaultResolver return null.

Database

KeyDefaultPurpose
whitelabel.database.connectionnullLaravel database connection
whitelabel.database.tablebrandsTable used by the model and migration

Null or empty values select the application connection and brands table. Change these keys before running the published migration.

Assets and CSS

KeyDefaultPurpose
whitelabel.assets.diskpublicDisk for relative asset strings and maps without a disk
whitelabel.css.prefixbrandPrefix for CSS custom properties

An empty asset disk passes null to Storage::disk(), which selects Laravel's default filesystem disk. An invalid non-string CSS prefix falls back to brand; unsafe characters in a string prefix are removed before rendering.

Mail

KeyDefaultPurpose
whitelabel.mail.markdowntrueEnable logo and primary-colour Markdown components
whitelabel.mail.override_fromfalseReplace the sender from the active brand

Only the exact boolean false disables Markdown branding. Only the exact boolean true enables sender replacement.

Cache

KeyDefaultPurpose
whitelabel.cache.enabledtrueWrap non-config drivers in the cache decorator
whitelabel.cache.storenullLaravel cache store name
whitelabel.cache.prefixwhitelabelPrefix for package cache keys

Only the exact boolean false disables the decorator. Null or empty store selects Laravel's default. Null, empty, or non-string prefix falls back to whitelabel.

Default resolver chain

'resolvers' => [
    Byrcsc\Whitelabel\Resolvers\OverrideResolver::class,
    Byrcsc\Whitelabel\Resolvers\TenantResolver::class,
    Byrcsc\Whitelabel\Resolvers\DomainResolver::class,
    Byrcsc\Whitelabel\Resolvers\DefaultResolver::class,
],

Entries may be container-resolvable class names or resolver objects. Entries that do not implement BrandResolver are ignored. An empty or non-array value leaves the application with no active-brand resolution.

Brand definition keys

Each entry under whitelabel.brands accepts name, domain, logo, favicon, colors, mail, and settings. See Brand definitions for accepted shapes and validation.

What to read next

  • Brand definitions for the nested brands schema.
  • Brand resolution for resolver order and lazy behavior.
  • Cache management for cache invalidation and tenant isolation.
PreviousCache managementNextPublic API
View source

On this page

  1. Top-level keys
  2. Database
  3. Assets and CSS
  4. Mail
  5. Cache
  6. Default resolver chain
  7. Brand definition keys
  8. What to read next