Laravel Packages

Laravel Option Framework

Published
Laravel Option Framework image

The Laravel Option Framework by @haruncpi helps you “manage your Laravel application’s dynamic settings in one place with various supported input types.”

Here’s an example screenshot provided from the project’s readme:

It’s main features include:

  • Clean & fresh responsive UI
  • Configurable route
  • Configurable middleware
  • Build-in Option UI
  • Various option type support
  • Laravel validation rules support
  • and more

It works by defining a config/options.php file, that might look similar to the following example from the README:

return [
    [
        "id" => "general",
        "label" => "General",
        "icon" => "fa-cubes",
        "fields" => [
            [
                "type" => "text",
                "id" => "site_name",
                "label" => "Site Name",
                "description" => "Enter your site name",
                "icon" => "fa-globe",
                "validation" => 'required|min:10'
            ],
            [
                "type" => "text",
                "id" => "site_slogan",
                "label" => "Site Slogan",
                "description" => "Enter site slogan",
                "validation" => 'required'
            ],
            [
                "type" => "timepicker",
                "id" => "backup_time",
                "label" => "Backup Time",
                "description" => "Set db backup time",
                "validation" => 'required'
            ]

        ]
    ],
    [
        "id" => "social",
        "label" => "Social",
        "icon" => "fa-globe",
        "fields" => [ /* ... */ ]
    ]
];

To retrieve an option in your code, you use the getOption() helper:

getOption('backup_time');

At the time of writing this package supports the following field types:

  • text
  • textarea
  • switcher
  • editor
  • colorpicker
  • datepicker
  • timepicker
  • datetimepicker
  • dropdown
  • autocomplete
  • radio
  • tag
  • multicheck
  • icon

You can learn more about this package, get full installation instructions, and view the source code on GitHub at laravel-option-framework.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Sponsored

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
pgjumbo: A PostgreSQL Client for macOS, Windows, and Linux image

pgjumbo: A PostgreSQL Client for macOS, Windows, and Linux

Read article
Laranon: Reversible PII Anonymization for Laravel and LLMs image

Laranon: Reversible PII Anonymization for Laravel and LLMs

Read article
PHP 8.6 is released!  image

PHP 8.6 is released!

Read article
Laravel Warrant: Row-Level Permissions With Eloquent image

Laravel Warrant: Row-Level Permissions With Eloquent

Read article
JSON Schema Validation Rules and a RetryFor Attribute in Laravel 13.43 image

JSON Schema Validation Rules and a RetryFor Attribute in Laravel 13.43

Read article
Durable Workflow: Long-Running Workflows for Laravel image

Durable Workflow: Long-Running Workflows for Laravel

Read article