Skip to content

Instantly share code, notes, and snippets.

@vinicius73
Created March 5, 2016 20:10
Show Gist options
  • Save vinicius73/e3f11f8ce8a3359ea4c1 to your computer and use it in GitHub Desktop.
Save vinicius73/e3f11f8ce8a3359ea4c1 to your computer and use it in GitHub Desktop.
<?php
namespace App\Domains\Clients
use Artesaos\Warehouse\BaseRepository;
class ClientsRepository extends BaseRepository
{
public function getInvoices(Client $client, $take = 15, $paginate = false)
{
$query = $client->invoices()->getQuery();
$query->orderBy('date');
$query->with('products');
return $this->doQuery($query, $take, $paginate);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment