original_string: public function store(array $data)
      {
          DB::transaction(function() use($data) {
              $model = $this->storeNotificationInstance($data);
              foreach ($data['title'] as $langId => $content) {
                  $model->contents()->save($model->contents()->getModel()->newInstance([
                              'notification_id' => $model->id,
                              'lang_id'         => $langId,
                              'title'           => $content,
                              'content'         => $data['content'][$langId],
                              'subject'         => $data['subject'][$langId]
                  ]));
              }
          });
      }
code: public function store(array $data)
      {
          DB::transaction(function() use($data) {
              $model = $this->storeNotificationInstance($data);
              foreach ($data['title'] as $langId => $content) {
                  $model->contents()->save($model->contents()->getModel()->newInstance([
                              'notification_id' => $model->id,
                              'lang_id'         => $langId,
                              'title'           => $content,
                              'content'         => $data['content'][$langId],
                              'subject'         => $data['subject'][$langId]
                  ]));
              }
          });
      }
code_tokens: public function store ( array $ data ) { DB :: transaction ( function ( ) use ( $ data ) { $ model = $ this -> storeNotificationInstance ( $ data ) ; foreach ( $ data [ 'title' ] as $ langId => $ content ) { $ model -> contents ( ) -> save ( $ model -> contents ( ) -> getModel ( ) -> newInstance ( [ 'notification_id' => $ model -> id , 'lang_id' => $ langId , 'title' => $ content , 'content' => $ data [ 'content' ] [ $ langId ] , 'subject' => $ data [ 'subject' ] [ $ langId ] ] ) ) ; } } ) ; }
docstring: stores new notification
  
  @param array $data
docstring_tokens: stores new notification