Example #1
0
 /**
  * Get the instance as an array.
  *
  * @return array
  */
 public function toArray()
 {
     $array = $this->meta->toArray();
     $array['file'] = $this->file->toArray();
     $array['url'] = $this->url();
     return $array;
 }
Example #2
0
 /**
  * Get the instance as an array.
  *
  * @return array
  */
 public function toArray()
 {
     $array = parent::toArray();
     $array['url'] = $this->url();
     if (!isset($array['meta'])) {
         $array['meta'] = $this->getRelationValue('meta');
     }
     return $array;
 }