Files
eatvio-infra/app/Presenters/PlanPresenter.php
2023-12-11 11:35:07 +03:00

23 lines
403 B
PHP

<?php
namespace App\Presenters;
use Illuminate\Support\Facades\Storage;
use App\Models\Plan;
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();
}
}