public static function generate_page(Module $module, string $action)
    {
        $settings = static::query()->where('module_name', $module->name)
            ->where('action', $action)->get()->makeFormFields();

        return [
            'module' => $module,
            'sections' => $settings->pluck('section')->unique(),
            'fieldsets' => $settings->pluck('fieldset')->unique(),
            'fields' => $settings->groupBy(['section', 'fieldset']),
        ];
    }
public static function generate_page(Module $module, string $action)
    {
        $settings = static::query()->where('module_name', $module->name)
            ->where('action', $action)->get()->makeFormFields();

        return [
            'module' => $module,
            'sections' => $settings->pluck('section')->unique(),
            'fieldsets' => $settings->pluck('fieldset')->unique(),
            'fields' => $settings->groupBy(['section', 'fieldset']),
        ];
    }
public static function generate_page ( Module $ module , string $ action ) { $ settings = static :: query ( ) -> where ( 'module_name' , $ module -> name ) -> where ( 'action' , $ action ) -> get ( ) -> makeFormFields ( ) ; return [ 'module' => $ module , 'sections' => $ settings -> pluck ( 'section' ) -> unique ( ) , 'fieldsets' => $ settings -> pluck ( 'fieldset' ) -> unique ( ) , 'fields' => $ settings -> groupBy ( [ 'section' , 'fieldset' ] ) , ] ; }
Automatic config screen generator.

@param  \BBCMS\Models\Module  $module
@param  string  $action
@return array
Automatic config screen generator .