andersao / andersao/l5-repository

How to use presenter

Abierto
#563 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
PHP
Estrellas
4.2k
Forks
880
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

There are not many example on how to use a presenter.

I am getting error:

> Call to undefined method App\Repositories\UserRepositoryEloquent::getName()

In UserRepositoryEloquent I add method:

```php
public function presenter()
{
return "App\\Presenters\\UserPresenter";
}
```

And UserPresenter have method getName():

```php
public function getName()
{
return $this->user->name;
}
```

What am I missing?

I suppose that the Presenter should be used in Transformer, but they are not working.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.