Files
eatvio-infra/app/Presenters/PlanPresenter.php
Anatoliy Poloz 92a54106ef analysators added
2023-12-18 14:36:32 +03:00

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();
}
}