mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-25 16:31:15 -06:00
Lots of cleanup and stuff.
This commit is contained in:
parent
1a1f127993
commit
40b3097374
@ -41,7 +41,7 @@ class Bill
|
||||
public function getBills()
|
||||
{
|
||||
$this->bills->sortBy(
|
||||
function(BillLine $bill) {
|
||||
function (BillLine $bill) {
|
||||
$active = intval($bill->getBill()->active) == 0 ? 1 : 0;
|
||||
$name = $bill->getBill()->name;
|
||||
|
||||
|
@ -55,7 +55,7 @@ class Category
|
||||
public function getCategories()
|
||||
{
|
||||
$this->categories->sortByDesc(
|
||||
function(CategoryModel $category) {
|
||||
function (CategoryModel $category) {
|
||||
return $category->spent;
|
||||
}
|
||||
);
|
||||
|
@ -67,7 +67,7 @@ class Expense
|
||||
public function getExpenses()
|
||||
{
|
||||
$this->expenses->sortByDesc(
|
||||
function(stdClass $object) {
|
||||
function (stdClass $object) {
|
||||
return $object->amount;
|
||||
}
|
||||
);
|
||||
|
@ -68,7 +68,7 @@ class Income
|
||||
public function getIncomes()
|
||||
{
|
||||
$this->incomes->sortByDesc(
|
||||
function(stdClass $object) {
|
||||
function (stdClass $object) {
|
||||
return $object->amount;
|
||||
}
|
||||
);
|
||||
|
@ -66,7 +66,7 @@ class ReportHelper implements ReportHelperInterface
|
||||
|
||||
// remove cash account, if any:
|
||||
$accounts = $accounts->filter(
|
||||
function(Account $account) {
|
||||
function (Account $account) {
|
||||
if ($account->accountType->type != 'Cash account') {
|
||||
return $account;
|
||||
}
|
||||
|
@ -35,15 +35,15 @@ class ReportQuery implements ReportQueryInterface
|
||||
$query = $this->queryJournalsWithTransactions($start, $end);
|
||||
if ($includeShared === false) {
|
||||
$query->where(
|
||||
function(Builder $query) {
|
||||
function (Builder $query) {
|
||||
$query->where(
|
||||
function(Builder $q) { // only get withdrawals not from a shared account
|
||||
function (Builder $q) { // only get withdrawals not from a shared account
|
||||
$q->where('transaction_types.type', 'Withdrawal');
|
||||
$q->where('acm_from.data', '!=', '"sharedAsset"');
|
||||
}
|
||||
);
|
||||
$query->orWhere(
|
||||
function(Builder $q) { // and transfers from a shared account.
|
||||
function (Builder $q) { // and transfers from a shared account.
|
||||
$q->where('transaction_types.type', 'Transfer');
|
||||
$q->where('acm_to.data', '=', '"sharedAsset"');
|
||||
}
|
||||
@ -61,14 +61,14 @@ class ReportQuery implements ReportQueryInterface
|
||||
);
|
||||
|
||||
$data->each(
|
||||
function(TransactionJournal $journal) {
|
||||
function (TransactionJournal $journal) {
|
||||
if (intval($journal->account_encrypted) == 1) {
|
||||
$journal->name = Crypt::decrypt($journal->name);
|
||||
}
|
||||
}
|
||||
);
|
||||
$data = $data->filter(
|
||||
function(TransactionJournal $journal) {
|
||||
function (TransactionJournal $journal) {
|
||||
if ($journal->amount != 0) {
|
||||
return $journal;
|
||||
}
|
||||
@ -92,26 +92,26 @@ class ReportQuery implements ReportQueryInterface
|
||||
public function getAllAccounts(Carbon $start, Carbon $end, $includeShared = false)
|
||||
{
|
||||
$query = Auth::user()->accounts()->orderBy('accounts.name', 'ASC')
|
||||
->accountTypeIn(['Default account', 'Asset account', 'Cash account']);
|
||||
->accountTypeIn(['Default account', 'Asset account', 'Cash account']);
|
||||
if ($includeShared === false) {
|
||||
$query->leftJoin(
|
||||
'account_meta', function (JoinClause $join) {
|
||||
$join->on('account_meta.account_id', '=', 'accounts.id')->where('account_meta.name', '=', 'accountRole');
|
||||
}
|
||||
)
|
||||
->orderBy('accounts.name', 'ASC')
|
||||
->where(
|
||||
function (Builder $query) {
|
||||
->orderBy('accounts.name', 'ASC')
|
||||
->where(
|
||||
function (Builder $query) {
|
||||
|
||||
$query->where('account_meta.data', '!=', '"sharedAsset"');
|
||||
$query->orWhereNull('account_meta.data');
|
||||
$query->where('account_meta.data', '!=', '"sharedAsset"');
|
||||
$query->orWhereNull('account_meta.data');
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
$set = $query->get(['accounts.*']);
|
||||
$set->each(
|
||||
function(Account $account) use ($start, $end) {
|
||||
function (Account $account) use ($start, $end) {
|
||||
/**
|
||||
* The balance for today always incorporates transactions
|
||||
* made on today. So to get todays "start" balance, we sub one
|
||||
@ -152,15 +152,15 @@ class ReportQuery implements ReportQueryInterface
|
||||
// only get deposits not to a shared account
|
||||
// and transfers to a shared account.
|
||||
$query->where(
|
||||
function(Builder $query) {
|
||||
function (Builder $query) {
|
||||
$query->where(
|
||||
function(Builder $q) {
|
||||
function (Builder $q) {
|
||||
$q->where('transaction_types.type', 'Deposit');
|
||||
$q->where('acm_to.data', '!=', '"sharedAsset"');
|
||||
}
|
||||
);
|
||||
$query->orWhere(
|
||||
function(Builder $q) {
|
||||
function (Builder $q) {
|
||||
$q->where('transaction_types.type', 'Transfer');
|
||||
$q->where('acm_from.data', '=', '"sharedAsset"');
|
||||
}
|
||||
@ -179,14 +179,14 @@ class ReportQuery implements ReportQueryInterface
|
||||
);
|
||||
|
||||
$data->each(
|
||||
function(TransactionJournal $journal) {
|
||||
function (TransactionJournal $journal) {
|
||||
if (intval($journal->account_encrypted) == 1) {
|
||||
$journal->name = Crypt::decrypt($journal->name);
|
||||
}
|
||||
}
|
||||
);
|
||||
$data = $data->filter(
|
||||
function(TransactionJournal $journal) {
|
||||
function (TransactionJournal $journal) {
|
||||
if ($journal->amount != 0) {
|
||||
return $journal;
|
||||
}
|
||||
@ -212,16 +212,16 @@ class ReportQuery implements ReportQueryInterface
|
||||
{
|
||||
|
||||
return floatval(
|
||||
Auth::user()->transactionjournals()
|
||||
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->where('transactions.account_id', $account->id)
|
||||
->before($end)
|
||||
->after($start)
|
||||
->where('budget_transaction_journal.budget_id', $budget->id)
|
||||
->get(['transaction_journals.*'])->sum('amount')
|
||||
) * -1;
|
||||
Auth::user()->transactionjournals()
|
||||
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->where('transactions.account_id', $account->id)
|
||||
->before($end)
|
||||
->after($start)
|
||||
->where('budget_transaction_journal.budget_id', $budget->id)
|
||||
->get(['transaction_journals.*'])->sum('amount')
|
||||
) * -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -260,24 +260,24 @@ class ReportQuery implements ReportQueryInterface
|
||||
$join->on('t_from.transaction_journal_id', '=', 'transaction_journals.id')->where('t_from.amount', '<', 0);
|
||||
}
|
||||
)
|
||||
->leftJoin('accounts as ac_from', 't_from.account_id', '=', 'ac_from.id')
|
||||
->leftJoin(
|
||||
'account_meta as acm_from', function (JoinClause $join) {
|
||||
$join->on('ac_from.id', '=', 'acm_from.account_id')->where('acm_from.name', '=', 'accountRole');
|
||||
}
|
||||
)
|
||||
->leftJoin(
|
||||
'transactions as t_to', function (JoinClause $join) {
|
||||
$join->on('t_to.transaction_journal_id', '=', 'transaction_journals.id')->where('t_to.amount', '>', 0);
|
||||
}
|
||||
)
|
||||
->leftJoin('accounts as ac_to', 't_to.account_id', '=', 'ac_to.id')
|
||||
->leftJoin(
|
||||
'account_meta as acm_to', function (JoinClause $join) {
|
||||
$join->on('ac_to.id', '=', 'acm_to.account_id')->where('acm_to.name', '=', 'accountRole');
|
||||
}
|
||||
)
|
||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id');
|
||||
->leftJoin('accounts as ac_from', 't_from.account_id', '=', 'ac_from.id')
|
||||
->leftJoin(
|
||||
'account_meta as acm_from', function (JoinClause $join) {
|
||||
$join->on('ac_from.id', '=', 'acm_from.account_id')->where('acm_from.name', '=', 'accountRole');
|
||||
}
|
||||
)
|
||||
->leftJoin(
|
||||
'transactions as t_to', function (JoinClause $join) {
|
||||
$join->on('t_to.transaction_journal_id', '=', 'transaction_journals.id')->where('t_to.amount', '>', 0);
|
||||
}
|
||||
)
|
||||
->leftJoin('accounts as ac_to', 't_to.account_id', '=', 'ac_to.id')
|
||||
->leftJoin(
|
||||
'account_meta as acm_to', function (JoinClause $join) {
|
||||
$join->on('ac_to.id', '=', 'acm_to.account_id')->where('acm_to.name', '=', 'accountRole');
|
||||
}
|
||||
)
|
||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id');
|
||||
$query->before($end)->after($start)->where('transaction_journals.user_id', Auth::user()->id);
|
||||
|
||||
return $query;
|
||||
|
@ -156,7 +156,7 @@ class AccountController extends Controller
|
||||
$start = clone Session::get('start', Carbon::now()->startOfMonth());
|
||||
$start->subDay();
|
||||
$accounts->each(
|
||||
function(Account $account) use ($start, $repository) {
|
||||
function (Account $account) use ($start, $repository) {
|
||||
$account->lastActivityDate = $repository->getLastActivity($account);
|
||||
$account->startBalance = Steam::balance($account, $start);
|
||||
$account->endBalance = Steam::balance($account, clone Session::get('end', Carbon::now()->endOfMonth()));
|
||||
@ -201,11 +201,11 @@ class AccountController extends Controller
|
||||
'user' => Auth::user()->id,
|
||||
'accountRole' => $request->input('accountRole'),
|
||||
'openingBalance' => floatval($request->input('openingBalance')),
|
||||
'openingBalanceDate' => new Carbon((string) $request->input('openingBalanceDate')),
|
||||
'openingBalanceDate' => new Carbon((string)$request->input('openingBalanceDate')),
|
||||
'openingBalanceCurrency' => intval($request->input('balance_currency_id')),
|
||||
|
||||
];
|
||||
$account = $repository->store($accountData);
|
||||
$account = $repository->store($accountData);
|
||||
|
||||
Session::flash('success', 'New account "' . $account->name . '" stored!');
|
||||
Preferences::mark();
|
||||
@ -240,7 +240,7 @@ class AccountController extends Controller
|
||||
'accountRole' => $request->input('accountRole'),
|
||||
'virtualBalance' => floatval($request->input('virtualBalance')),
|
||||
'openingBalance' => floatval($request->input('openingBalance')),
|
||||
'openingBalanceDate' => new Carbon((string) $request->input('openingBalanceDate')),
|
||||
'openingBalanceDate' => new Carbon((string)$request->input('openingBalanceDate')),
|
||||
'openingBalanceCurrency' => intval($request->input('balance_currency_id')),
|
||||
'ccType' => $request->input('ccType'),
|
||||
'ccMonthlyPaymentDate' => $request->input('ccMonthlyPaymentDate'),
|
||||
|
@ -95,7 +95,7 @@ class AuthController extends Controller
|
||||
|
||||
// send email.
|
||||
Mail::send(
|
||||
'emails.registered', [], function(Message $message) use ($email) {
|
||||
'emails.registered', [], function (Message $message) use ($email) {
|
||||
$message->to($email, $email)->subject('Welcome to Firefly III!');
|
||||
}
|
||||
);
|
||||
|
@ -112,7 +112,7 @@ class BillController extends Controller
|
||||
{
|
||||
$bills = $repository->getBills();
|
||||
$bills->each(
|
||||
function(Bill $bill) use ($repository) {
|
||||
function (Bill $bill) use ($repository) {
|
||||
$bill->nextExpectedMatch = $repository->nextExpectedMatch($bill);
|
||||
$bill->lastFoundMatch = $repository->lastFoundMatch($bill);
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ class BudgetController extends Controller
|
||||
'name' => $request->input('name'),
|
||||
'user' => Auth::user()->id,
|
||||
];
|
||||
$budget = $repository->store($budgetData);
|
||||
$budget = $repository->store($budgetData);
|
||||
|
||||
Session::flash('success', 'New budget "' . $budget->name . '" stored!');
|
||||
Preferences::mark();
|
||||
|
@ -114,7 +114,7 @@ class CategoryController extends Controller
|
||||
$categories = $repository->getCategories();
|
||||
|
||||
$categories->each(
|
||||
function(Category $category) use ($repository) {
|
||||
function (Category $category) use ($repository) {
|
||||
$category->lastActivity = $repository->getLatestActivity($category);
|
||||
}
|
||||
);
|
||||
@ -167,7 +167,7 @@ class CategoryController extends Controller
|
||||
'name' => $request->input('name'),
|
||||
'user' => Auth::user()->id,
|
||||
];
|
||||
$category = $repository->store($categoryData);
|
||||
$category = $repository->store($categoryData);
|
||||
|
||||
Session::flash('success', 'New category "' . $category->name . '" stored!');
|
||||
Preferences::mark();
|
||||
|
@ -177,9 +177,9 @@ class BudgetController extends Controller
|
||||
$overspent = $expenses > floatval($repetition->amount) ? $expenses - floatval($repetition->amount) : 0;
|
||||
$allEntries->push(
|
||||
[$budget->name . ' (' . $repetition->startdate->formatLocalized($this->monthAndDayFormat) . ')',
|
||||
$left,
|
||||
$spent,
|
||||
$overspent
|
||||
$left,
|
||||
$spent,
|
||||
$overspent
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ class CategoryController extends Controller
|
||||
// sort by callback:
|
||||
uasort(
|
||||
$set,
|
||||
function($left, $right) {
|
||||
function ($left, $right) {
|
||||
if ($left['sum'] == $right['sum']) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -67,8 +67,8 @@ class HomeController extends Controller
|
||||
$start = Session::get('start', Carbon::now()->startOfMonth());
|
||||
$end = Session::get('end', Carbon::now()->endOfMonth());
|
||||
|
||||
$accounts = $repository->getFrontpageAccounts($frontPage);
|
||||
$savings = $repository->getSavingsAccounts();
|
||||
$accounts = $repository->getFrontpageAccounts($frontPage);
|
||||
$savings = $repository->getSavingsAccounts();
|
||||
|
||||
$piggyBankAccounts = $repository->getPiggyBankAccounts();
|
||||
|
||||
@ -83,8 +83,8 @@ class HomeController extends Controller
|
||||
if ($sum != 0) {
|
||||
Session::flash(
|
||||
'error', 'Your transactions are unbalanced. This means a'
|
||||
. ' withdrawal, deposit or transfer was not stored properly. '
|
||||
. 'Please check your accounts and transactions for errors.'
|
||||
. ' withdrawal, deposit or transfer was not stored properly. '
|
||||
. 'Please check your accounts and transactions for errors.'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -96,11 +96,11 @@ class NewUserController extends Controller
|
||||
'openingBalanceDate' => null,
|
||||
'openingBalanceCurrency' => intval($request->input('balance_currency_id')),
|
||||
];
|
||||
$creditCard = $repository->store($creditAccount);
|
||||
$creditCard = $repository->store($creditAccount);
|
||||
|
||||
// store meta for CC:
|
||||
AccountMeta::create(['name' => 'ccType', 'data' => 'monthlyFull', 'account_id' => $creditCard->id, ]);
|
||||
AccountMeta::create(['name' => 'ccMonthlyPaymentDate', 'data' => Carbon::now()->year . '-01-01', 'account_id' => $creditCard->id, ]);
|
||||
AccountMeta::create(['name' => 'ccType', 'data' => 'monthlyFull', 'account_id' => $creditCard->id,]);
|
||||
AccountMeta::create(['name' => 'ccMonthlyPaymentDate', 'data' => Carbon::now()->year . '-01-01', 'account_id' => $creditCard->id,]);
|
||||
|
||||
}
|
||||
Session::flash('success', 'New account(s) created!');
|
||||
|
@ -139,11 +139,11 @@ class PiggyBankController extends Controller
|
||||
$targetDate = $targetDate->format('Y-m-d');
|
||||
}
|
||||
$preFilled = ['name' => $piggyBank->name,
|
||||
'account_id' => $piggyBank->account_id,
|
||||
'targetamount' => $piggyBank->targetamount,
|
||||
'targetdate' => $targetDate,
|
||||
'reminder' => $piggyBank->reminder,
|
||||
'remind_me' => intval($piggyBank->remind_me) == 1 && !is_null($piggyBank->reminder) ? true : false
|
||||
'account_id' => $piggyBank->account_id,
|
||||
'targetamount' => $piggyBank->targetamount,
|
||||
'targetdate' => $targetDate,
|
||||
'reminder' => $piggyBank->reminder,
|
||||
'remind_me' => intval($piggyBank->remind_me) == 1 && !is_null($piggyBank->reminder) ? true : false
|
||||
];
|
||||
Session::flash('preFilled', $preFilled);
|
||||
Session::flash('gaEventCategory', 'piggy-banks');
|
||||
|
@ -80,15 +80,15 @@ class TransactionController extends Controller
|
||||
*/
|
||||
public function delete(TransactionJournal $journal)
|
||||
{
|
||||
$type = strtolower($journal->transactionType->type);
|
||||
$subTitle = trans('firefly.delete_' . $type, ['description' => $journal->description]);
|
||||
$what = strtolower($journal->transactionType->type);
|
||||
$subTitle = trans('firefly.delete_' . $what, ['description' => $journal->description]);
|
||||
|
||||
// put previous url in session
|
||||
Session::put('transactions.delete.url', URL::previous());
|
||||
Session::flash('gaEventCategory', 'transactions');
|
||||
Session::flash('gaEventAction', 'delete-' . $type);
|
||||
Session::flash('gaEventAction', 'delete-' . $what);
|
||||
|
||||
return view('transactions.delete', compact('journal', 'subTitle'));
|
||||
return view('transactions.delete', compact('journal', 'subTitle','what'));
|
||||
|
||||
|
||||
}
|
||||
@ -253,14 +253,15 @@ class TransactionController extends Controller
|
||||
public function show(JournalRepositoryInterface $repository, TransactionJournal $journal)
|
||||
{
|
||||
$journal->transactions->each(
|
||||
function(Transaction $t) use ($journal, $repository) {
|
||||
function (Transaction $t) use ($journal, $repository) {
|
||||
$t->before = $repository->getAmountBefore($journal, $t);
|
||||
$t->after = $t->before + $t->amount;
|
||||
}
|
||||
);
|
||||
$what = strtolower($journal->transactionType->type);
|
||||
$subTitle = trans('firefly.' . $journal->transactionType->type) . ' "' . e($journal->description) . '"';
|
||||
|
||||
return view('transactions.show', compact('journal', 'subTitle'));
|
||||
return view('transactions.show', compact('journal', 'subTitle','what'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -83,7 +83,7 @@ class Reminders
|
||||
// get and list active reminders:
|
||||
$reminders = $user->reminders()->today()->get();
|
||||
$reminders->each(
|
||||
function(Reminder $reminder) use ($helper) {
|
||||
function (Reminder $reminder) use ($helper) {
|
||||
$reminder->description = $helper->getReminderText($reminder);
|
||||
}
|
||||
);
|
||||
|
@ -17,7 +17,7 @@ use FireflyIII\Models\TransactionJournal;
|
||||
*/
|
||||
Breadcrumbs::register(
|
||||
'home',
|
||||
function(Generator $breadcrumbs) {
|
||||
function (Generator $breadcrumbs) {
|
||||
|
||||
$breadcrumbs->push(trans('breadcrumbs.home'), route('index'));
|
||||
}
|
||||
@ -25,7 +25,7 @@ Breadcrumbs::register(
|
||||
|
||||
Breadcrumbs::register(
|
||||
'index',
|
||||
function(Generator $breadcrumbs) {
|
||||
function (Generator $breadcrumbs) {
|
||||
|
||||
$breadcrumbs->push(trans('breadcrumbs.home'), route('index'));
|
||||
}
|
||||
@ -34,21 +34,21 @@ Breadcrumbs::register(
|
||||
|
||||
// accounts
|
||||
Breadcrumbs::register(
|
||||
'accounts.index', function(Generator $breadcrumbs, $what) {
|
||||
'accounts.index', function (Generator $breadcrumbs, $what) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.' . strtolower(e($what)) . '_accounts'), route('accounts.index', [$what]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'accounts.create', function(Generator $breadcrumbs, $what) {
|
||||
'accounts.create', function (Generator $breadcrumbs, $what) {
|
||||
$breadcrumbs->parent('accounts.index', $what);
|
||||
$breadcrumbs->push(trans('breadcrumbs.new_' . strtolower(e($what)) . '_account'), route('accounts.create', [$what]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'accounts.show', function(Generator $breadcrumbs, Account $account) {
|
||||
'accounts.show', function (Generator $breadcrumbs, Account $account) {
|
||||
|
||||
$what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
|
||||
@ -58,7 +58,7 @@ Breadcrumbs::register(
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'accounts.delete', function(Generator $breadcrumbs, Account $account) {
|
||||
'accounts.delete', function (Generator $breadcrumbs, Account $account) {
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_account', ['name' => e($account->name)]), route('accounts.delete', [$account->id]));
|
||||
}
|
||||
@ -66,7 +66,7 @@ Breadcrumbs::register(
|
||||
|
||||
|
||||
Breadcrumbs::register(
|
||||
'accounts.edit', function(Generator $breadcrumbs, Account $account) {
|
||||
'accounts.edit', function (Generator $breadcrumbs, Account $account) {
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
$what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
|
||||
@ -76,40 +76,40 @@ Breadcrumbs::register(
|
||||
|
||||
// budgets.
|
||||
Breadcrumbs::register(
|
||||
'budgets.index', function(Generator $breadcrumbs) {
|
||||
'budgets.index', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.budgets'), route('budgets.index'));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'budgets.create', function(Generator $breadcrumbs) {
|
||||
'budgets.create', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('budgets.index');
|
||||
$breadcrumbs->push(trans('breadcrumbs.newBudget'), route('budgets.create'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'budgets.edit', function(Generator $breadcrumbs, Budget $budget) {
|
||||
'budgets.edit', function (Generator $breadcrumbs, Budget $budget) {
|
||||
$breadcrumbs->parent('budgets.show', $budget);
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_budget', ['name' => e($budget->name)]), route('budgets.edit', [$budget->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'budgets.delete', function(Generator $breadcrumbs, Budget $budget) {
|
||||
'budgets.delete', function (Generator $breadcrumbs, Budget $budget) {
|
||||
$breadcrumbs->parent('budgets.show', $budget);
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_budget', ['name' => e($budget->name)]), route('budgets.delete', [$budget->id]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'budgets.noBudget', function(Generator $breadcrumbs, $subTitle) {
|
||||
'budgets.noBudget', function (Generator $breadcrumbs, $subTitle) {
|
||||
$breadcrumbs->parent('budgets.index');
|
||||
$breadcrumbs->push($subTitle, route('budgets.noBudget'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'budgets.show', function(Generator $breadcrumbs, Budget $budget, LimitRepetition $repetition = null) {
|
||||
'budgets.show', function (Generator $breadcrumbs, Budget $budget, LimitRepetition $repetition = null) {
|
||||
$breadcrumbs->parent('budgets.index');
|
||||
$breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id]));
|
||||
if (!is_null($repetition) && !is_null($repetition->id)) {
|
||||
@ -122,33 +122,33 @@ Breadcrumbs::register(
|
||||
|
||||
// categories
|
||||
Breadcrumbs::register(
|
||||
'categories.index', function(Generator $breadcrumbs) {
|
||||
'categories.index', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.categories'), route('categories.index'));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'categories.create', function(Generator $breadcrumbs) {
|
||||
'categories.create', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('categories.index');
|
||||
$breadcrumbs->push(trans('breadcrumbs.newCategory'), route('categories.create'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'categories.edit', function(Generator $breadcrumbs, Category $category) {
|
||||
'categories.edit', function (Generator $breadcrumbs, Category $category) {
|
||||
$breadcrumbs->parent('categories.show', $category);
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_category', ['name' => e($category->name)]), route('categories.edit', [$category->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'categories.delete', function(Generator $breadcrumbs, Category $category) {
|
||||
'categories.delete', function (Generator $breadcrumbs, Category $category) {
|
||||
$breadcrumbs->parent('categories.show', $category);
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_category', ['name' => e($category->name)]), route('categories.delete', [$category->id]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'categories.show', function(Generator $breadcrumbs, Category $category) {
|
||||
'categories.show', function (Generator $breadcrumbs, Category $category) {
|
||||
$breadcrumbs->parent('categories.index');
|
||||
$breadcrumbs->push(e($category->name), route('categories.show', [$category->id]));
|
||||
|
||||
@ -156,7 +156,7 @@ Breadcrumbs::register(
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'categories.noCategory', function(Generator $breadcrumbs, $subTitle) {
|
||||
'categories.noCategory', function (Generator $breadcrumbs, $subTitle) {
|
||||
$breadcrumbs->parent('categories.index');
|
||||
$breadcrumbs->push($subTitle, route('categories.noCategory'));
|
||||
}
|
||||
@ -164,20 +164,20 @@ Breadcrumbs::register(
|
||||
|
||||
// currencies.
|
||||
Breadcrumbs::register(
|
||||
'currency.index', function(Generator $breadcrumbs) {
|
||||
'currency.index', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.currencies'), route('currency.index'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'currency.edit', function(Generator $breadcrumbs, TransactionCurrency $currency) {
|
||||
'currency.edit', function (Generator $breadcrumbs, TransactionCurrency $currency) {
|
||||
$breadcrumbs->parent('currency.index');
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currency.edit', [$currency->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'currency.delete', function(Generator $breadcrumbs, TransactionCurrency $currency) {
|
||||
'currency.delete', function (Generator $breadcrumbs, TransactionCurrency $currency) {
|
||||
$breadcrumbs->parent('currency.index');
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currency.delete', [$currency->id]));
|
||||
}
|
||||
@ -186,33 +186,33 @@ Breadcrumbs::register(
|
||||
|
||||
// piggy banks
|
||||
Breadcrumbs::register(
|
||||
'piggy-banks.index', function(Generator $breadcrumbs) {
|
||||
'piggy-banks.index', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.piggyBanks'), route('piggy-banks.index'));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'piggy-banks.create', function(Generator $breadcrumbs) {
|
||||
'piggy-banks.create', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('piggy-banks.index');
|
||||
$breadcrumbs->push(trans('breadcrumbs.newPiggyBank'), route('piggy-banks.create'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'piggy-banks.edit', function(Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
'piggy-banks.edit', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_piggyBank', ['name' => e($piggyBank->name)]), route('piggy-banks.edit', [$piggyBank->id]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'piggy-banks.delete', function(Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
'piggy-banks.delete', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_piggyBank', ['name' => e($piggyBank->name)]), route('piggy-banks.delete', [$piggyBank->id]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'piggy-banks.show', function(Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
'piggy-banks.show', function (Generator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
$breadcrumbs->parent('piggy-banks.index');
|
||||
$breadcrumbs->push(e($piggyBank->name), route('piggy-banks.show', [$piggyBank->id]));
|
||||
|
||||
@ -221,7 +221,7 @@ Breadcrumbs::register(
|
||||
|
||||
// preferences
|
||||
Breadcrumbs::register(
|
||||
'preferences', function(Generator $breadcrumbs) {
|
||||
'preferences', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences'));
|
||||
|
||||
@ -230,14 +230,14 @@ Breadcrumbs::register(
|
||||
|
||||
// profile
|
||||
Breadcrumbs::register(
|
||||
'profile', function(Generator $breadcrumbs) {
|
||||
'profile', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.profile'), route('profile'));
|
||||
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'change-password', function(Generator $breadcrumbs) {
|
||||
'change-password', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('profile');
|
||||
$breadcrumbs->push(trans('breadcrumbs.changePassword'), route('change-password'));
|
||||
|
||||
@ -246,33 +246,33 @@ Breadcrumbs::register(
|
||||
|
||||
// bills
|
||||
Breadcrumbs::register(
|
||||
'bills.index', function(Generator $breadcrumbs) {
|
||||
'bills.index', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.bills'), route('bills.index'));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'bills.create', function(Generator $breadcrumbs) {
|
||||
'bills.create', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('bills.index');
|
||||
$breadcrumbs->push(trans('breadcrumbs.newBill'), route('bills.create'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'bills.edit', function(Generator $breadcrumbs, Bill $bill) {
|
||||
'bills.edit', function (Generator $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(Generator $breadcrumbs, Bill $bill) {
|
||||
'bills.delete', function (Generator $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(Generator $breadcrumbs, Bill $bill) {
|
||||
'bills.show', function (Generator $breadcrumbs, Bill $bill) {
|
||||
$breadcrumbs->parent('bills.index');
|
||||
$breadcrumbs->push(e($bill->name), route('bills.show', [$bill->id]));
|
||||
|
||||
@ -281,7 +281,7 @@ Breadcrumbs::register(
|
||||
|
||||
// reminders
|
||||
Breadcrumbs::register(
|
||||
'reminders.index', function(Generator $breadcrumbs) {
|
||||
'reminders.index', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.reminders'), route('reminders.index'));
|
||||
|
||||
@ -290,7 +290,7 @@ Breadcrumbs::register(
|
||||
|
||||
// reminders
|
||||
Breadcrumbs::register(
|
||||
'reminders.show', function(Generator $breadcrumbs, Reminder $reminder) {
|
||||
'reminders.show', function (Generator $breadcrumbs, Reminder $reminder) {
|
||||
$breadcrumbs->parent('reminders.index');
|
||||
$breadcrumbs->push(trans('breadcrumbs.reminder', ['id' => e($reminder->id)]), route('reminders.show', [$reminder->id]));
|
||||
|
||||
@ -300,14 +300,14 @@ Breadcrumbs::register(
|
||||
|
||||
// reports
|
||||
Breadcrumbs::register(
|
||||
'reports.index', function(Generator $breadcrumbs) {
|
||||
'reports.index', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.reports'), route('reports.index'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'reports.year', function(Generator $breadcrumbs, Carbon $date, $shared) {
|
||||
'reports.year', function (Generator $breadcrumbs, Carbon $date, $shared) {
|
||||
$breadcrumbs->parent('reports.index');
|
||||
if ($shared) {
|
||||
$title = trans('breadcrumbs.yearly_report_shared', ['date' => $date->year]);
|
||||
@ -319,7 +319,7 @@ Breadcrumbs::register(
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'reports.month', function(Generator $breadcrumbs, Carbon $date, $shared) {
|
||||
'reports.month', function (Generator $breadcrumbs, Carbon $date, $shared) {
|
||||
$breadcrumbs->parent('reports.year', $date, $shared);
|
||||
|
||||
if ($shared) {
|
||||
@ -334,7 +334,7 @@ Breadcrumbs::register(
|
||||
|
||||
// search
|
||||
Breadcrumbs::register(
|
||||
'search', function(Generator $breadcrumbs, $query) {
|
||||
'search', function (Generator $breadcrumbs, $query) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.searchResult', ['query' => e($query)]), route('search'));
|
||||
}
|
||||
@ -342,33 +342,33 @@ Breadcrumbs::register(
|
||||
|
||||
// transactions
|
||||
Breadcrumbs::register(
|
||||
'transactions.index', function(Generator $breadcrumbs, $what) {
|
||||
'transactions.index', function (Generator $breadcrumbs, $what) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what]));
|
||||
}
|
||||
);
|
||||
Breadcrumbs::register(
|
||||
'transactions.create', function(Generator $breadcrumbs, $what) {
|
||||
'transactions.create', function (Generator $breadcrumbs, $what) {
|
||||
$breadcrumbs->parent('transactions.index', $what);
|
||||
$breadcrumbs->push(trans('breadcrumbs.create_' . e($what)), route('transactions.create', [$what]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'transactions.edit', function(Generator $breadcrumbs, TransactionJournal $journal) {
|
||||
'transactions.edit', function (Generator $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(Generator $breadcrumbs, TransactionJournal $journal) {
|
||||
'transactions.delete', function (Generator $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(Generator $breadcrumbs, TransactionJournal $journal) {
|
||||
'transactions.show', function (Generator $breadcrumbs, TransactionJournal $journal) {
|
||||
|
||||
$breadcrumbs->parent('transactions.index', strtolower($journal->transactionType->type));
|
||||
$breadcrumbs->push($journal->description, route('transactions.show', [$journal->id]));
|
||||
@ -378,28 +378,28 @@ Breadcrumbs::register(
|
||||
|
||||
// tags
|
||||
Breadcrumbs::register(
|
||||
'tags.index', function(Generator $breadcrumbs) {
|
||||
'tags.index', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('home');
|
||||
$breadcrumbs->push(trans('breadcrumbs.tags'), route('tags.index'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'tags.create', function(Generator $breadcrumbs) {
|
||||
'tags.create', function (Generator $breadcrumbs) {
|
||||
$breadcrumbs->parent('tags.index');
|
||||
$breadcrumbs->push(trans('breadcrumbs.createTag'), route('tags.create'));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'tags.edit', function(Generator $breadcrumbs, Tag $tag) {
|
||||
'tags.edit', function (Generator $breadcrumbs, Tag $tag) {
|
||||
$breadcrumbs->parent('tags.show', $tag);
|
||||
$breadcrumbs->push(trans('breadcrumbs.edit_tag', ['tag' => e($tag->tag)]), route('tags.edit', [$tag->id]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'tags.delete', function(Generator $breadcrumbs, Tag $tag) {
|
||||
'tags.delete', function (Generator $breadcrumbs, Tag $tag) {
|
||||
$breadcrumbs->parent('tags.show', $tag);
|
||||
$breadcrumbs->push(trans('breadcrumbs.delete_tag', ['tag' => e($tag->tag)]), route('tags.delete', [$tag->id]));
|
||||
}
|
||||
@ -407,7 +407,7 @@ Breadcrumbs::register(
|
||||
|
||||
|
||||
Breadcrumbs::register(
|
||||
'tags.show', function(Generator $breadcrumbs, Tag $tag) {
|
||||
'tags.show', function (Generator $breadcrumbs, Tag $tag) {
|
||||
$breadcrumbs->parent('tags.index');
|
||||
$breadcrumbs->push(e($tag->tag), route('tags.show', [$tag->id]));
|
||||
}
|
||||
|
@ -15,13 +15,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
// models
|
||||
Route::bind(
|
||||
'account',
|
||||
function($value) {
|
||||
function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = Account::leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||
->where('account_types.editable', 1)
|
||||
->where('accounts.id', $value)
|
||||
->where('user_id', Auth::user()->id)
|
||||
->first(['accounts.*']);
|
||||
->where('account_types.editable', 1)
|
||||
->where('accounts.id', $value)
|
||||
->where('user_id', Auth::user()->id)
|
||||
->first(['accounts.*']);
|
||||
if ($object) {
|
||||
return $object;
|
||||
}
|
||||
@ -31,7 +31,7 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'tj', function($value) {
|
||||
'tj', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = TransactionJournal::where('id', $value)->where('user_id', Auth::user()->id)->first();
|
||||
if ($object) {
|
||||
@ -44,7 +44,7 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'currency', function($value) {
|
||||
'currency', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = TransactionCurrency::find($value);
|
||||
if ($object) {
|
||||
@ -56,7 +56,7 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'bill', function($value) {
|
||||
'bill', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = Bill::where('id', $value)->where('user_id', Auth::user()->id)->first();
|
||||
if ($object) {
|
||||
@ -69,7 +69,7 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'budget', function($value) {
|
||||
'budget', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = Budget::where('id', $value)->where('user_id', Auth::user()->id)->first();
|
||||
if ($object) {
|
||||
@ -82,7 +82,7 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'reminder', function($value) {
|
||||
'reminder', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = Reminder::where('id', $value)->where('user_id', Auth::user()->id)->first();
|
||||
if ($object) {
|
||||
@ -95,13 +95,13 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'limitrepetition', function($value) {
|
||||
'limitrepetition', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = LimitRepetition::where('limit_repetitions.id', $value)
|
||||
->leftjoin('budget_limits', 'budget_limits.id', '=', 'limit_repetitions.budget_limit_id')
|
||||
->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
||||
->where('budgets.user_id', Auth::user()->id)
|
||||
->first(['limit_repetitions.*']);
|
||||
->leftjoin('budget_limits', 'budget_limits.id', '=', 'limit_repetitions.budget_limit_id')
|
||||
->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
||||
->where('budgets.user_id', Auth::user()->id)
|
||||
->first(['limit_repetitions.*']);
|
||||
if ($object) {
|
||||
return $object;
|
||||
}
|
||||
@ -112,12 +112,12 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'piggyBank', function($value) {
|
||||
'piggyBank', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = PiggyBank::where('piggy_banks.id', $value)
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id')
|
||||
->where('accounts.user_id', Auth::user()->id)
|
||||
->first(['piggy_banks.*']);
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id')
|
||||
->where('accounts.user_id', Auth::user()->id)
|
||||
->first(['piggy_banks.*']);
|
||||
if ($object) {
|
||||
return $object;
|
||||
}
|
||||
@ -128,7 +128,7 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'category', function($value) {
|
||||
'category', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = Category::where('id', $value)->where('user_id', Auth::user()->id)->first();
|
||||
if ($object) {
|
||||
@ -142,7 +142,7 @@ Route::bind(
|
||||
|
||||
/** @noinspection PhpUnusedParameterInspection */
|
||||
Route::bind(
|
||||
'reminder', function($value) {
|
||||
'reminder', function ($value) {
|
||||
if (Auth::check()) {
|
||||
/** @var \FireflyIII\Models\Reminder $object */
|
||||
$object = Reminder::find($value);
|
||||
@ -158,7 +158,7 @@ Route::bind(
|
||||
);
|
||||
|
||||
Route::bind(
|
||||
'tag', function($value) {
|
||||
'tag', function ($value) {
|
||||
if (Auth::check()) {
|
||||
$object = Tag::where('id', $value)->where('user_id', Auth::user()->id)->first();
|
||||
if ($object) {
|
||||
@ -187,7 +187,7 @@ Route::controllers(
|
||||
* Home Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => ['auth', 'range', 'reminders']], function() {
|
||||
['middleware' => ['auth', 'range', 'reminders']], function () {
|
||||
Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index']);
|
||||
Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']);
|
||||
Route::post('/daterange', ['uses' => 'HomeController@dateRange', 'as' => 'daterange']);
|
||||
|
@ -46,7 +46,7 @@ use Watson\Validating\ValidatingTrait;
|
||||
* @property mixed lastActivityDate
|
||||
* @property mixed piggyBalance
|
||||
* @property mixed difference
|
||||
* @property mixed percentage
|
||||
* @property mixed percentage
|
||||
*/
|
||||
class Account extends Model
|
||||
{
|
||||
@ -215,7 +215,7 @@ class Account extends Model
|
||||
{
|
||||
$joinName = str_replace('.', '_', $name);
|
||||
$query->leftJoin(
|
||||
'account_meta as ' . $joinName, function(JoinClause $join) use ($joinName, $name) {
|
||||
'account_meta as ' . $joinName, function (JoinClause $join) use ($joinName, $name) {
|
||||
$join->on($joinName . '.account_id', '=', 'accounts.id')->where($joinName . '.name', '=', $name);
|
||||
}
|
||||
);
|
||||
|
@ -6,7 +6,7 @@ use Watson\Validating\ValidatingTrait;
|
||||
/**
|
||||
* Class AccountMeta
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
@ -33,7 +33,7 @@ class AccountMeta extends Model
|
||||
'name' => 'required|between:1,100',
|
||||
'data' => 'required'
|
||||
];
|
||||
protected $table = 'account_meta';
|
||||
protected $table = 'account_meta';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -5,7 +5,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class AccountType
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* FireflyIII\Models\Bill
|
||||
*
|
||||
* @codeCoverageIgnore Class Bill
|
||||
* @package FireflyIII\Models
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
@ -51,12 +51,11 @@ class Bill extends Model
|
||||
{
|
||||
|
||||
protected $fillable
|
||||
= ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip', 'automatch', 'active', ];
|
||||
= ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip', 'automatch', 'active',];
|
||||
|
||||
protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted'];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
/**
|
||||
* Class Budget
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -5,7 +5,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class BudgetLimit
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
/**
|
||||
* Class Component
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -5,7 +5,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class LimitRepetition
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -8,10 +8,10 @@ use Zizaco\Entrust\EntrustPermission;
|
||||
* Class Permission
|
||||
*
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $display_name
|
||||
* @property string $description
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $display_name
|
||||
* @property string $description
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Config::get('entrust.role')[] $roles
|
||||
|
@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
/**
|
||||
* Class PiggyBank
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
@ -50,7 +50,7 @@ class PiggyBank extends Model
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable
|
||||
= ['name', 'account_id', 'order', 'reminder_skip', 'targetamount', 'startdate', 'targetdate', 'reminder', 'remind_me'];
|
||||
= ['name', 'account_id', 'order', 'reminder_skip', 'targetamount', 'startdate', 'targetdate', 'reminder', 'remind_me'];
|
||||
protected $hidden = ['targetamount_encrypted', 'encrypted'];
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class PiggyBankEvent
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class PiggyBankRepetition
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
@ -77,13 +77,13 @@ class PiggyBankRepetition extends Model
|
||||
$q->orWhereNull('startdate');
|
||||
}
|
||||
)
|
||||
->where(
|
||||
function (EloquentBuilder $q) use ($date) {
|
||||
->where(
|
||||
function (EloquentBuilder $q) use ($date) {
|
||||
|
||||
$q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00'));
|
||||
$q->orWhereNull('targetdate');
|
||||
}
|
||||
);
|
||||
$q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00'));
|
||||
$q->orWhereNull('targetdate');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class Preference
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class Reminder
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
@ -44,7 +44,7 @@ class Reminder extends Model
|
||||
{
|
||||
|
||||
|
||||
protected $fillable = ['user_id', 'startdate', 'metadata', 'enddate', 'active', 'notnow', 'remindersable_id', 'remindersable_type', ];
|
||||
protected $fillable = ['user_id', 'startdate', 'metadata', 'enddate', 'active', 'notnow', 'remindersable_id', 'remindersable_type',];
|
||||
protected $hidden = ['encrypted'];
|
||||
|
||||
/**
|
||||
@ -124,7 +124,7 @@ class Reminder extends Model
|
||||
$today = new Carbon;
|
||||
|
||||
return $query->where('startdate', '<=', $today->format('Y-m-d 00:00:00'))->where('enddate', '>=', $today->format('Y-m-d 00:00:00'))->where('active', 1)
|
||||
->where('notnow', 0);
|
||||
->where('notnow', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,10 +8,10 @@ use Zizaco\Entrust\EntrustRole;
|
||||
* Class Role
|
||||
*
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $display_name
|
||||
* @property string $description
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $display_name
|
||||
* @property string $description
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Config::get('auth.model')[] $users
|
||||
|
@ -9,7 +9,7 @@ use Watson\Validating\ValidatingTrait;
|
||||
/**
|
||||
* Class Transaction
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
/**
|
||||
* Class TransactionCurrency
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
/**
|
||||
* Class TransactionGroup
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Log;
|
||||
use Watson\Validating\ValidatingTrait;
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class TransactionRelation
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
*/
|
||||
class TransactionRelation extends Model
|
||||
|
@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
/**
|
||||
* Class TransactionType
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Models
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -23,7 +23,7 @@ class BusServiceProvider extends ServiceProvider
|
||||
public function boot(Dispatcher $dispatcher)
|
||||
{
|
||||
$dispatcher->mapUsing(
|
||||
function($command) {
|
||||
function ($command) {
|
||||
return Dispatcher::simpleMapping(
|
||||
$command, 'FireflyIII\Commands', 'FireflyIII\Handlers\Commands'
|
||||
);
|
||||
|
@ -52,15 +52,15 @@ class EventServiceProvider extends ServiceProvider
|
||||
$this->registerDeleteEvents();
|
||||
$this->registerCreateEvents();
|
||||
BudgetLimit::saved(
|
||||
function(BudgetLimit $budgetLimit) {
|
||||
function (BudgetLimit $budgetLimit) {
|
||||
Log::debug('Saved!');
|
||||
|
||||
$end = Navigation::addPeriod(clone $budgetLimit->startdate, $budgetLimit->repeat_freq, 0);
|
||||
$end->subDay();
|
||||
$set = $budgetLimit->limitrepetitions()
|
||||
->where('startdate', $budgetLimit->startdate->format('Y-m-d 00:00:00'))
|
||||
->where('enddate', $end->format('Y-m-d 00:00:00'))
|
||||
->get();
|
||||
->where('startdate', $budgetLimit->startdate->format('Y-m-d 00:00:00'))
|
||||
->where('enddate', $end->format('Y-m-d 00:00:00'))
|
||||
->get();
|
||||
if ($set->count() == 0) {
|
||||
$repetition = new LimitRepetition;
|
||||
$repetition->startdate = $budgetLimit->startdate;
|
||||
@ -71,7 +71,7 @@ class EventServiceProvider extends ServiceProvider
|
||||
try {
|
||||
$repetition->save();
|
||||
} catch (QueryException $e) {
|
||||
Log::error('Trying to save new LimitRepetition failed: '.$e->getMessage()); // @codeCoverageIgnore
|
||||
Log::error('Trying to save new LimitRepetition failed: ' . $e->getMessage()); // @codeCoverageIgnore
|
||||
}
|
||||
} else {
|
||||
if ($set->count() == 1) {
|
||||
@ -93,7 +93,7 @@ class EventServiceProvider extends ServiceProvider
|
||||
protected function registerDeleteEvents()
|
||||
{
|
||||
TransactionJournal::deleted(
|
||||
function(TransactionJournal $journal) {
|
||||
function (TransactionJournal $journal) {
|
||||
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($journal->transactions()->get() as $transaction) {
|
||||
@ -102,7 +102,7 @@ class EventServiceProvider extends ServiceProvider
|
||||
}
|
||||
);
|
||||
PiggyBank::deleting(
|
||||
function(PiggyBank $piggyBank) {
|
||||
function (PiggyBank $piggyBank) {
|
||||
$reminders = $piggyBank->reminders()->get();
|
||||
/** @var Reminder $reminder */
|
||||
foreach ($reminders as $reminder) {
|
||||
@ -112,7 +112,7 @@ class EventServiceProvider extends ServiceProvider
|
||||
);
|
||||
|
||||
Account::deleted(
|
||||
function(Account $account) {
|
||||
function (Account $account) {
|
||||
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($account->transactions()->get() as $transaction) {
|
||||
@ -133,7 +133,7 @@ class EventServiceProvider extends ServiceProvider
|
||||
// move this routine to a filter
|
||||
// in case of repeated piggy banks and/or other problems.
|
||||
PiggyBank::created(
|
||||
function(PiggyBank $piggyBank) {
|
||||
function (PiggyBank $piggyBank) {
|
||||
$repetition = new PiggyBankRepetition;
|
||||
$repetition->piggyBank()->associate($piggyBank);
|
||||
$repetition->startdate = is_null($piggyBank->startdate) ? null : $piggyBank->startdate;
|
||||
|
@ -30,7 +30,7 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
public function boot()
|
||||
{
|
||||
Validator::resolver(
|
||||
function($translator, $data, $rules, $messages) {
|
||||
function ($translator, $data, $rules, $messages) {
|
||||
return new FireflyValidator($translator, $data, $rules, $messages);
|
||||
}
|
||||
);
|
||||
@ -55,28 +55,28 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
|
||||
|
||||
$this->app->bind(
|
||||
'preferences', function() {
|
||||
'preferences', function () {
|
||||
return new Preferences;
|
||||
}
|
||||
);
|
||||
$this->app->bind(
|
||||
'navigation', function() {
|
||||
'navigation', function () {
|
||||
return new Navigation;
|
||||
}
|
||||
);
|
||||
$this->app->bind(
|
||||
'amount', function() {
|
||||
'amount', function () {
|
||||
return new Amount;
|
||||
}
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'steam', function() {
|
||||
'steam', function () {
|
||||
return new Steam;
|
||||
}
|
||||
);
|
||||
$this->app->bind(
|
||||
'expandedform', function() {
|
||||
'expandedform', function () {
|
||||
return new ExpandedForm;
|
||||
}
|
||||
);
|
||||
|
@ -44,7 +44,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
public function map(Router $router)
|
||||
{
|
||||
$router->group(
|
||||
['namespace' => $this->namespace], function($router) {
|
||||
['namespace' => $this->namespace], function ($router) {
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
require app_path('Http/routes.php');
|
||||
}
|
||||
|
@ -7,8 +7,9 @@ use Carbon\Carbon;
|
||||
use Crypt;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
use FireflyIII\Repositories\Shared\ComponentRepository;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class CategoryRepository
|
||||
*
|
||||
@ -48,7 +49,7 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
|
||||
/** @var Collection $set */
|
||||
$set = Auth::user()->categories()->orderBy('name', 'ASC')->get();
|
||||
$set->sortBy(
|
||||
function(Category $category) {
|
||||
function (Category $category) {
|
||||
return $category->name;
|
||||
}
|
||||
);
|
||||
@ -66,15 +67,15 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
|
||||
public function getCategoriesAndExpensesCorrected($start, $end)
|
||||
{
|
||||
$set = Auth::user()->transactionjournals()
|
||||
->leftJoin(
|
||||
'category_transaction_journal', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id'
|
||||
)
|
||||
->leftJoin('categories', 'categories.id', '=', 'category_transaction_journal.category_id')
|
||||
->before($end)
|
||||
->where('categories.user_id', Auth::user()->id)
|
||||
->after($start)
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->get(['categories.id as category_id', 'categories.encrypted as category_encrypted', 'categories.name', 'transaction_journals.*']);
|
||||
->leftJoin(
|
||||
'category_transaction_journal', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id'
|
||||
)
|
||||
->leftJoin('categories', 'categories.id', '=', 'category_transaction_journal.category_id')
|
||||
->before($end)
|
||||
->where('categories.user_id', Auth::user()->id)
|
||||
->after($start)
|
||||
->transactionTypes(['Withdrawal'])
|
||||
->get(['categories.id as category_id', 'categories.encrypted as category_encrypted', 'categories.name', 'transaction_journals.*']);
|
||||
|
||||
$result = [];
|
||||
foreach ($set as $entry) {
|
||||
@ -142,10 +143,10 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
|
||||
public function getLatestActivity(Category $category)
|
||||
{
|
||||
$latest = $category->transactionjournals()
|
||||
->orderBy('transaction_journals.date', 'DESC')
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->first();
|
||||
->orderBy('transaction_journals.date', 'DESC')
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->first();
|
||||
if ($latest) {
|
||||
return $latest->date;
|
||||
}
|
||||
@ -162,15 +163,15 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
|
||||
public function getWithoutCategory(Carbon $start, Carbon $end)
|
||||
{
|
||||
return Auth::user()
|
||||
->transactionjournals()
|
||||
->leftJoin('category_transaction_journal', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->whereNull('category_transaction_journal.id')
|
||||
->before($end)
|
||||
->after($start)
|
||||
->orderBy('transaction_journals.date', 'DESC')
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->get(['transaction_journals.*']);
|
||||
->transactionjournals()
|
||||
->leftJoin('category_transaction_journal', 'category_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->whereNull('category_transaction_journal.id')
|
||||
->before($end)
|
||||
->after($start)
|
||||
->orderBy('transaction_journals.date', 'DESC')
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->get(['transaction_journals.*']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -106,7 +106,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*/
|
||||
public function getJournalsOfTypes(array $types, $offset, $page)
|
||||
{
|
||||
$set = Auth::user()->transactionJournals()->transactionTypes($types)->withRelevantData()->take(50)->offset($offset)
|
||||
$set = Auth::user()->transactionJournals()->transactionTypes($types)->withRelevantData()->take(50)->offset($offset)
|
||||
->orderBy('date', 'DESC')
|
||||
->orderBy('order', 'ASC')
|
||||
->orderBy('id', 'DESC')
|
||||
|
@ -102,7 +102,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
public function setOrder($id, $order)
|
||||
{
|
||||
$piggyBank = PiggyBank::leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id')->where('accounts.user_id', Auth::user()->id)
|
||||
->where('piggy_banks.id', $id)->first(['piggy_banks.*']);
|
||||
->where('piggy_banks.id', $id)->first(['piggy_banks.*']);
|
||||
if ($piggyBank) {
|
||||
$piggyBank->order = $order;
|
||||
$piggyBank->save();
|
||||
|
@ -36,14 +36,14 @@ class ReminderRepository implements ReminderRepositoryInterface
|
||||
$today = new Carbon;
|
||||
// active reminders:
|
||||
$active = Auth::user()->reminders()
|
||||
->where('notnow', 0)
|
||||
->where('active', 1)
|
||||
->where('startdate', '<=', $today->format('Y-m-d 00:00:00'))
|
||||
->where('enddate', '>=', $today->format('Y-m-d 00:00:00'))
|
||||
->get();
|
||||
->where('notnow', 0)
|
||||
->where('active', 1)
|
||||
->where('startdate', '<=', $today->format('Y-m-d 00:00:00'))
|
||||
->where('enddate', '>=', $today->format('Y-m-d 00:00:00'))
|
||||
->get();
|
||||
|
||||
$active->each(
|
||||
function(Reminder $reminder) {
|
||||
function (Reminder $reminder) {
|
||||
$reminder->description = $this->helper->getReminderText($reminder);
|
||||
}
|
||||
);
|
||||
@ -58,11 +58,11 @@ class ReminderRepository implements ReminderRepositoryInterface
|
||||
public function getDismissedReminders()
|
||||
{
|
||||
$dismissed = Auth::user()->reminders()
|
||||
->where('notnow', 1)
|
||||
->get();
|
||||
->where('notnow', 1)
|
||||
->get();
|
||||
|
||||
$dismissed->each(
|
||||
function(Reminder $reminder) {
|
||||
function (Reminder $reminder) {
|
||||
$reminder->description = $this->helper->getReminderText($reminder);
|
||||
}
|
||||
);
|
||||
@ -77,18 +77,18 @@ class ReminderRepository implements ReminderRepositoryInterface
|
||||
{
|
||||
|
||||
$expired = Auth::user()->reminders()
|
||||
->where('notnow', 0)
|
||||
->where('active', 1)
|
||||
->where(
|
||||
function (Builder $q) {
|
||||
$today = new Carbon;
|
||||
$q->where('startdate', '>', $today->format('Y-m-d 00:00:00'));
|
||||
$q->orWhere('enddate', '<', $today->format('Y-m-d 00:00:00'));
|
||||
}
|
||||
)->get();
|
||||
->where('notnow', 0)
|
||||
->where('active', 1)
|
||||
->where(
|
||||
function (Builder $q) {
|
||||
$today = new Carbon;
|
||||
$q->where('startdate', '>', $today->format('Y-m-d 00:00:00'));
|
||||
$q->orWhere('enddate', '<', $today->format('Y-m-d 00:00:00'));
|
||||
}
|
||||
)->get();
|
||||
|
||||
$expired->each(
|
||||
function(Reminder $reminder) {
|
||||
function (Reminder $reminder) {
|
||||
$reminder->description = $this->helper->getReminderText($reminder);
|
||||
}
|
||||
);
|
||||
@ -106,7 +106,7 @@ class ReminderRepository implements ReminderRepositoryInterface
|
||||
->get();
|
||||
|
||||
$inactive->each(
|
||||
function(Reminder $reminder) {
|
||||
function (Reminder $reminder) {
|
||||
$reminder->description = $this->helper->getReminderText($reminder);
|
||||
}
|
||||
);
|
||||
|
@ -36,7 +36,7 @@ class ComponentRepository
|
||||
$cache->addProperty($shared);
|
||||
$cache->addProperty('spentInPeriod');
|
||||
|
||||
if($cache->has()) {
|
||||
if ($cache->has()) {
|
||||
return $cache->get(); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
/** @var Collection $tags */
|
||||
$tags = Auth::user()->tags()->get();
|
||||
$tags->sortBy(
|
||||
function(Tag $tag) {
|
||||
function (Tag $tag) {
|
||||
return $tag->tag;
|
||||
}
|
||||
);
|
||||
@ -204,6 +204,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -289,6 +290,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
// tag is attached just like that:
|
||||
if ($withdrawals < 1 && $deposits < 1) {
|
||||
$journal->tags()->save($tag);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,9 @@ class Registrar implements RegistrarContract
|
||||
{
|
||||
return Validator::make(
|
||||
$data, [
|
||||
'email' => 'required|email|max:255|unique:users',
|
||||
'password' => 'required|confirmed|min:6',
|
||||
]
|
||||
'email' => 'required|email|max:255|unique:users',
|
||||
'password' => 'required|confirmed|min:6',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,6 @@ use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
|
||||
use Illuminate\Support\Collection;
|
||||
use Preferences as Prefs;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class CacheProperties
|
||||
@ -63,7 +62,7 @@ class CacheProperties
|
||||
*/
|
||||
public function has()
|
||||
{
|
||||
if(getenv('APP_ENV') == 'testing') {
|
||||
if (getenv('APP_ENV') == 'testing') {
|
||||
return false;
|
||||
}
|
||||
$this->md5();
|
||||
|
@ -41,7 +41,7 @@ class Navigation
|
||||
'6M' => 6,
|
||||
'half-year' => 6,
|
||||
];
|
||||
$specialMap = ['1M', 'month', 'monthly'];
|
||||
|
||||
if (!isset($functionMap[$repeatFreq])) {
|
||||
throw new FireflyException('Cannot do addPeriod for $repeat_freq "' . $repeatFreq . '"');
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class Preferences
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $default
|
||||
* @param string $default
|
||||
*
|
||||
* @return null|\FireflyIII\Models\Preference
|
||||
*/
|
||||
@ -54,7 +54,7 @@ class Preferences
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param $name
|
||||
* @param string $value
|
||||
*
|
||||
* @return Preference
|
||||
|
@ -25,7 +25,7 @@ class Search implements SearchInterface
|
||||
public function searchAccounts(array $words)
|
||||
{
|
||||
return Auth::user()->accounts()->with('accounttype')->where(
|
||||
function(EloquentBuilder $q) use ($words) {
|
||||
function (EloquentBuilder $q) use ($words) {
|
||||
foreach ($words as $word) {
|
||||
$q->orWhere('name', 'LIKE', '%' . e($word) . '%');
|
||||
}
|
||||
@ -43,7 +43,7 @@ class Search implements SearchInterface
|
||||
/** @var Collection $set */
|
||||
$set = Auth::user()->budgets()->get();
|
||||
$newSet = $set->filter(
|
||||
function(Budget $b) use ($words) {
|
||||
function (Budget $b) use ($words) {
|
||||
$found = 0;
|
||||
foreach ($words as $word) {
|
||||
if (!(strpos(strtolower($b->name), strtolower($word)) === false)) {
|
||||
@ -68,7 +68,7 @@ class Search implements SearchInterface
|
||||
/** @var Collection $set */
|
||||
$set = Auth::user()->categories()->get();
|
||||
$newSet = $set->filter(
|
||||
function(Category $c) use ($words) {
|
||||
function (Category $c) use ($words) {
|
||||
$found = 0;
|
||||
foreach ($words as $word) {
|
||||
if (!(strpos(strtolower($c->name), strtolower($word)) === false)) {
|
||||
@ -103,7 +103,7 @@ class Search implements SearchInterface
|
||||
{
|
||||
// decrypted transaction journals:
|
||||
$decrypted = Auth::user()->transactionjournals()->withRelevantData()->where('encrypted', 0)->where(
|
||||
function(EloquentBuilder $q) use ($words) {
|
||||
function (EloquentBuilder $q) use ($words) {
|
||||
foreach ($words as $word) {
|
||||
$q->orWhere('description', 'LIKE', '%' . e($word) . '%');
|
||||
}
|
||||
@ -113,7 +113,7 @@ class Search implements SearchInterface
|
||||
// encrypted
|
||||
$all = Auth::user()->transactionjournals()->withRelevantData()->where('encrypted', 1)->get();
|
||||
$set = $all->filter(
|
||||
function(TransactionJournal $journal) use ($words) {
|
||||
function (TransactionJournal $journal) use ($words) {
|
||||
foreach ($words as $word) {
|
||||
$haystack = strtolower($journal->description);
|
||||
$word = strtolower($word);
|
||||
@ -129,7 +129,7 @@ class Search implements SearchInterface
|
||||
$filtered = $set->merge($decrypted);
|
||||
|
||||
$filtered->sortBy(
|
||||
function(TransactionJournal $journal) {
|
||||
function (TransactionJournal $journal) {
|
||||
return intval($journal->date->format('U'));
|
||||
}
|
||||
);
|
||||
|
@ -49,7 +49,10 @@ class General extends Twig_Extension
|
||||
$this->getCurrencySymbol(),
|
||||
$this->phpdate(),
|
||||
$this->env(),
|
||||
$this->activeRoute()
|
||||
|
||||
$this->activeRouteStrict(),
|
||||
$this->activeRoutePartial(),
|
||||
$this->activeRoutePartialWhat(),
|
||||
];
|
||||
|
||||
}
|
||||
@ -188,31 +191,65 @@ class General extends Twig_Extension
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return "active" when the current route matches the given argument
|
||||
* exactly.
|
||||
*
|
||||
* @return Twig_SimpleFunction
|
||||
*/
|
||||
protected function activeRoute()
|
||||
protected function activeRouteStrict()
|
||||
{
|
||||
return new Twig_SimpleFunction(
|
||||
'activeRoute', function ($context) {
|
||||
'activeRouteStrict', function () {
|
||||
$args = func_get_args();
|
||||
$route = $args[0]; // name of the route.
|
||||
|
||||
if (Route::getCurrentRoute()->getName() == $route) {
|
||||
return 'active because-route-matches-strict';
|
||||
}
|
||||
|
||||
return 'not-xxx-at-all';
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return "active" when a part of the route matches the argument.
|
||||
* ie. "accounts" will match "accounts.index".
|
||||
*
|
||||
* @return Twig_SimpleFunction
|
||||
*/
|
||||
protected function activeRoutePartial()
|
||||
{
|
||||
return new Twig_SimpleFunction(
|
||||
'activeRoutePartial', function () {
|
||||
$args = func_get_args();
|
||||
$route = $args[0]; // name of the route.
|
||||
if (!(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
|
||||
return 'active because-route-matches-non-strict';
|
||||
}
|
||||
|
||||
return 'not-xxx-at-all';
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will return "active" when the current route matches the first argument (even partly)
|
||||
* but, the variable $what has been set and matches the second argument.
|
||||
*
|
||||
* @return Twig_SimpleFunction
|
||||
*/
|
||||
protected function activeRoutePartialWhat()
|
||||
{
|
||||
return new Twig_SimpleFunction(
|
||||
'activeRoutePartialWhat', function ($context) {
|
||||
$args = func_get_args();
|
||||
$route = $args[1];
|
||||
$what = isset($args[2]) ? $args[2] : false;
|
||||
$strict = isset($args[3]) ? $args[3] : false;
|
||||
$route = $args[1]; // name of the route.
|
||||
$what = $args[2]; // name of the route.
|
||||
$activeWhat = isset($context['what']) ? $context['what'] : false;
|
||||
|
||||
// activeRoute
|
||||
if (!($what === false)) {
|
||||
if ($what == $activeWhat && Route::getCurrentRoute()->getName() == $route) {
|
||||
return 'active because-active-what';
|
||||
}
|
||||
} else {
|
||||
if (!$strict && !(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
|
||||
return 'active because-route-matches-non-strict';
|
||||
} else {
|
||||
if ($strict && Route::getCurrentRoute()->getName() == $route) {
|
||||
return 'active because-route-matches-strict';
|
||||
}
|
||||
}
|
||||
if ($what == $activeWhat && !(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
|
||||
return 'active because-route-matches-non-strict-what';
|
||||
}
|
||||
|
||||
return 'not-xxx-at-all';
|
||||
|
@ -22,7 +22,7 @@ class PiggyBank extends Twig_Extension
|
||||
$functions = [];
|
||||
|
||||
$functions[] = new Twig_SimpleFunction(
|
||||
'currentRelevantRepAmount', function(PB $piggyBank) {
|
||||
'currentRelevantRepAmount', function (PB $piggyBank) {
|
||||
return $piggyBank->currentRelevantRep()->currentamount;
|
||||
}
|
||||
);
|
||||
|
@ -21,7 +21,7 @@ class Translation extends Twig_Extension
|
||||
$filters = [];
|
||||
|
||||
$filters[] = new Twig_SimpleFilter(
|
||||
'_', function($name) {
|
||||
'_', function ($name) {
|
||||
|
||||
return trans('firefly.' . $name);
|
||||
|
||||
|
@ -274,7 +274,7 @@ class FireflyValidator extends Validator
|
||||
$set = $query->get(['piggy_banks.*']);
|
||||
|
||||
foreach ($set as $entry) {
|
||||
$fieldValue = $this->tryDecrypt($entry->name);
|
||||
$fieldValue = $this->tryDecrypt($entry->name);
|
||||
if ($fieldValue == $value) {
|
||||
return false;
|
||||
}
|
||||
|
@ -89,83 +89,83 @@
|
||||
<!-- /input-group -->
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('index',null,true) }}" href="{{ route('index') }}"><i class="fa fa-dashboard fa-fw"></i> {{ 'dashboard'|_ }}</a>
|
||||
<a class="{{ activeRouteStrict('index') }}" href="{{ route('index') }}"><i class="fa fa-dashboard fa-fw"></i> {{ 'dashboard'|_ }}</a>
|
||||
</li>
|
||||
<li class="{{ activeRoute('accounts.index') }}">
|
||||
<li class="{{ activeRoutePartial('accounts') }}">
|
||||
<a href="#"><i class="fa fa-credit-card fa-fw"></i> {{ 'accounts'|_ }} <span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a class="{{ activeRoute('accounts.index', 'asset') }}" href="{{ route('accounts.index','asset') }}">
|
||||
<a class="{{ activeRoutePartialWhat('accounts', 'asset') }}" href="{{ route('accounts.index','asset') }}">
|
||||
<i class="fa fa-money fa-fw"></i> {{ 'assetAccounts'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('accounts.index', 'expense') }}" href="{{ route('accounts.index','expense') }}">
|
||||
<a class="{{ activeRoutePartialWhat('accounts', 'expense') }}" href="{{ route('accounts.index','expense') }}">
|
||||
<i class="fa fa-shopping-cart fa-fw"></i> {{ 'expenseAccounts'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('accounts.index', 'revenue') }}" href="{{ route('accounts.index','revenue') }}">
|
||||
<a class="{{ activeRoutePartialWhat('accounts', 'revenue') }}" href="{{ route('accounts.index','revenue') }}">
|
||||
<i class="fa fa-download fa-fw"></i> {{ 'revenueAccounts'|_ }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('budgets') }}" href="{{ route('budgets.index') }}"><i class="fa fa-tasks fa-fw"></i> {{ 'budgets'|_ }}</a>
|
||||
<a class="{{ activeRoutePartial('budgets') }}" href="{{ route('budgets.index') }}"><i class="fa fa-tasks fa-fw"></i> {{ 'budgets'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('categories') }}" href="{{ route('categories.index') }}"><i class="fa fa-bar-chart fa-fw"></i> {{ 'categories'|_ }}</a>
|
||||
<a class="{{ activeRoutePartial('categories') }}" href="{{ route('categories.index') }}"><i class="fa fa-bar-chart fa-fw"></i> {{ 'categories'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('tags') }}" href="{{ route('tags.index') }}"><i class="fa fa-tags fa-fw"></i> {{ 'tags'|_ }}</a>
|
||||
<a class="{{ activeRoutePartial('tags') }}" href="{{ route('tags.index') }}"><i class="fa fa-tags fa-fw"></i> {{ 'tags'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('reports') }}" href="{{ route('reports.index') }}"><i class="fa fa-line-chart fa-fw"></i> {{ 'reports'|_ }}</a>
|
||||
<a class="{{ activeRoutePartial('reports') }}" href="{{ route('reports.index') }}"><i class="fa fa-line-chart fa-fw"></i> {{ 'reports'|_ }}</a>
|
||||
</li>
|
||||
<li class="{{ activeRoute('transactions') }}">
|
||||
<li class="{{ activeRoutePartial('transactions') }}">
|
||||
<a href="#"><i class="fa fa-repeat fa-fw"></i> {{ 'transactions'|_ }}<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a class="{{ activeRoute('transactions.index','withdrawal') }}" href="{{ route('transactions.index','withdrawal') }}">
|
||||
<a class="{{ activeRoutePartialWhat('transactions','withdrawal') }}" href="{{ route('transactions.index','withdrawal') }}">
|
||||
<i class="fa fa-long-arrow-left fa-fw"></i> {{ 'expenses'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('transactions.index','deposit') }}" href="{{ route('transactions.index','deposit') }}"><i
|
||||
<a class="{{ activeRoutePartialWhat('transactions','deposit') }}" href="{{ route('transactions.index','deposit') }}"><i
|
||||
class="fa fa-long-arrow-right fa-fw"></i> {{ 'income'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('transactions.index','transfers') }}" href="{{ route('transactions.index','transfers') }}">
|
||||
<a class="{{ activeRoutePartialWhat('transactions','transfers') }}" href="{{ route('transactions.index','transfers') }}">
|
||||
<i class="fa fa-fw fa-exchange"></i> {{ 'transfers'|_ }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<li class="{{ activeRoute('piggy-banks') }}">
|
||||
<li class="{{ activeRoutePartial('bills') }} {{ activeRoutePartial('piggy-banks') }}">
|
||||
<a href="#"><i class="fa fa-euro fa-fw"></i> {{ 'moneyManagement'|_ }}<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a class="{{ activeRoute('piggy-banks') }}" href="{{ route('piggy-banks.index') }}">
|
||||
<a class="{{ activeRoutePartial('piggy-banks') }}" href="{{ route('piggy-banks.index') }}">
|
||||
<i class="fa fa-sort-amount-asc fa-fw"></i> {{ 'piggyBanks'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('bills') }}" href="{{ route('bills.index') }}">
|
||||
<a class="{{ activeRoutePartial('bills') }}" href="{{ route('bills.index') }}">
|
||||
<i class="fa fa-calendar-o fa-fw"></i> {{ 'bills'|_ }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
</li>
|
||||
<li class="{{ activeRoute('transactions.create') }}">
|
||||
<li class="{{ activeRouteStrict('transactions.create') }}">
|
||||
<a href="#"><i class="fa fa-plus fa-fw"></i> {{ 'createNew'|_ }} <span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<a class="{{ activeRoute('transactions.create','withdrawal') }}" href="{{ route('transactions.create','withdrawal') }}">
|
||||
<a class="{{ activeRoutePartialWhat('transactions.create','withdrawal') }}" href="{{ route('transactions.create','withdrawal') }}">
|
||||
<i class="fa fa-long-arrow-left fa-fw"></i> {{ 'withdrawal'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('transactions.create','deposit') }}" href="{{ route('transactions.create','deposit') }}">
|
||||
<a class="{{ activeRoutePartialWhat('transactions.create','deposit') }}" href="{{ route('transactions.create','deposit') }}">
|
||||
<i class="fa fa-long-arrow-right fa-fw"></i> {{ 'deposit'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="{{ activeRoute('transactions.create','transfer') }}" href="{{ route('transactions.create','transfer') }}">
|
||||
<a class="{{ activeRoutePartialWhat('transactions.create','transfer') }}" href="{{ route('transactions.create','transfer') }}">
|
||||
<i class="fa fa-fw fa-exchange"></i> {{ 'transfer'|_ }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
@ -173,17 +173,17 @@
|
||||
</li>
|
||||
<!-- top menu again -->
|
||||
<li class="hidden-sm hidden-md hidden-lg">
|
||||
<a class="{{ activeRoute('profile',null,true) }}" href="{{ route('profile') }}"><i class="fa fa-user fa-fw"></i> {{ Auth.user.email }}</a>
|
||||
<a class="{{ activeRouteStrict('profile') }}" href="{{ route('profile') }}"><i class="fa fa-user fa-fw"></i> {{ Auth.user.email }}</a>
|
||||
</li>
|
||||
|
||||
<li class="hidden-sm hidden-md hidden-lg">
|
||||
<a class="{{ activeRoute('preferences',null,true) }}" href="{{ route('preferences') }}"><i class="fa fa-gear fa-fw"></i> {{ 'preferences'|_ }}</a>
|
||||
<a class="{{ activeRouteStrict('preferences') }}" href="{{ route('preferences') }}"><i class="fa fa-gear fa-fw"></i> {{ 'preferences'|_ }}</a>
|
||||
</li>
|
||||
<li class="hidden-sm hidden-md hidden-lg">
|
||||
<a class="{{ activeRoute('currency') }}" href="{{ route('currency.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currency'|_ }}</a>
|
||||
<a class="{{ activeRoutePartial('currency') }}" href="{{ route('currency.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currency'|_ }}</a>
|
||||
</li>
|
||||
<li class="hidden-sm hidden-md hidden-lg">
|
||||
<a class="{{ activeRoute('reminders') }}" href="{{ route('reminders.index') }}"><i class="fa fa-clock-o fa-fw"></i> {{ 'reminders'|_ }}</a>
|
||||
<a class="{{ activeRoutePartial('reminders') }}" href="{{ route('reminders.index') }}"><i class="fa fa-clock-o fa-fw"></i> {{ 'reminders'|_ }}</a>
|
||||
</li>
|
||||
<li class="hidden-sm hidden-md hidden-lg">
|
||||
<a href="{{ route('logout') }}"><i class="fa fa-sign-out fa-fw"></i> {{ 'logout'|_ }}</a>
|
||||
|
Loading…
Reference in New Issue
Block a user