andersao / andersao/l5-repository
How to use presenter
Abierto
- 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
Evaluación
Este issue todavía no se ha evaluado.