firefly-iii/app/lib/Firefly/Helper/Controllers/Category.php

29 lines
655 B
PHP
Raw Normal View History

<?php
namespace Firefly\Helper\Controllers;
use Carbon\Carbon;
2014-08-10 08:01:46 -05:00
/**
* Class Category
*
* @package Firefly\Helper\Controllers
*/
class Category implements CategoryInterface
{
2014-08-10 08:01:46 -05:00
/**
* @param \Category $category
* @param Carbon $start
* @param Carbon $end
*
* @return mixed
*/
public function journalsInRange(\Category $category, Carbon $start, Carbon $end)
{
return $category->transactionjournals()->with(
2014-08-10 04:30:14 -05:00
['transactions', 'transactions.account', 'transactiontype', 'components']
)->orderBy('date', 'DESC')->orderBy('id', 'DESC')->before($end)->after($start)->get();
}
}