UserPresenter.php 485 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?php namespace Modules\User\Presenters;

use Laracasts\Presenter\Presenter;

class UserPresenter extends Presenter
{
    /**
     * Return the gravatar link for the users email
     * @param int $size
     * @return string
     */
    public function gravatar($size = 90)
    {
        $email = md5($this->email);
        return "//www.gravatar.com/avatar/$email?s=$size";
    }

    public function fullname()
    {
        return $this->first_name . ' ' . $this->last_name;
    }
22
}