public function updateAll(UpdateSettingRequest $request, System $bundle)
    {
        if ($request->isReset() === false) {
            $bundle = $this->repository->getBundle($bundle);
            $data = $request->json();
            foreach ($data as $name => $value) {
                if ($bundle->hasName($name) && $value != $bundle[$name]) {
                    $bundle[$name] = $value;
                }
            }
        }
        $bundle->persist();

        return $this->sendResponse($bundle, 'Setting updated successfully.');
    }
public function updateAll(UpdateSettingRequest $request, System $bundle)
    {
        if ($request->isReset() === false) {
            $bundle = $this->repository->getBundle($bundle);
            $data = $request->json();
            foreach ($data as $name => $value) {
                if ($bundle->hasName($name) && $value != $bundle[$name]) {
                    $bundle[$name] = $value;
                }
            }
        }
        $bundle->persist();

        return $this->sendResponse($bundle, 'Setting updated successfully.');
    }
public function updateAll ( UpdateSettingRequest $ request , System $ bundle ) { if ( $ request -> isReset ( ) === false ) { $ bundle = $ this -> repository -> getBundle ( $ bundle ) ; $ data = $ request -> json ( ) ; foreach ( $ data as $ name => $ value ) { if ( $ bundle -> hasName ( $ name ) && $ value != $ bundle [ $ name ] ) { $ bundle [ $ name ] = $ value ; } } } $ bundle -> persist ( ) ; return $ this -> sendResponse ( $ bundle , 'Setting updated successfully.' ) ; }
Update all data of the system setting in storage.

@param UpdateSettingRequest $request
@param System $bundle
@return  JsonResponse
Update all data of the system setting in storage .