OMNI Access v1.3.0 Free ~8 min read

Configuring OMNI Access

Publish and tune config/omni-access.php: primary key types (bigint/uuid/int), table names, user model, super-admin bootstrap, and cache settings.

A Administrator Oct 22, 2026 3 Steps 2,669 views
Discussion (0)
Step 1 of 3

Overview

Publish the configuration file:

php artisan vendor:publish --tag=omni-access-config
bash
php artisan vendor:publish --tag=omni-access-config
Step 2 of 3

Configuration Options

// config/omni-access.php

return [
    // Primary key type: 'uuid', 'bigint', or 'int'
    'primary_key_type' => env('OMNI_ACCESS_PRIMARY_KEY', 'bigint'),

    // Table names
    'table_names' => [
        'roles' => 'roles',
        'permissions' => 'permissions',
        'groups' => 'permission_groups',
        'role_user' => 'role_user',
        'permission_role' => 'permission_role',
    ],

    // User model
    'user_model' => 'App\\Models\\User',

    // Auto assign first user as super admin
    'auto_assign_super_admin' => true,
    'super_admin_role' => 'super-admin',

    // Cache configuration
    'cache' => [
        'enabled' => true,
        'expiration_time' => 60 * 24, // 24 hours
        'key_prefix' => 'omni_access',
    ],

    // Validation rules
    'validation' => [
        'role_name_regex' => '/^[a-zA-Z0-9\s\-]+$/',
        'permission_slug_regex' => '/^[a-z0-9\.\-\_]+$/',
        'max_role_name_length' => 50,
        'max_permission_name_length' => 50,
    ],
];
php
// config/omni-access.php

return [
    // Primary key type: 'uuid', 'bigint', or 'int'
    'primary_key_type' => env('OMNI_ACCESS_PRIMARY_KEY', 'bigint'),

    // Table names
    'table_names' => [
        'roles' => 'roles',
        'permissions' => 'permissions',
        'groups' => 'permission_groups',
        'role_user' => 'role_user',
        'permission_role' => 'permission_role',
    ],

    // User model
    'user_model' => 'App\\Models\\User',

    // Auto assign first user as super admin
    'auto_assign_super_admin' => true,
    'super_admin_role' => 'super-admin',

    // Cache configuration
    'cache' => [
        'enabled' => true,
        'expiration_time' => 60 * 24, // 24 hours
        'key_prefix' => 'omni_access',
    ],

    // Validation rules
    'validation' => [
        'role_name_regex' => '/^[a-zA-Z0-9\s\-]+$/',
        'permission_slug_regex' => '/^[a-z0-9\.\-\_]+$/',
        'max_role_name_length' => 50,
        'max_permission_name_length' => 50,
    ],
];
Step 3 of 3

Environment Variables

# .env file

OMNI_ACCESS_PRIMARY_KEY=bigint
OMNI_ACCESS_USER_MODEL=App\\Models\\User
OMNI_ACCESS_AUTO_SUPER_ADMIN=true
OMNI_ACCESS_SUPER_ADMIN_SLUG=super-admin
OMNI_ACCESS_CACHE_ENABLED=true
OMNI_ACCESS_CACHE_TTL=1440
OMNI_ACCESS_CACHE_PREFIX=omni_access
bash
# .env file

OMNI_ACCESS_PRIMARY_KEY=bigint
OMNI_ACCESS_USER_MODEL=App\\Models\\User
OMNI_ACCESS_AUTO_SUPER_ADMIN=true
OMNI_ACCESS_SUPER_ADMIN_SLUG=super-admin
OMNI_ACCESS_CACHE_ENABLED=true
OMNI_ACCESS_CACHE_TTL=1440
OMNI_ACCESS_CACHE_PREFIX=omni_access
Previous Step

Congratulations! You Completed This Guide

You've walked through all 3 steps for OMNI Access v1.3.0. Keep practicing and exploring more hands-on tutorials.

Community Discussions 0

Ask questions, share step solutions, or discuss software workflows with other professionals.

Moderated Community

Join the Community Discussion

Got stuck on a step or have a question about this configuration? Sign in to join the discussion and receive direct advice from instructors and peers.

No Discussions Yet

Have a question or found a clever tip for this guide? Start the conversation using the comment box above!

Guide Checklist

3 Steps
Tutorial Progress 0%
Promotional Ads Available Space
Place Your advertising ads Here

Promote your brand, product, or service directly to our active readers and community.

Contact Us