Example #1
0
 /**
  * Get Pdf file url
  * @return string
  */
 public function getPdfUrlAttribute()
 {
     return getS3FileURL(sprintf('%s/%s.pdf', $this->contract_id, $this->page_no));
 }
 /**
  * Get word file url
  *
  * @return string
  */
 public function getWordFileAttribute()
 {
     if ($this->pdf_process_status == static::PROCESSING_COMPLETE) {
         list($filename, $ext) = explode('.', $this->file);
         $wordFileName = $filename . '.txt';
         return getS3FileURL($this->id . '/' . $wordFileName);
     }
     return '';
 }