PHP code example of letsgoi / laravel-settings

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

    

letsgoi / laravel-settings example snippets


    /*
     * Package Service Providers...
     */
    ...
    Letsgoi\LaravelSettings\SettingsServiceProvider::class,

    protected function resources(): void
    {
        Nova::resources([
            ...
            SettingNovaResource::class,
        ]);
    }

    DB::table('settings')->insert([
            'id' => 'APP_URL',
            'type' => 'string'
    ]);

    $settingRepository = new SettingRepository();
    
    $value = $settingRepository->find('key');
bash
php artisan vendor:publish --provider="Letsgoi\LaravelSettings\SettingsServiceProvider" --tag="migrations"