imtigger/laravel-settings-ui

Laravel Settings UI

0.2.0 2018-09-06 16:40 UTC

This package is auto-updated.

Last update: 2024-04-08 07:21:27 UTC


README

Simple UI for anlutro/laravel-settings

Requirements

Installation

This plugin can only be installed from Composer.

Run the following command:

$ composer require imtigger/laravel-settings-ui

Add the following to your config/app.php:

'providers' => [
    ...
    Imtigger\LaravelSettingsUI\LaravelSettingsUIServiceProvider::class,
]

Add route to web.php

Route::get('/setting', ['as' => 'laravel-settings-ui', 'uses' => '\\Imtigger\\LaravelSettingsUI\\Controller@get']);
Route::post('/setting', ['as' => 'laravel-settings-ui.post', 'uses' => '\\Imtigger\\LaravelSettingsUI\\Controller@post']);

Publish config, form and view

php artisan vendor:publish --provider="Imtigger\LaravelSettingsUI\LaravelSettingsUIServiceProvider" 

Usage

Edit app/Forms/LaravelSettingsForm.php to add/remove fields

All fields in this Form is automagically saved

Edit resources\views\vendor\laravel-settings-ui\settings.blade.php to adapt it to your favorite theme!

Final word: Remember use middleware to protect routes

Laravel Form Builder Documentations

Laravel Settings Documentations