Skip to content

Configuration

Phillip Dornauer edited this page Apr 1, 2026 · 2 revisions

Configuration

Marble is configured in config/marble.php. Publish it with:

docker compose exec app php artisan vendor:publish --tag=marble-config

All Options

route_prefix

  • Type: string
  • Default: 'admin'
  • Description: URL prefix for the admin panel. Change to move admin to a different path (e.g. 'cms'/cms/).

guard

  • Type: string
  • Default: 'marble'
  • Description: Laravel auth guard used for admin authentication. Usually no need to change.

primary_locale

  • Type: string
  • Default: 'en'
  • Description: The primary language code. Non-translatable fields are always stored under this locale.

locale

  • Type: string
  • Default: 'en'
  • Description: The current locale used when none is passed explicitly to facade methods.

uri_locale_prefix

  • Type: boolean
  • Default: false
  • Description: When true, all frontend URLs are prefixed with the language code (e.g. /en/about, /de/ueber-uns). When false, the primary language has no prefix; secondary languages do.

system_items_id

  • Type: int|null
  • Default: null
  • Description: Item ID of the container holding system references (settings, menus, etc.).

entry_item_id

  • Type: int
  • Default: 1
  • Description: The root item of the content tree. Fallback for user groups that don't have their own entry item configured.

cache_ttl

  • Type: int
  • Default: 3600 (seconds)
  • Description: How long items are cached. Set to 0 to disable caching entirely (useful during development).

storage_disk

  • Type: string
  • Default: 'public'
  • Description: Laravel filesystem disk for media uploads. Change to 's3' or another disk for cloud storage.

autosave

  • Type: boolean
  • Default: false
  • Description: Enable auto-save in the item editor.

autosave_interval

  • Type: int
  • Default: 30 (seconds)
  • Description: How often the editor auto-saves.

lock_ttl

  • Type: int
  • Default: 300 (seconds)
  • Description: How long a content lock lasts before expiring.

Example Config

return [
    'route_prefix'      => 'admin',
    'guard'             => 'marble',
    'primary_locale'    => 'en',
    'locale'            => 'en',
    'uri_locale_prefix' => false,
    'entry_item_id'     => 1,
    'cache_ttl'         => 3600,
    'storage_disk'      => 'public',
    'autosave'          => false,
    'autosave_interval' => 30,
    'lock_ttl'          => 300,
];

Scheduled Publishing

To automatically publish and expire items based on their scheduled dates, add this to your Laravel scheduler in routes/console.php:

Schedule::command('marble:schedule-publish')->everyMinute();

Or run it manually:

docker compose exec app php artisan marble:schedule-publish

Clone this wiki locally