/**
  * @param $filename
  * @param $orgId
  * @return bool
  */
 public function saveOrganizationPublishedFiles($filename, $orgId)
 {
     $published = $this->orgPublished->firstOrNew(['filename' => $filename, 'organization_id' => $orgId]);
     $published->touch();
     $published->filename = $filename;
     $published->organization_id = $orgId;
     return $published->save();
 }
 /**
  * Gets a record from OrganizationPublished with the specific fileId.
  * @param $fileId
  * @return mixed
  */
 public function findOrganizationFile($fileId)
 {
     return $this->organizationPublished->findOrFail($fileId);
 }
 /** Returns status of the organization data
  * @param $orgId
  * @return mixed
  */
 public function statusOfOrganizationDataPublished($orgId)
 {
     return $this->organizationPublished->statusOfOrganizationDataPublished($orgId);
 }
 /**
  * Get the OrganizationPublished model.
  * @return mixed
  */
 protected function getCurrentlyPublishedOrganizationFile()
 {
     return $this->organizationPublished->where('organization_id', '=', $this->organization->id)->get();
 }