Skip to content

Instantly share code, notes, and snippets.

@deleugpn
Created September 22, 2018 12:38
Show Gist options
  • Save deleugpn/f5b2a677054bdf2882adc5ec9475348b to your computer and use it in GitHub Desktop.
Save deleugpn/f5b2a677054bdf2882adc5ec9475348b to your computer and use it in GitHub Desktop.
<?php
namespace App\Modules\Authors;
use App\Eloquent\Author;
use App\Modules\Authors\Resources\AuthorResource;
class ListAuthors
{
public function __invoke(Author $author)
{
return AuthorResource::collection($author->paginate());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment