Пример #1
0
 function image($width = null)
 {
     if (!func_num_args()) {
         return $this->image ? File::find($this->image) : null;
     } elseif ($image = $this->image()) {
         $source = $image->file();
         return Block_Thumb::url(compact('width', 'source'));
     }
 }
Пример #2
0
 function avatar($width)
 {
     if ($source = $this->avatar) {
         return Block_Thumb::url(compact('width', 'source'));
     }
 }