| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2016-05-20 12:27:31 +02:00
										 |  |  | /** | 
					
						
							|  |  |  |  * breadcrumbs.php | 
					
						
							|  |  |  |  * Copyright (C) 2016 thegrumpydictator@gmail.com | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2016-10-05 06:52:15 +02:00
										 |  |  |  * This software may be modified and distributed under the terms of the | 
					
						
							|  |  |  |  * Creative Commons Attribution-ShareAlike 4.0 International License. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * See the LICENSE file for details. | 
					
						
							| 
									
										
										
										
											2016-05-20 12:27:31 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-24 15:15:12 +01:00
										 |  |  | declare(strict_types=1); | 
					
						
							| 
									
										
										
										
											2017-07-23 08:32:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | use Carbon\Carbon; | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  | use DaveJamesMiller\Breadcrumbs\Generator as BreadCrumbGenerator; | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | use FireflyIII\Exceptions\FireflyException; | 
					
						
							| 
									
										
										
										
											2015-02-22 15:40:13 +01:00
										 |  |  | use FireflyIII\Models\Account; | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | use FireflyIII\Models\Attachment; | 
					
						
							| 
									
										
										
										
											2015-02-25 15:19:14 +01:00
										 |  |  | use FireflyIII\Models\Bill; | 
					
						
							| 
									
										
										
										
											2015-03-29 21:27:51 +02:00
										 |  |  | use FireflyIII\Models\Budget; | 
					
						
							| 
									
										
										
										
											2016-12-30 07:39:42 +01:00
										 |  |  | use FireflyIII\Models\BudgetLimit; | 
					
						
							| 
									
										
										
										
											2015-02-23 21:19:16 +01:00
										 |  |  | use FireflyIII\Models\Category; | 
					
						
							| 
									
										
										
										
											2016-12-17 08:35:03 +01:00
										 |  |  | use FireflyIII\Models\ImportJob; | 
					
						
							| 
									
										
										
										
											2017-08-21 07:13:03 +02:00
										 |  |  | use FireflyIII\Models\LinkType; | 
					
						
							| 
									
										
										
										
											2015-02-24 21:10:25 +01:00
										 |  |  | use FireflyIII\Models\PiggyBank; | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | use FireflyIII\Models\Rule; | 
					
						
							|  |  |  | use FireflyIII\Models\RuleGroup; | 
					
						
							| 
									
										
										
										
											2015-05-03 12:58:55 +02:00
										 |  |  | use FireflyIII\Models\Tag; | 
					
						
							| 
									
										
										
										
											2015-05-02 10:40:20 +02:00
										 |  |  | use FireflyIII\Models\TransactionCurrency; | 
					
						
							| 
									
										
										
										
											2015-03-29 21:27:51 +02:00
										 |  |  | use FireflyIII\Models\TransactionJournal; | 
					
						
							| 
									
										
										
										
											2017-08-23 21:21:42 +02:00
										 |  |  | use FireflyIII\Models\TransactionJournalLink; | 
					
						
							| 
									
										
										
										
											2016-10-29 15:14:33 +02:00
										 |  |  | use FireflyIII\Models\TransactionType; | 
					
						
							| 
									
										
										
										
											2016-10-15 07:11:53 +02:00
										 |  |  | use FireflyIII\User; | 
					
						
							| 
									
										
										
										
											2016-12-11 10:38:06 +01:00
										 |  |  | use Illuminate\Support\Collection; | 
					
						
							| 
									
										
										
										
											2015-05-03 12:58:55 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * HOME | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'home', | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  |         $breadcrumbs->push(trans('breadcrumbs.home'), route('index')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-01 18:44:49 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'index', | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-05-01 18:44:49 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  |         $breadcrumbs->push(trans('breadcrumbs.home'), route('index')); | 
					
						
							| 
									
										
										
										
											2015-05-01 18:44:49 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * ACCOUNTS | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-02-05 09:25:15 +01:00
										 |  |  |     'accounts.index', function (BreadCrumbGenerator $breadcrumbs, string $what) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.' . strtolower(e($what)) . '_accounts'), route('accounts.index', [$what])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-02-05 09:25:15 +01:00
										 |  |  |     'accounts.create', function (BreadCrumbGenerator $breadcrumbs, string $what) { | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  |     $breadcrumbs->parent('accounts.index', $what); | 
					
						
							| 
									
										
										
										
											2015-08-23 07:41:12 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.new_' . strtolower(e($what)) . '_account'), route('accounts.create', [$what])); | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |     'accounts.show', function (BreadCrumbGenerator $breadcrumbs, Account $account, string $moment, Carbon $start, Carbon $end) { | 
					
						
							| 
									
										
										
										
											2016-12-14 18:59:12 +01:00
										 |  |  |     $what = config('firefly.shortNamesByFullName.' . $account->accountType->type); | 
					
						
							| 
									
										
										
										
											2016-12-12 20:02:33 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('accounts.index', $what); | 
					
						
							| 
									
										
										
										
											2016-12-12 20:02:33 +01:00
										 |  |  |     $breadcrumbs->push($account->name, route('accounts.show', [$account->id])); | 
					
						
							| 
									
										
										
										
											2017-02-25 13:13:51 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |     // push when is all:
 | 
					
						
							|  |  |  |     if ($moment === 'all') { | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |         $breadcrumbs->push(trans('firefly.everything'), route('accounts.show', [$account->id, 'all'])); | 
					
						
							| 
									
										
										
										
											2017-02-25 13:13:51 +01:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-04-23 09:33:33 +02:00
										 |  |  |     // when is specific period or when empty:
 | 
					
						
							| 
									
										
										
										
											2017-06-30 07:17:25 +02:00
										 |  |  |     if ($moment !== 'all' && $moment !== '(nothing)') { | 
					
						
							| 
									
										
										
										
											2017-03-24 15:15:12 +01:00
										 |  |  |         $title = trans( | 
					
						
							|  |  |  |             'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))), | 
					
						
							| 
									
										
										
										
											2017-06-05 11:12:50 +02:00
										 |  |  |                                                  'end'   => $end->formatLocalized(strval(trans('config.month_and_day')))] | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |         ); | 
					
						
							| 
									
										
										
										
											2017-04-23 09:33:33 +02:00
										 |  |  |         $breadcrumbs->push($title, route('accounts.show', [$account->id, $moment, $start, $end])); | 
					
						
							| 
									
										
										
										
											2017-02-25 13:13:51 +01:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-11-20 12:51:33 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'accounts.delete', function (BreadCrumbGenerator $breadcrumbs, Account $account) { | 
					
						
							| 
									
										
										
										
											2017-06-30 07:17:25 +02:00
										 |  |  |     $breadcrumbs->parent('accounts.show', $account, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.delete_account', ['name' => e($account->name)]), route('accounts.delete', [$account->id])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'accounts.edit', function (BreadCrumbGenerator $breadcrumbs, Account $account) { | 
					
						
							| 
									
										
										
										
											2017-06-30 07:17:25 +02:00
										 |  |  |     $breadcrumbs->parent('accounts.show', $account, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2016-04-26 21:40:15 +02:00
										 |  |  |     $what = config('firefly.shortNamesByFullName.' . $account->accountType->type); | 
					
						
							| 
									
										
										
										
											2015-05-21 07:30:38 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.edit_' . $what . '_account', ['name' => e($account->name)]), route('accounts.edit', [$account->id])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-24 18:47:55 +02:00
										 |  |  | /** | 
					
						
							|  |  |  |  * ADMIN | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('home'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.administration'), route('admin.index')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.users', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.list_all_users'), route('admin.users')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 07:11:53 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.users.show', function (BreadCrumbGenerator $breadcrumbs, User $user) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.users'); | 
					
						
							| 
									
										
										
										
											2016-10-22 09:44:47 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.single_user_administration', ['email' => $user->email]), route('admin.users.show', [$user->id])); | 
					
						
							| 
									
										
										
										
											2016-12-09 07:08:43 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.users.edit', function (BreadCrumbGenerator $breadcrumbs, User $user) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.users'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.edit_user', ['email' => $user->email]), route('admin.users.edit', [$user->id])); | 
					
						
							| 
									
										
										
										
											2016-10-15 07:11:53 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-04 06:14:08 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.users.domains', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.blocked_domains'), route('admin.users.domains')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-27 04:00:48 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.configuration.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.instance_configuration'), route('admin.configuration.index')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-20 12:41:31 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.links.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.journal_link_configuration'), route('admin.links.index')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-21 07:13:03 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.links.create', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.links.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.create_new_link_type'), route('admin.links.create')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-23 21:21:42 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.links.show', function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.links.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.overview_for_link', [$linkType->name]), route('admin.links.show', [$linkType->id])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-21 07:13:03 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.links.edit', function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.links.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.edit_link_type', ['name' => $linkType->name]), route('admin.links.edit', [$linkType->id])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'admin.links.delete', function (BreadCrumbGenerator $breadcrumbs, LinkType $linkType) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('admin.links.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.delete_link_type', ['name' => $linkType->name]), route('admin.links.delete', [$linkType->id])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2017-08-20 12:41:31 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-23 21:21:42 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'transactions.link.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionJournalLink $link) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('home'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.delete_journal_link'), route('transactions.link.delete', $link->id)); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * ATTACHMENTS | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'attachments.edit', function (BreadCrumbGenerator $breadcrumbs, Attachment $attachment) { | 
					
						
							|  |  |  |     $object = $attachment->attachable; | 
					
						
							|  |  |  |     if ($object instanceof TransactionJournal) { | 
					
						
							|  |  |  |         $breadcrumbs->parent('transactions.show', $object); | 
					
						
							| 
									
										
										
										
											2016-02-10 16:23:37 +01:00
										 |  |  |         $breadcrumbs->push($attachment->filename, route('attachments.edit', [$attachment])); | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     } else { | 
					
						
							|  |  |  |         throw new FireflyException('Cannot make breadcrumb for attachment connected to object of type ' . get_class($object)); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'attachments.delete', function (BreadCrumbGenerator $breadcrumbs, Attachment $attachment) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $object = $attachment->attachable; | 
					
						
							|  |  |  |     if ($object instanceof TransactionJournal) { | 
					
						
							|  |  |  |         $breadcrumbs->parent('transactions.show', $object); | 
					
						
							| 
									
										
										
										
											2016-02-10 16:23:37 +01:00
										 |  |  |         $breadcrumbs->push(trans('firefly.delete_attachment', ['name' => $attachment->filename]), route('attachments.edit', [$attachment])); | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     } else { | 
					
						
							|  |  |  |         throw new FireflyException('Cannot make breadcrumb for attachment connected to object of type ' . get_class($object)); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * BILLS | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'bills.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('home'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.bills'), route('bills.index')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'bills.create', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('bills.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.newBill'), route('bills.create')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'bills.edit', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('bills.show', $bill); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.edit_bill', ['name' => e($bill->name)]), route('bills.edit', [$bill->id])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'bills.delete', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('bills.show', $bill); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.delete_bill', ['name' => e($bill->name)]), route('bills.delete', [$bill->id])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'bills.show', function (BreadCrumbGenerator $breadcrumbs, Bill $bill) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('bills.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(e($bill->name), route('bills.show', [$bill->id])); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * BUDGETS | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'budgets.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.budgets'), route('budgets.index')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'budgets.create', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('budgets.index'); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.create_new_budget'), route('budgets.create')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'budgets.edit', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('budgets.show', $budget); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.edit_budget', ['name' => e($budget->name)]), route('budgets.edit', [$budget->id])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'budgets.delete', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('budgets.show', $budget); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.delete_budget', ['name' => e($budget->name)]), route('budgets.delete', [$budget->id])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-02 09:31:57 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |     'budgets.no-budget', function (BreadCrumbGenerator $breadcrumbs, string $moment, Carbon $start, Carbon $end) { | 
					
						
							| 
									
										
										
										
											2015-05-02 09:31:57 +02:00
										 |  |  |     $breadcrumbs->parent('budgets.index'); | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.journals_without_budget'), route('budgets.no-budget')); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // push when is all:
 | 
					
						
							|  |  |  |     if ($moment === 'all') { | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |         $breadcrumbs->push(trans('firefly.everything'), route('budgets.no-budget', ['all'])); | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     // when is specific period or when empty:
 | 
					
						
							|  |  |  |     if ($moment !== 'all' && $moment !== '(nothing)') { | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |         $title = trans( | 
					
						
							|  |  |  |             'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))), | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |                                                  'end'   => $end->formatLocalized(strval(trans('config.month_and_day')))] | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |         ); | 
					
						
							|  |  |  |         $breadcrumbs->push($title, route('budgets.no-budget', [$moment])); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-02 09:31:57 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-11 14:03:30 +01:00
										 |  |  |     'budgets.show', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('budgets.index'); | 
					
						
							| 
									
										
										
										
											2015-05-26 20:37:01 +02:00
										 |  |  |     $breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id])); | 
					
						
							| 
									
										
										
										
											2017-04-16 12:51:21 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.everything'), route('budgets.show', [$budget->id])); | 
					
						
							| 
									
										
										
										
											2016-12-11 14:03:30 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-30 07:39:42 +01:00
										 |  |  |     'budgets.show.limit', function (BreadCrumbGenerator $breadcrumbs, Budget $budget, BudgetLimit $budgetLimit) { | 
					
						
							| 
									
										
										
										
											2016-12-11 14:03:30 +01:00
										 |  |  |     $breadcrumbs->parent('budgets.index'); | 
					
						
							| 
									
										
										
										
											2016-12-30 07:39:42 +01:00
										 |  |  |     $breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id])); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $title = trans( | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |         'firefly.between_dates_breadcrumb', ['start' => $budgetLimit->start_date->formatLocalized(strval(trans('config.month_and_day'))), | 
					
						
							|  |  |  |                                              'end'   => $budgetLimit->end_date->formatLocalized(strval(trans('config.month_and_day'))),] | 
					
						
							| 
									
										
										
										
											2016-12-30 07:39:42 +01:00
										 |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-11 14:03:30 +01:00
										 |  |  |     $breadcrumbs->push( | 
					
						
							| 
									
										
										
										
											2016-12-30 07:39:42 +01:00
										 |  |  |         $title, route('budgets.show.limit', [$budget->id, $budgetLimit->id]) | 
					
						
							| 
									
										
										
										
											2016-12-11 14:03:30 +01:00
										 |  |  |     ); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * CATEGORIES | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'categories.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.categories'), route('categories.index')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'categories.create', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('categories.index'); | 
					
						
							| 
									
										
										
										
											2015-08-23 07:41:12 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.new_category'), route('categories.create')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'categories.edit', function (BreadCrumbGenerator $breadcrumbs, Category $category) { | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     $breadcrumbs->parent('categories.show', $category, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.edit_category', ['name' => e($category->name)]), route('categories.edit', [$category->id])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'categories.delete', function (BreadCrumbGenerator $breadcrumbs, Category $category) { | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     $breadcrumbs->parent('categories.show', $category, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2015-06-11 18:32:31 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.delete_category', ['name' => e($category->name)]), route('categories.delete', [$category->id])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |     'categories.show', function (BreadCrumbGenerator $breadcrumbs, Category $category, string $moment, Carbon $start, Carbon $end) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-28 09:56:07 +01:00
										 |  |  |     $breadcrumbs->parent('categories.index'); | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |     $breadcrumbs->push($category->name, route('categories.show', [$category->id])); | 
					
						
							| 
									
										
										
										
											2016-12-28 09:56:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |     // push when is all:
 | 
					
						
							|  |  |  |     if ($moment === 'all') { | 
					
						
							|  |  |  |         $breadcrumbs->push(trans('firefly.everything'), route('categories.show', [$category->id, 'all'])); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     // when is specific period or when empty:
 | 
					
						
							|  |  |  |     if ($moment !== 'all' && $moment !== '(nothing)') { | 
					
						
							| 
									
										
										
										
											2017-03-24 15:15:12 +01:00
										 |  |  |         $title = trans( | 
					
						
							|  |  |  |             'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))), | 
					
						
							|  |  |  |                                                  'end'   => $end->formatLocalized(strval(trans('config.month_and_day')))] | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |         ); | 
					
						
							|  |  |  |         $breadcrumbs->push($title, route('categories.show', [$category->id, $moment])); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-12-28 09:56:07 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-09-25 16:33:45 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-02 09:31:57 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-03-10 19:34:46 +01:00
										 |  |  |     'categories.no-category', function (BreadCrumbGenerator $breadcrumbs, string $moment, Carbon $start, Carbon $end) { | 
					
						
							| 
									
										
										
										
											2015-05-02 09:31:57 +02:00
										 |  |  |     $breadcrumbs->parent('categories.index'); | 
					
						
							| 
									
										
										
										
											2017-03-10 19:34:46 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.journals_without_category'), route('categories.no-category')); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // push when is all:
 | 
					
						
							|  |  |  |     if ($moment === 'all') { | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |         $breadcrumbs->push(trans('firefly.everything'), route('categories.no-category', ['all'])); | 
					
						
							| 
									
										
										
										
											2017-03-10 19:34:46 +01:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     // when is specific period or when empty:
 | 
					
						
							|  |  |  |     if ($moment !== 'all' && $moment !== '(nothing)') { | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |         $title = trans( | 
					
						
							|  |  |  |             'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))), | 
					
						
							|  |  |  |                                                  'end'   => $end->formatLocalized(strval(trans('config.month_and_day')))] | 
					
						
							| 
									
										
										
										
											2017-03-10 19:34:46 +01:00
										 |  |  |         ); | 
					
						
							|  |  |  |         $breadcrumbs->push($title, route('categories.no-category', [$moment])); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-02 09:31:57 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-10 19:34:46 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * CURRENCIES | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-05-02 10:40:20 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-05 20:01:01 +01:00
										 |  |  |     'currencies.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-05-02 10:40:20 +02:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2016-12-05 20:01:01 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.currencies'), route('currencies.index')); | 
					
						
							| 
									
										
										
										
											2015-05-02 10:40:20 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-21 15:09:10 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-05 20:01:01 +01:00
										 |  |  |     'currencies.create', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('currencies.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.create_currency'), route('currencies.create')); | 
					
						
							| 
									
										
										
										
											2015-06-21 15:09:10 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-02 10:40:20 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-05 20:01:01 +01:00
										 |  |  |     'currencies.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('currencies.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currencies.edit', [$currency->id])); | 
					
						
							| 
									
										
										
										
											2015-05-02 10:40:20 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-05 20:01:01 +01:00
										 |  |  |     'currencies.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('currencies.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currencies.delete', [$currency->id])); | 
					
						
							| 
									
										
										
										
											2015-05-02 10:40:20 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * EXPORT | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'export.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('home'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.export_data'), route('export.index')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * PIGGY BANKS | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'piggy-banks.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2015-08-23 07:41:12 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.piggyBanks'), route('piggy-banks.index')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'piggy-banks.create', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-24 21:10:25 +01:00
										 |  |  |     $breadcrumbs->parent('piggy-banks.index'); | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.newPiggyBank'), route('piggy-banks.create')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'piggy-banks.edit', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) { | 
					
						
							| 
									
										
										
										
											2015-02-24 21:10:25 +01:00
										 |  |  |     $breadcrumbs->parent('piggy-banks.show', $piggyBank); | 
					
						
							| 
									
										
										
										
											2015-05-26 20:37:01 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.edit_piggyBank', ['name' => e($piggyBank->name)]), route('piggy-banks.edit', [$piggyBank->id])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'piggy-banks.delete', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) { | 
					
						
							| 
									
										
										
										
											2015-02-24 21:10:25 +01:00
										 |  |  |     $breadcrumbs->parent('piggy-banks.show', $piggyBank); | 
					
						
							| 
									
										
										
										
											2015-08-23 07:41:12 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.delete_piggy_bank', ['name' => e($piggyBank->name)]), route('piggy-banks.delete', [$piggyBank->id])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'piggy-banks.show', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) { | 
					
						
							| 
									
										
										
										
											2015-02-24 21:10:25 +01:00
										 |  |  |     $breadcrumbs->parent('piggy-banks.index'); | 
					
						
							| 
									
										
										
										
											2015-05-26 20:37:01 +02:00
										 |  |  |     $breadcrumbs->push(e($piggyBank->name), route('piggy-banks.show', [$piggyBank->id])); | 
					
						
							| 
									
										
										
										
											2016-12-18 17:54:11 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-18 17:54:11 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'piggy-banks.add-money-mobile', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('piggy-banks.show', $piggyBank); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.add_money_to_piggy', ['name' => $piggyBank->name]), route('piggy-banks.add-money-mobile', [$piggyBank->id])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'piggy-banks.remove-money-mobile', function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('piggy-banks.show', $piggyBank); | 
					
						
							|  |  |  |     $breadcrumbs->push( | 
					
						
							|  |  |  |         trans('firefly.remove_money_from_piggy_title', ['name' => $piggyBank->name]), route('piggy-banks.remove-money-mobile', [$piggyBank->id]) | 
					
						
							|  |  |  |     ); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-17 08:35:03 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * IMPORT | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'import.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('home'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.import'), route('import.index')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2017-06-24 06:57:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-04 15:56:14 +02:00
										 |  |  | /** | 
					
						
							|  |  |  |  * FILE IMPORT | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2016-12-17 08:35:03 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-08-04 15:56:14 +02:00
										 |  |  |     'import.file.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2016-12-17 08:35:03 +01:00
										 |  |  |     $breadcrumbs->parent('import.index'); | 
					
						
							| 
									
										
										
										
											2017-08-04 15:56:14 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.import_file'), route('import.file.index')); | 
					
						
							| 
									
										
										
										
											2016-12-17 08:35:03 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2017-08-04 15:56:14 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-17 08:35:03 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-08-04 15:56:14 +02:00
										 |  |  |     'import.file.configure', function (BreadCrumbGenerator $breadcrumbs, ImportJob $job) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('import.file.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.import_config_sub_title', ['key' => $job->key]), route('import.file.configure', [$job->key])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'import.file.status', function (BreadCrumbGenerator $breadcrumbs, ImportJob $job) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('import.file.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.import_status_bread_crumb', ['key' => $job->key]), route('import.file.status', [$job->key])); | 
					
						
							| 
									
										
										
										
											2016-12-17 08:35:03 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * PREFERENCES | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-05 21:58:23 +01:00
										 |  |  |     'preferences.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2016-12-05 21:58:23 +01:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-03 22:02:08 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'preferences.code', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2016-12-05 21:58:23 +01:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index')); | 
					
						
							| 
									
										
										
										
											2016-03-03 22:02:08 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * PROFILE | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-05 21:58:23 +01:00
										 |  |  |     'profile.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2016-12-05 21:58:23 +01:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'profile.change-password', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2016-12-05 21:58:23 +01:00
										 |  |  |     $breadcrumbs->parent('profile.index'); | 
					
						
							| 
									
										
										
										
											2015-07-26 07:41:10 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.changePassword'), route('profile.change-password')); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'profile.delete-account', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2016-12-05 21:58:23 +01:00
										 |  |  |     $breadcrumbs->parent('profile.index'); | 
					
						
							| 
									
										
										
										
											2015-07-26 07:41:10 +02:00
										 |  |  |     $breadcrumbs->push(trans('firefly.delete_account'), route('profile.delete-account')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * REPORTS | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'reports.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.reports'), route('reports.index')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-18 18:16:41 +01:00
										 |  |  |     'reports.report.audit', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) { | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  |     $breadcrumbs->parent('reports.index'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-27 18:31:44 +01:00
										 |  |  |     $monthFormat = (string)trans('config.month_and_day'); | 
					
						
							| 
									
										
										
										
											2016-12-18 18:16:41 +01:00
										 |  |  |     $startString = $start->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $endString   = $end->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $title       = (string)trans('firefly.report_audit', ['start' => $startString, 'end' => $endString]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $breadcrumbs->push($title, route('reports.report.audit', [$accountIds, $start->format('Ymd'), $end->format('Ymd')])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'reports.report.budget', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $budgetIds, Carbon $start, Carbon $end) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('reports.index'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $monthFormat = (string)trans('config.month_and_day'); | 
					
						
							|  |  |  |     $startString = $start->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $endString   = $end->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $title       = (string)trans('firefly.report_budget', ['start' => $startString, 'end' => $endString]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $breadcrumbs->push($title, route('reports.report.budget', [$accountIds, $budgetIds, $start->format('Ymd'), $end->format('Ymd')])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-24 20:01:35 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'reports.report.tag', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $tagTags, Carbon $start, Carbon $end) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('reports.index'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $monthFormat = (string)trans('config.month_and_day'); | 
					
						
							|  |  |  |     $startString = $start->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $endString   = $end->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $title       = (string)trans('firefly.report_tag', ['start' => $startString, 'end' => $endString]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $breadcrumbs->push($title, route('reports.report.tag', [$accountIds, $tagTags, $start->format('Ymd'), $end->format('Ymd')])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-18 18:16:41 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'reports.report.category', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, string $categoryIds, Carbon $start, Carbon $end) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('reports.index'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $monthFormat = (string)trans('config.month_and_day'); | 
					
						
							|  |  |  |     $startString = $start->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $endString   = $end->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $title       = (string)trans('firefly.report_category', ['start' => $startString, 'end' => $endString]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $breadcrumbs->push($title, route('reports.report.category', [$accountIds, $categoryIds, $start->format('Ymd'), $end->format('Ymd')])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'reports.report.default', function (BreadCrumbGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('reports.index'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $monthFormat = (string)trans('config.month_and_day'); | 
					
						
							|  |  |  |     $startString = $start->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $endString   = $end->formatLocalized($monthFormat); | 
					
						
							|  |  |  |     $title       = (string)trans('firefly.report_default', ['start' => $startString, 'end' => $endString]); | 
					
						
							| 
									
										
										
										
											2015-05-15 21:01:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-18 18:16:41 +01:00
										 |  |  |     $breadcrumbs->push($title, route('reports.report.default', [$accountIds, $start->format('Ymd'), $end->format('Ymd')])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-18 17:54:11 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * New user Controller | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'new-user.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('home'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.getting_started'), route('new-user.index')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-11 20:41:43 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Rules | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'rules.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('home'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.rules'), route('rules.index')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-18 19:34:03 +01:00
										 |  |  |     'rules.create', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) { | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->parent('rules.index'); | 
					
						
							| 
									
										
										
										
											2016-12-18 19:34:03 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.make_new_rule', ['title' => $ruleGroup->title]), route('rules.create', [$ruleGroup])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-18 19:34:03 +01:00
										 |  |  |     'rules.edit', function (BreadCrumbGenerator $breadcrumbs, Rule $rule) { | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->parent('rules.index'); | 
					
						
							| 
									
										
										
										
											2016-12-18 19:34:03 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.edit_rule', ['title' => $rule->title]), route('rules.edit', [$rule])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-18 19:34:03 +01:00
										 |  |  |     'rules.delete', function (BreadCrumbGenerator $breadcrumbs, Rule $rule) { | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->parent('rules.index'); | 
					
						
							| 
									
										
										
										
											2016-12-18 19:34:03 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.delete_rule', ['title' => $rule->title]), route('rules.delete', [$rule])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-18 21:04:53 +01:00
										 |  |  |     'rule-groups.create', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->parent('rules.index'); | 
					
						
							| 
									
										
										
										
											2016-12-18 21:04:53 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.make_new_rule_group'), route('rule-groups.create')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-18 21:04:53 +01:00
										 |  |  |     'rule-groups.edit', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) { | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->parent('rules.index'); | 
					
						
							| 
									
										
										
										
											2016-12-18 21:04:53 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.edit_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.edit', [$ruleGroup])); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-18 21:04:53 +01:00
										 |  |  |     'rule-groups.delete', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) { | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->parent('rules.index'); | 
					
						
							| 
									
										
										
										
											2016-12-18 21:04:53 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.delete', [$ruleGroup])); | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-23 16:03:05 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-18 21:04:53 +01:00
										 |  |  |     'rule-groups.select-transactions', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('rules.index'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'rule-groups.select_transactions', function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) { | 
					
						
							| 
									
										
										
										
											2016-02-23 16:03:05 +01:00
										 |  |  |     $breadcrumbs->parent('rules.index'); | 
					
						
							| 
									
										
										
										
											2016-02-23 16:15:53 +01:00
										 |  |  |     $breadcrumbs->push( | 
					
						
							| 
									
										
										
										
											2016-12-18 21:04:53 +01:00
										 |  |  |         trans('firefly.execute_group_on_existing_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select_transactions', [$ruleGroup]) | 
					
						
							| 
									
										
										
										
											2016-02-23 16:15:53 +01:00
										 |  |  |     ); | 
					
						
							| 
									
										
										
										
											2016-02-23 16:03:05 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * SEARCH | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-05 22:19:24 +01:00
										 |  |  |     'search.index', function (BreadCrumbGenerator $breadcrumbs, $query) { | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2017-07-15 17:19:12 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.search_result', ['query' => e($query)]), route('search.index')); | 
					
						
							| 
									
										
										
										
											2015-02-22 09:46:21 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-15 12:26:40 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * TAGS | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'tags.index', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.tags'), route('tags.index')); | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'tags.create', function (BreadCrumbGenerator $breadcrumbs) { | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  |     $breadcrumbs->parent('tags.index'); | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.createTag'), route('tags.create')); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'tags.edit', function (BreadCrumbGenerator $breadcrumbs, Tag $tag) { | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     $breadcrumbs->parent('tags.show', $tag, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2015-05-26 20:37:01 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.edit_tag', ['tag' => e($tag->tag)]), route('tags.edit', [$tag->id])); | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2015-12-28 07:35:09 +01:00
										 |  |  |     'tags.delete', function (BreadCrumbGenerator $breadcrumbs, Tag $tag) { | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     $breadcrumbs->parent('tags.show', $tag, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2015-05-26 20:37:01 +02:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.delete_tag', ['tag' => e($tag->tag)]), route('tags.delete', [$tag->id])); | 
					
						
							| 
									
										
										
										
											2015-05-14 11:17:56 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-04-16 12:51:21 +02:00
										 |  |  |     'tags.show', function (BreadCrumbGenerator $breadcrumbs, Tag $tag, string $moment, Carbon $start, Carbon $end) { | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  |     $breadcrumbs->parent('tags.index'); | 
					
						
							| 
									
										
										
										
											2017-06-05 11:12:50 +02:00
										 |  |  |     $breadcrumbs->push(e($tag->tag), route('tags.show', [$tag->id, $moment])); | 
					
						
							| 
									
										
										
										
											2017-04-16 12:51:21 +02:00
										 |  |  |     if ($moment === 'all') { | 
					
						
							| 
									
										
										
										
											2017-06-05 11:12:50 +02:00
										 |  |  |         $breadcrumbs->push(trans('firefly.everything'), route('tags.show', [$tag->id, $moment])); | 
					
						
							| 
									
										
										
										
											2017-04-16 12:51:21 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     // when is specific period or when empty:
 | 
					
						
							|  |  |  |     if ($moment !== 'all' && $moment !== '(nothing)') { | 
					
						
							| 
									
										
										
										
											2017-04-16 12:51:21 +02:00
										 |  |  |         $title = trans( | 
					
						
							|  |  |  |             'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))), | 
					
						
							|  |  |  |                                                  'end'   => $end->formatLocalized(strval(trans('config.month_and_day')))] | 
					
						
							|  |  |  |         ); | 
					
						
							| 
									
										
										
										
											2017-06-05 11:12:50 +02:00
										 |  |  |         $breadcrumbs->push($title, route('tags.show', [$tag->id, $moment])); | 
					
						
							| 
									
										
										
										
											2017-04-16 12:51:21 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-04-28 08:58:01 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2015-05-05 12:51:57 +02:00
										 |  |  | ); | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * TRANSACTIONS | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |     'transactions.index', function (BreadCrumbGenerator $breadcrumbs, string $what, string $moment = '', Carbon $start, Carbon $end) { | 
					
						
							| 
									
										
										
										
											2016-11-20 12:51:33 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |     $breadcrumbs->parent('home'); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what])); | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |     if ($moment === 'all') { | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |         $breadcrumbs->push(trans('firefly.everything'), route('transactions.index', [$what, 'all'])); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-11-20 12:51:33 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     // when is specific period or when empty:
 | 
					
						
							|  |  |  |     if ($moment !== 'all' && $moment !== '(nothing)') { | 
					
						
							| 
									
										
										
										
											2017-03-24 15:15:12 +01:00
										 |  |  |         $title = trans( | 
					
						
							|  |  |  |             'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))), | 
					
						
							|  |  |  |                                                  'end'   => $end->formatLocalized(strval(trans('config.month_and_day')))] | 
					
						
							| 
									
										
										
										
											2017-03-18 07:46:57 +01:00
										 |  |  |         ); | 
					
						
							| 
									
										
										
										
											2017-03-11 07:41:26 +01:00
										 |  |  |         $breadcrumbs->push($title, route('transactions.index', [$what, $moment])); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-11-20 12:51:33 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'transactions.create', function (BreadCrumbGenerator $breadcrumbs, string $what) { | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.create_' . e($what)), route('transactions.create', [$what])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'transactions.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('transactions.show', $journal); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.edit', [$journal->id])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'transactions.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) { | 
					
						
							|  |  |  |     $breadcrumbs->parent('transactions.show', $journal); | 
					
						
							|  |  |  |     $breadcrumbs->push(trans('breadcrumbs.delete_journal', ['description' => e($journal->description)]), route('transactions.delete', [$journal->id])); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'transactions.show', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-29 15:14:33 +02:00
										 |  |  |     $what = strtolower($journal->transactionType->type); | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  |     $breadcrumbs->push($journal->description, route('transactions.show', [$journal->id])); | 
					
						
							| 
									
										
										
										
											2016-10-29 15:14:33 +02:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'transactions.convert', function (BreadCrumbGenerator $breadcrumbs, TransactionType $destinationType, TransactionJournal $journal) { | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-29 15:14:33 +02:00
										 |  |  |     $breadcrumbs->parent('transactions.show', $journal); | 
					
						
							|  |  |  |     $breadcrumbs->push( | 
					
						
							|  |  |  |         trans('firefly.convert_to_' . $destinationType->type, ['description' => $journal->description]), | 
					
						
							| 
									
										
										
										
											2017-02-15 15:12:46 +01:00
										 |  |  |         route('transactions.convert.index', [strtolower($destinationType->type), $journal->id]) | 
					
						
							| 
									
										
										
										
											2016-10-29 15:14:33 +02:00
										 |  |  |     ); | 
					
						
							| 
									
										
										
										
											2016-02-10 14:36:21 +01:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2016-02-10 16:01:18 +01:00
										 |  |  | ); | 
					
						
							| 
									
										
										
										
											2016-05-15 12:26:40 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-11 10:38:06 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * MASS TRANSACTION EDIT / DELETE | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2017-07-23 19:06:24 +02:00
										 |  |  |     'transactions.mass.edit', function (BreadCrumbGenerator $breadcrumbs, Collection $journals): void { | 
					
						
							| 
									
										
										
										
											2016-12-11 10:38:06 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |     if ($journals->count() > 0) { | 
					
						
							|  |  |  |         $journalIds = $journals->pluck('id')->toArray(); | 
					
						
							|  |  |  |         $what       = strtolower($journals->first()->transactionType->type); | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |         $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |         $breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.edit', $journalIds)); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         return; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-03-05 11:18:34 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-10 16:08:58 +01:00
										 |  |  |     $breadcrumbs->parent('index'); | 
					
						
							| 
									
										
										
										
											2017-07-30 13:42:30 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-23 19:06:24 +02:00
										 |  |  |     return; | 
					
						
							| 
									
										
										
										
											2016-12-11 10:38:06 +01:00
										 |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							|  |  |  |     'transactions.mass.delete', function (BreadCrumbGenerator $breadcrumbs, Collection $journals) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     $journalIds = $journals->pluck('id')->toArray(); | 
					
						
							| 
									
										
										
										
											2016-12-11 14:03:30 +01:00
										 |  |  |     $what       = strtolower($journals->first()->transactionType->type); | 
					
						
							| 
									
										
										
										
											2017-07-02 09:24:11 +02:00
										 |  |  |     $breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon); | 
					
						
							| 
									
										
										
										
											2016-12-11 10:38:06 +01:00
										 |  |  |     $breadcrumbs->push(trans('firefly.mass_edit_journals'), route('transactions.mass.delete', $journalIds)); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-29 15:14:33 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-15 12:26:40 +02:00
										 |  |  | /** | 
					
						
							|  |  |  |  * SPLIT | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | Breadcrumbs::register( | 
					
						
							| 
									
										
										
										
											2016-12-11 11:04:53 +01:00
										 |  |  |     'transactions.split.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionJournal $journal) { | 
					
						
							| 
									
										
										
										
											2016-05-15 12:26:40 +02:00
										 |  |  |     $breadcrumbs->parent('transactions.show', $journal); | 
					
						
							| 
									
										
										
										
											2016-12-11 11:04:53 +01:00
										 |  |  |     $breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.split.edit', [$journal->id])); | 
					
						
							| 
									
										
										
										
											2016-05-15 12:26:40 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2016-08-12 15:10:03 +02:00
										 |  |  | ); |