src/Terranet/Options/Drivers/DatabaseOptionsDriver.php
public function fetchAll(string $group = null)
    {
        if (static::$options === null) {
            static::$options = $this
                ->createModel()
                ->when($group, function ($query, $group) {
                    return $query->where('group', $group);
                })
                ->orderBy('group', 'asc')
                ->orderBy('key', 'asc')
                ->get();
        }

        return static::$options;
    }
public function fetchAll(string $group = null)
    {
        if (static::$options === null) {
            static::$options = $this
                ->createModel()
                ->when($group, function ($query, $group) {
                    return $query->where('group', $group);
                })
                ->orderBy('group', 'asc')
                ->orderBy('key', 'asc')
                ->get();
        }

        return static::$options;
    }
public function fetchAll ( string $ group = null ) { if ( static :: $ options === null ) { static :: $ options = $ this -> createModel ( ) -> when ( $ group , function ( $ query , $ group ) { return $ query -> where ( 'group' , $ group ) ; } ) -> orderBy ( 'group' , 'asc' ) -> orderBy ( 'key' , 'asc' ) -> get ( ) ; } return static :: $ options ; }
Fetch all options

@param null|string $group
@return mixed
Fetch all options