Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Revisor Laravel Package

indracollective/laravel-revisor

View on GitHub
Deep Wiki
Context7

Configuration

After publishing the configuration during installation, the following configuration file will be available to in you at config/revisor.php. Review the available settings and adjust to your needs.

<?php

use Indra\Revisor\Enums\RevisorContext;

return [
    // The table suffixes are used to produce 3 tables for each of your Revisor enabled Models
    // Example: if your model's table name is `pages`, the default revisor table_suffixes config
    // will produce the following tables when migrations are run:
    // pages_drafts, pages_versions, pages_published
    'table_suffixes' => [
        RevisorContext::Draft->value => '_drafts',
        RevisorContext::Version->value => '_versions',
        RevisorContext::Published->value => '_published',
    ],

    // The default mode determines which of your Revisor enabled Model's tables will read/written to by default
    // The RevisorContext enum is used to define the possible values for this
    // The options are `Draft`, `Version` and `Published`
    'default_context' => RevisorContext::Published,

    // Publishing configuration
    'publishing' => [
        // Determines whether records should be automatically published when created/updated
        // These can be overridden on a Model instance as needed, see \Indra\Revisor\Concerns\HasPublishing
        'publish_on_created' => false,
        'publish_on_updated' => false,

        // The names of table columns that store publishing data
        'table_columns' => [
            'is_published' => 'is_published',
            'published_at' => 'published_at',
            'publisher' => 'publisher',
        ],
    ],

    // The publishing config is used to determine the default versioning behaviour,
    'versioning' => [
        // Determines whether records should have new versions created when created/updated
        // These can be overridden on a Model instance as needed, see \Indra\Revisor\Concerns\HasVersioning
        'save_new_version_on_created' => true,
        'save_new_version_on_updated' => true,

        // The maximum number of versions to keep
        // if set to true, version records will not be pruned
        'keep_versions' => 10,

        // The names of table columns that store versioning data
        'table_columns' => [
            'is_current' => 'is_current',
            'version_number' => 'version_number',
            'record_id' => 'record_id',
        ],
    ],
];

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope