Example #1
0
 public function toArray()
 {
     $array = parent::toArray();
     $array['name'] = $this->getName();
     if ($this->profileImage()->first()) {
         $array['profile_image'] = URL::to($this->profileImage->url());
         $array['profile_image_base'] = URL::to($this->profileImage->resizeImageURL());
     }
     $array['roles'] = $this->roles()->lists('name');
     $array['url'] = $this->getProfileURL();
     return $array;
 }
Example #2
0
 public function toArray()
 {
     $array = parent::toArray();
     if ($this->location) {
         $array['lat'] = $this->location->lat;
         $array['lng'] = $this->location->lng;
         $array['latlng'] = $this->location ? $this->location->latlngString() : '';
     }
     $array['url'] = $this->getURL();
     $array['edit_url'] = $this->getEditURL();
     $array['thumbnail'] = URL::to($this->getThumbnail()->url());
     $array['thumbnail_base'] = URL::to($this->getThumbnail()->resizeImageURL());
     return $array;
 }
Example #3
0
 public function toArray()
 {
     $this->name;
     $this->email;
     return $res = parent::toArray();
 }