PHP code example of statelyworld / laravel-settings

1. Go to this page and download the library: Download statelyworld/laravel-settings library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

statelyworld / laravel-settings example snippets


use StatelyWorld\LaravelSettings\Models\Setting;

// Store a setting
Setting::set('site_name', 'My Awesome Website');

use StatelyWorld\LaravelSettings\Models\Setting;

// Retrieve the setting or use a default if not found
$siteName = Setting::get('site_name', 'Default Site Name');
bash
php artisan migrate
bash
php artisan vendor:publish --tag=laravel-settings-migrations
php artisan migrate

src/
└── Models/
    └── Setting.php
└── SettingServiceProvider.php
database/
└── migrations/
    └── create_settings_table.php
composer.json
README.md