private function generateFormData ()
    {
        $files = $this->getConfigFiles ();
        $formDataHolder = [];


        if (!empty($files)) {
            foreach ($files as $file) {

                $file = json_decode (file_get_contents ($file), true);

                if (isset($file['formData']))
                    $formDataHolder = array_merge ($formDataHolder, $file['formData']);
            }
        }

        Cache::forget ('hc-forms');
        Cache::put ('hc-forms', $formDataHolder, Carbon::now ()->addMonth ());
    }
private function generateFormData ()
    {
        $files = $this->getConfigFiles ();
        $formDataHolder = [];


        if (!empty($files)) {
            foreach ($files as $file) {

                $file = json_decode (file_get_contents ($file), true);

                if (isset($file['formData']))
                    $formDataHolder = array_merge ($formDataHolder, $file['formData']);
            }
        }

        Cache::forget ('hc-forms');
        Cache::put ('hc-forms', $formDataHolder, Carbon::now ()->addMonth ());
    }
private function generateFormData ( ) { $ files = $ this -> getConfigFiles ( ) ; $ formDataHolder = [ ] ; if ( ! empty ( $ files ) ) { foreach ( $ files as $ file ) { $ file = json_decode ( file_get_contents ( $ file ) , true ) ; if ( isset ( $ file [ 'formData' ] ) ) $ formDataHolder = array_merge ( $ formDataHolder , $ file [ 'formData' ] ) ; } } Cache :: forget ( 'hc-forms' ) ; Cache :: put ( 'hc-forms' , $ formDataHolder , Carbon :: now ( ) -> addMonth ( ) ) ; }
Generating form data
Generating form data