PHP code example of hepplerdotnet / laravel-config-override

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

    

hepplerdotnet / laravel-config-override example snippets


/**
     * Register all of the configured providers.
     *
     * @return void
     */
    public function registerConfiguredProviders()
    {
        $providers = Collection::make($this->make('config')->get('app.providers'))
                        ->partition(function ($provider) {
                            return strpos($provider, 'Illuminate\\') === 0;
                        });

        $providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);

        (new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))
                    ->load($providers->collapse()->toArray());
    }

use HepplerDotNet\LaravelConfigOverride\Models\Group;
Group::create(["name" => "app", "root" => true, "active" => true])
  ->entries()
  ->create(["key" => "locale", "value" => "de", "type" => "String"]);

Group::create(["name" => "mail", "root" => true, "active" => true])
    ->groups()->create(["name" => "mailers", "root" => false, "active" => true])
    ->groups()->create(["name" => "smtp", "root" => false, "active" => true])
    ->entries()->create(["key" => "host","value" => "localhost", "type" => "String"]);