forked from eatvio/eatvio-infra
22 lines
382 B
PHP
22 lines
382 B
PHP
<?php
|
|
|
|
namespace App\Presenters;
|
|
|
|
use Illuminate\Support\Facades\Storage;
|
|
use Laracasts\Presenter\Presenter;
|
|
|
|
class PlanPresenter extends Presenter
|
|
{
|
|
public function getAuthorPhoto()
|
|
{
|
|
$author = $this->getAuthor();
|
|
|
|
return Storage::url($author->profile_photo_path);
|
|
}
|
|
|
|
public function getAuthor()
|
|
{
|
|
return $this->author->first();
|
|
}
|
|
}
|