public function sync(array $data, array $areas = [])
    {
        DB::beginTransaction();
        try {
            $templates = array_get($data, 'templates', []);
            $model     = $this->storeNotificationInstance($data);
            $langs     = array_get($data, 'languages', []);
            foreach ($langs as $lang) {
                $this->processSingle($data, $lang, $model);
            }
        } catch (Exception $e) {
            DB::rollback();
            throw $e;
        }
        DB::commit();
        return true;
    }
public function sync(array $data, array $areas = [])
    {
        DB::beginTransaction();
        try {
            $templates = array_get($data, 'templates', []);
            $model     = $this->storeNotificationInstance($data);
            $langs     = array_get($data, 'languages', []);
            foreach ($langs as $lang) {
                $this->processSingle($data, $lang, $model);
            }
        } catch (Exception $e) {
            DB::rollback();
            throw $e;
        }
        DB::commit();
        return true;
    }
public function sync ( array $ data , array $ areas = [ ] ) { DB :: beginTransaction ( ) ; try { $ templates = array_get ( $ data , 'templates' , [ ] ) ; $ model = $ this -> storeNotificationInstance ( $ data ) ; $ langs = array_get ( $ data , 'languages' , [ ] ) ; foreach ( $ langs as $ lang ) { $ this -> processSingle ( $ data , $ lang , $ model ) ; } } catch ( Exception $ e ) { DB :: rollback ( ) ; throw $ e ; } DB :: commit ( ) ; return true ; }
Stores system notifications

@param array $data
@param array $areas
@throws Exception
Stores system notifications