src/Models/Config.php
public static function fetchExactSettings($environment = null, $website_id = null, $group = 'config')
    {
        $model = static::where('group', '=', $group);

        // Environment can be null, or must match or use the null wildcard.
        $model->where(function ($query) use ($environment) {
            if (empty($environment)) {
                $query->whereNull('environment');
            } else {
                $query->where('environment', '=', $environment);
            }
        });

        // Website can be null, or must match or use the null wildcard.
        $model->where(function ($query) use ($website_id) {
            if (empty($website_id)) {
                $query->whereNull('website_id');
            } else {
                $query->where('website_id', '=', $website_id);
            }
        });

        /*
        Log::debug(__CLASS__ . ':' . __TRAIT__ . ':' . __FILE__ . ':' . __LINE__ . ':' . __FUNCTION__ . ':' .
            'Config SQL query: ' . $model->toSql());
        */

        /** @var Collection $collection */
        $collection = $model->get();
        return static::normaliseCollection($collection);
    }
public static function fetchExactSettings($environment = null, $website_id = null, $group = 'config')
    {
        $model = static::where('group', '=', $group);

        // Environment can be null, or must match or use the null wildcard.
        $model->where(function ($query) use ($environment) {
            if (empty($environment)) {
                $query->whereNull('environment');
            } else {
                $query->where('environment', '=', $environment);
            }
        });

        // Website can be null, or must match or use the null wildcard.
        $model->where(function ($query) use ($website_id) {
            if (empty($website_id)) {
                $query->whereNull('website_id');
            } else {
                $query->where('website_id', '=', $website_id);
            }
        });

        /*
        Log::debug(__CLASS__ . ':' . __TRAIT__ . ':' . __FILE__ . ':' . __LINE__ . ':' . __FUNCTION__ . ':' .
            'Config SQL query: ' . $model->toSql());
        */

        /** @var Collection $collection */
        $collection = $model->get();
        return static::normaliseCollection($collection);
    }
public static function fetchExactSettings ( $ environment = null , $ website_id = null , $ group = 'config' ) { $ model = static :: where ( 'group' , '=' , $ group ) ; // Environment can be null, or must match or use the null wildcard. $ model -> where ( function ( $ query ) use ( $ environment ) { if ( empty ( $ environment ) ) { $ query -> whereNull ( 'environment' ) ; } else { $ query -> where ( 'environment' , '=' , $ environment ) ; } } ) ; // Website can be null, or must match or use the null wildcard. $ model -> where ( function ( $ query ) use ( $ website_id ) { if ( empty ( $ website_id ) ) { $ query -> whereNull ( 'website_id' ) ; } else { $ query -> where ( 'website_id' , '=' , $ website_id ) ; } } ) ; /*
        Log::debug(__CLASS__ . ':' . __TRAIT__ . ':' . __FILE__ . ':' . __LINE__ . ':' . __FUNCTION__ . ':' .
            'Config SQL query: ' . $model->toSql());
        */ /** @var Collection $collection */ $ collection = $ model -> get ( ) ; return static :: normaliseCollection ( $ collection ) ; }
Return the exact configuration data for a specific environment & group.

This function returns the exact configuration data for a specific
environment and group, ignoring any wildcard (NULL) values.

As an example here are some table entries:

<code>
id     host    env    key    value
1      NULL    NULL   fruit  apple
2      NULL    prod   fruit  banana
3      www     prod   fruit  mango
4      NULL    test   fruit  peach
5      test    NULL   fruit  orange
</code>

Given that sample data, this function should return the following
data for these searches:

<code>
env     host   key    data returned
NULL    NULL   fruit  1, fruit, apple
prod    NULL   fruit  2, fruit, banana
NULL    www    fruit  null
junk    junk   fruit  null
junk    www    fruit  null
prod    test   fruit  null
</code>

The data that this function returns is actually a set of key => value
pairs for the configuration found within group $group.

To get the full configuration you need to call this function for each
group returned by fetchAllGroups().

@param string $environment
@param integer $website_id
@param string $group
@return array
Return the exact configuration data for a specific environment & group .