PHP code example of robtrehy / laravel-application-settings

1. Go to this page and download the library: Download robtrehy/laravel-application-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/ */

    

robtrehy / laravel-application-settings example snippets


    'database' => [
        'table' => 'settings',
        'key' => 'key',
        'value' => 'value'
    ],
    'cache' => [
        'key' => 'application.settings'
    ]

ApplicationSettings::set(string [setting], [value]);

ApplicationSettings::get(string [setting], string [default] = null);

ApplicationSettings::get(array [setting], array [default] = null);

ApplicationSettings::all()

ApplicationSettings::has(string [setting]);

ApplicationSettings::delete(string [setting]);

    php artisan vendor:publish --provider="RobTrehy\LaravelApplicationSettings\ApplicationSettingsServiceProvider" --tag="config"
    

    php artisan vendor:publish --provider="RobTrehy\LaravelApplicationSettings\ApplicationSettingsServiceProvider" --tag="migrations" && php artisan migrate