public function store(Request $request)
    {
        $filePath = $this->handleImageUpload($request->file('theme_zip_file'));

        $zip = new \ZipArchive();

        if ($zip->open($filePath) === true) {
            $extractPath = base_path('themes');
            $zip->extractTo($extractPath);
            $zip->close();
        } else {
            throwException('Error in Zip Extract error.');
        }

        return redirect()->route('admin.theme.index');
    }
public function store(Request $request)
    {
        $filePath = $this->handleImageUpload($request->file('theme_zip_file'));

        $zip = new \ZipArchive();

        if ($zip->open($filePath) === true) {
            $extractPath = base_path('themes');
            $zip->extractTo($extractPath);
            $zip->close();
        } else {
            throwException('Error in Zip Extract error.');
        }

        return redirect()->route('admin.theme.index');
    }
public function store ( Request $ request ) { $ filePath = $ this -> handleImageUpload ( $ request -> file ( 'theme_zip_file' ) ) ; $ zip = new \ ZipArchive ( ) ; if ( $ zip -> open ( $ filePath ) === true ) { $ extractPath = base_path ( 'themes' ) ; $ zip -> extractTo ( $ extractPath ) ; $ zip -> close ( ) ; } else { throwException ( 'Error in Zip Extract error.' ) ; } return redirect ( ) -> route ( 'admin.theme.index' ) ; }
Store a newly created theme in database.

@param \Illuminate\Http\Request $request

@return \Illuminate\Http\Response
Store a newly created theme in database .