Laravel Option Framework

The Laravel Option Framework from Haruncpi helps you manage your Laravel application in one place with a variety of input types that support dynamic settings.


Its main features are:

  • A simple user interface
  • Adjustable route
  • Configurable middleware
  • Interchangeable interface
  • Laravel verification support

config/options.php works by defining a file that resembles the following example:

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 import an option in your code getOption():

getOption('backup_time');

The following field types are supported when writing this package:

  • text
  • textarea
  • Switcher
  • editor
  • colorpicker
  • datepicker
  • timepicker
  • datetimepicker
  • dropdown
  • autocomplete
  • radio
  • Tag
  • multicheck
  • icon

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

  Quote

KARABAY A, 2020 . Laravel Option Framework,

https://www.karabayyazilim.com/blog/php/framework/laravel/laravel-option-framework-2020-02-26-222713

(Accessed February 26, 2020).


  Share this post

Comments (0)

Comment

Subscribe
Sign up for the email newsletter to be the first to know about my blog posts