protected function setDefaultOptions()
    {
        $areas   = array_keys(config('areas.areas'));
        $default = config('areas.default');

        $configuration = require_once(modules_path('core/brands/resources/config/install.php'));

        $countryId    = Country::where('code', 'pl')->first()->id;
        $languageId   = Languages::where('code', 'en')->first()->id;
        $dateFormatId = DateFormat::first()->id;
        $brandId      = Brands::where('default', 1)->first()->id;
        $email        = require_once(modules_path('core/brands/resources/config/config.php'));

        $defaults = [
            'brand_id'       => $brandId,
            'country_id'     => $countryId,
            'language_id'    => $languageId,
            'date_format_id' => $dateFormatId,
            'maintenance'    => 0,
            'url'            => url('/'),
            'header'         => array_get($email, 'default.header')->render(),
            'styles'         => array_get($email, 'default.styles')->render(),
            'footer'         => array_get($email, 'default.footer')->render()
        ];


        Schema::table('tbl_brand_options', function(Blueprint $table) use($defaults) {
            DB::table('tbl_brand_options')->insert($defaults);
        });

        foreach ($areas as $area) {
            $keyname = ($area != $default) ? 'optional' : 'default';
            Schema::table('tbl_brand_templates', function(Blueprint $table) use($configuration, $keyname, $area, $brandId) {
                $config = array_get($configuration, $keyname);
                DB::table('tbl_brand_templates')->insert([
                    'brand_id'    => $brandId,
                    'area'        => $area,
                    'composition' => array_get($config, 'composition'),
                    'styleset'    => array_get($config, 'styleset'),
                    'logo'        => array_get($config, 'logo'),
                    'favicon'     => array_get($config, 'favicon'),
                    'colors'      => serialize(array_get($config, 'colors')),
                ]);
            });
        }
        return;
    }