Configuration

#Configuration File

After publishing Laraform's asses with php artisan vendor:publish you'll find the configuration file at config/laraform.php. You'll find the following configuration variables there:

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Forms' path
    |--------------------------------------------------------------------------
    |
    | Namespace where form classes can be found.
    |
    */
    'path' => 'App\\Forms',

    /*
    |--------------------------------------------------------------------------
    | Vue component
    |--------------------------------------------------------------------------
    |
    | Default Vue component.
    |
    */
    'component' => 'laraform',

    /*
    |--------------------------------------------------------------------------
    | Store
    |--------------------------------------------------------------------------
    |
    | Default location to store uploaded files.
    |
    */
    'store' => [
        'disk' => 'public',
        'folder' => 'laraform',
    ],

    /*
    |--------------------------------------------------------------------------
    | Trix store
    |--------------------------------------------------------------------------
    |
    | Default location to store files uploaded via Trix.
    |
    */
    'trix' => [
        'disk' => 'public',
        'folder' => 'laraform',
    ],

    /*
    |--------------------------------------------------------------------------
    | Rate limit
    |--------------------------------------------------------------------------
    |
    | Rate limit for `unique` and `exists` validator rules. 
    |
    */
    'throttle' => '60,1',

    /*
    |--------------------------------------------------------------------------
    | Theme
    |--------------------------------------------------------------------------
    |
    | Default theme.
    |
    */
    'theme' => 'bs4',

    /*
    |--------------------------------------------------------------------------
    | Theme
    |--------------------------------------------------------------------------
    |
    | Default form layout. If `false` no layout will be used.
    |
    */
    'layout' => 'horizontal',

    /*
    |--------------------------------------------------------------------------
    | Labels
    |--------------------------------------------------------------------------
    |
    | Determines if the elements which do not have a `label` option defined
    | should have a label DOM element rendered.
    |
    */
    'labels' => true,

    /*
    |--------------------------------------------------------------------------
    | Form Errors
    |--------------------------------------------------------------------------
    |
    | Determines if errors should be displayed above form.
    |
    */
    'formErrors' => true,

    /*
    |--------------------------------------------------------------------------
    | Columns
    |--------------------------------------------------------------------------
    |
    | Default column settings.
    |
    */
    'columns' => [
        'element' => 12,
        'label' => 2,
        'field' => 10
    ],

    /*
    |--------------------------------------------------------------------------
    | Languages
    |--------------------------------------------------------------------------
    |
    | Available languages for translatable elements.
    |
     */
    'languages' => [
        'en' => [
            'code' => 'en',
            'label' => 'English'
        ],x
    ],

    /*
    |--------------------------------------------------------------------------
    | Language
    |--------------------------------------------------------------------------
    |
    | Default language for multilingual forms.
    |
    */
    'language' => 'en',

    /*
    |--------------------------------------------------------------------------
    | Locale
    |--------------------------------------------------------------------------
    |
    | Default locale.
    |
    */
    'locale' => 'en_US',

    /*
    |--------------------------------------------------------------------------
    | App timezone
    |--------------------------------------------------------------------------
    |
    | Timezone of the application.
    |
    */
    'timezone' => null,

    /*
    |--------------------------------------------------------------------------
    | User timezone
    |--------------------------------------------------------------------------
    |
    | Forced timezone of the user. Only define it if you are 100% sure that
    | your users will be from this timezone.
    |
    */
    'userTimezone' => null,

    /*
    |--------------------------------------------------------------------------
    | Validate On
    |--------------------------------------------------------------------------
    |
    | When user inputs should be validated.
    | 
    | Possible values: 
    |   submit: upon form submission
    |   change: instantly upon user input
    |   step: before moving to the next step when using Wizard
    |
    */
    'validateOn' => 'submit|change',
];