Merge pull request #3195 from firefly-iii/analysis-rdjLrQ

Apply fixes from StyleCI
This commit is contained in:
James Cole 2020-03-17 16:07:00 +00:00 committed by GitHub
commit c136c60eae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
73 changed files with 1163 additions and 1365 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* app.php * app.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,7 +21,6 @@
declare(strict_types=1); declare(strict_types=1);
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Create The Application | Create The Application
@ -33,7 +32,6 @@ declare(strict_types=1);
| |
*/ */
bcscale(12); bcscale(12);
if (!function_exists('envNonEmpty')) { if (!function_exists('envNonEmpty')) {

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* app.php * app.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -19,12 +19,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1); declare(strict_types=1);
use FireflyIII\Providers\ImportServiceProvider; use FireflyIII\Providers\ImportServiceProvider;
return [ return [
'name' => envNonEmpty('APP_NAME', 'Firefly III'), 'name' => envNonEmpty('APP_NAME', 'Firefly III'),
'env' => envNonEmpty('APP_ENV', 'local'), 'env' => envNonEmpty('APP_ENV', 'local'),

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* auth.php * auth.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,9 +21,7 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Authentication Defaults | Authentication Defaults
@ -87,7 +85,7 @@ return [
'providers' => [ 'providers' => [
'users' => [ 'users' => [
'driver' => envNonEmpty('LOGIN_PROVIDER', 'eloquent'),//'adldap', 'driver' => envNonEmpty('LOGIN_PROVIDER', 'eloquent'), //'adldap',
'model' => FireflyIII\User::class, 'model' => FireflyIII\User::class,
], ],
], ],

View File

@ -2,7 +2,7 @@
/** /**
* breadcrumbs.php * breadcrumbs.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -23,7 +23,6 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| View Name | View Name

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* broadcasting.php * broadcasting.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,9 +21,7 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Broadcaster | Default Broadcaster

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* cache.php * cache.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,9 +21,7 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Cache Store | Default Cache Store

View File

@ -2,7 +2,7 @@
/** /**
* csv.php * csv.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -23,14 +23,13 @@
declare(strict_types=1); declare(strict_types=1);
use FireflyIII\Import\Specifics\AbnAmroDescription; use FireflyIII\Import\Specifics\AbnAmroDescription;
use FireflyIII\Import\Specifics\Belfius;
use FireflyIII\Import\Specifics\IngBelgium;
use FireflyIII\Import\Specifics\IngDescription; use FireflyIII\Import\Specifics\IngDescription;
use FireflyIII\Import\Specifics\PresidentsChoice; use FireflyIII\Import\Specifics\PresidentsChoice;
use FireflyIII\Import\Specifics\SnsDescription; use FireflyIII\Import\Specifics\SnsDescription;
use FireflyIII\Import\Specifics\Belfius;
use FireflyIII\Import\Specifics\IngBelgium;
return [ return [
/* /*
* Configuration for the CSV specifics. * Configuration for the CSV specifics.
*/ */
@ -40,7 +39,7 @@ return [
'SnsDescription' => SnsDescription::class, 'SnsDescription' => SnsDescription::class,
'PresidentsChoice' => PresidentsChoice::class, 'PresidentsChoice' => PresidentsChoice::class,
'Belfius' => Belfius::class, 'Belfius' => Belfius::class,
'IngBelgium' => IngBelgium::class 'IngBelgium' => IngBelgium::class,
], ],
/* /*
@ -88,7 +87,6 @@ return [
'converter' => 'Ignore', 'converter' => 'Ignore',
'mapper' => null, 'mapper' => null,
], ],
'bill-id' => [ 'bill-id' => [
'mappable' => true, 'mappable' => true,

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* database.php * database.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -23,8 +23,6 @@ declare(strict_types=1);
use Illuminate\Support\Str; use Illuminate\Support\Str;
$databaseUrl = getenv('DATABASE_URL'); $databaseUrl = getenv('DATABASE_URL');
$host = ''; $host = '';
$username = ''; $username = '';
@ -33,7 +31,6 @@ $database = '';
$port = ''; $port = '';
if (!(false === $databaseUrl)) { if (!(false === $databaseUrl)) {
$options = parse_url($databaseUrl); $options = parse_url($databaseUrl);
$host = $options['host'] ?? 'firefly_iii_db'; $host = $options['host'] ?? 'firefly_iii_db';
$username = $options['user'] ?? 'firefly'; $username = $options['user'] ?? 'firefly';
@ -43,7 +40,6 @@ if (!(false === $databaseUrl)) {
} }
return [ return [
'default' => envNonEmpty('DB_CONNECTION', 'pgsql'), 'default' => envNonEmpty('DB_CONNECTION', 'pgsql'),
'connections' => [ 'connections' => [
'sqlite' => [ 'sqlite' => [

View File

@ -1,9 +1,10 @@
<?php <?php
declare(strict_types=1);
/** /**
* debugbar.php * debugbar.php
* Copyright (c) 2020 james@firefly-iii.org * Copyright (c) 2020 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -22,7 +23,6 @@
*/ */
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Debugbar Settings | Debugbar Settings
@ -36,8 +36,8 @@ return [
*/ */
'enabled' => env('DEBUGBAR_ENABLED', null), 'enabled' => env('DEBUGBAR_ENABLED', null),
'except' => [ 'except' => [
'telescope*' 'telescope*',
], ],
/* /*
@ -57,7 +57,7 @@ return [
'driver' => 'file', // redis, file, pdo, custom 'driver' => 'file', // redis, file, pdo, custom
'path' => storage_path('debugbar'), // For file driver 'path' => storage_path('debugbar'), // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO) 'connection' => null, // Leave null for default connection (Redis/PDO)
'provider' => '' // Instance of StorageInterface for custom driver 'provider' => '', // Instance of StorageInterface for custom driver
], ],
/* /*
@ -87,7 +87,7 @@ return [
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools. | Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
*/ */
'capture_ajax' => true, 'capture_ajax' => true,
'add_ajax_timing' => false, 'add_ajax_timing' => false,
/* /*
@ -163,26 +163,26 @@ return [
'with_params' => true, // Render SQL with the parameters substituted 'with_params' => true, // Render SQL with the parameters substituted
'backtrace' => true, // Use a backtrace to find the origin of the query in your files. 'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
'timeline' => false, // Add the queries to the timeline 'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries 'explain' => [ // Show EXPLAIN output on queries
'enabled' => false, 'enabled' => false,
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+ 'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
], ],
'hints' => true, // Show hints for common mistakes 'hints' => true, // Show hints for common mistakes
], ],
'mail' => [ 'mail' => [
'full_log' => false 'full_log' => false,
], ],
'views' => [ 'views' => [
'data' => true, //Note: Can slow down the application, because the data can be quite large.. 'data' => true, //Note: Can slow down the application, because the data can be quite large..
], ],
'route' => [ 'route' => [
'label' => true // show complete route on bar 'label' => true, // show complete route on bar
], ],
'logs' => [ 'logs' => [
'file' => null 'file' => null,
], ],
'cache' => [ 'cache' => [
'values' => true // collect cache values 'values' => true, // collect cache values
], ],
], ],

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* filesystems.php * filesystems.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -22,7 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Filesystem Disk | Default Filesystem Disk

View File

@ -1,9 +1,8 @@
<?php <?php
/** /**
* firefly.php * firefly.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -133,7 +132,7 @@ return [
'is_demo_site' => false, 'is_demo_site' => false,
], ],
'feature_flags' => [ 'feature_flags' => [
'export' => true, 'export' => true,
'telemetry' => false, 'telemetry' => false,
], ],
@ -182,7 +181,6 @@ return [
/* PDF */ /* PDF */
'application/pdf', 'application/pdf',
/* MS word */ /* MS word */
'application/msword', 'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
@ -246,66 +244,61 @@ return [
'1Y' => 'yearly', '1Y' => 'yearly',
'custom' => 'custom', 'custom' => 'custom',
], ],
'subTitlesByIdentifier' => 'subTitlesByIdentifier' => [
[ 'asset' => 'Asset accounts',
'asset' => 'Asset accounts', 'expense' => 'Expense accounts',
'expense' => 'Expense accounts', 'revenue' => 'Revenue accounts',
'revenue' => 'Revenue accounts', 'cash' => 'Cash accounts',
'cash' => 'Cash accounts', 'liabilities' => 'Liabilities',
'liabilities' => 'Liabilities', 'liability' => 'Liabilities',
'liability' => 'Liabilities', ],
], 'subIconsByIdentifier' => [
'subIconsByIdentifier' => 'asset' => 'fa-money',
[ 'Asset account' => 'fa-money',
'asset' => 'fa-money', 'Default account' => 'fa-money',
'Asset account' => 'fa-money', 'Cash account' => 'fa-money',
'Default account' => 'fa-money', 'expense' => 'fa-shopping-cart',
'Cash account' => 'fa-money', 'Expense account' => 'fa-shopping-cart',
'expense' => 'fa-shopping-cart', 'Beneficiary account' => 'fa-shopping-cart',
'Expense account' => 'fa-shopping-cart', 'revenue' => 'fa-download',
'Beneficiary account' => 'fa-shopping-cart', 'Revenue account' => 'fa-download',
'revenue' => 'fa-download', 'import' => 'fa-download',
'Revenue account' => 'fa-download', 'Import account' => 'fa-download',
'import' => 'fa-download', 'liabilities' => 'fa-ticket',
'Import account' => 'fa-download', ],
'liabilities' => 'fa-ticket', 'accountTypesByIdentifier' => [
], 'asset' => ['Default account', 'Asset account'],
'accountTypesByIdentifier' => 'expense' => ['Expense account', 'Beneficiary account'],
[ 'revenue' => ['Revenue account'],
'asset' => ['Default account', 'Asset account'], 'import' => ['Import account'],
'expense' => ['Expense account', 'Beneficiary account'], 'liabilities' => ['Loan', 'Debt', 'Credit card', 'Mortgage'],
'revenue' => ['Revenue account'], ],
'import' => ['Import account'], 'accountTypeByIdentifier' => [
'liabilities' => ['Loan', 'Debt', 'Credit card', 'Mortgage'], 'asset' => ['Asset account'],
], 'expense' => ['Expense account'],
'accountTypeByIdentifier' => 'revenue' => ['Revenue account'],
[ 'opening' => ['Initial balance account'],
'asset' => ['Asset account'], 'initial' => ['Initial balance account'],
'expense' => ['Expense account'], 'import' => ['Import account'],
'revenue' => ['Revenue account'], 'reconcile' => ['Reconciliation account'],
'opening' => ['Initial balance account'], 'liabilities' => ['Loan', 'Debt', 'Mortgage', 'Credit card'],
'initial' => ['Initial balance account'], 'liability' => ['Loan', 'Debt', 'Mortgage', 'Credit card'],
'import' => ['Import account'], ],
'reconcile' => ['Reconciliation account'], 'shortNamesByFullName' => [
'liabilities' => ['Loan', 'Debt', 'Mortgage', 'Credit card'], 'Default account' => 'asset',
'liability' => ['Loan', 'Debt', 'Mortgage', 'Credit card'], 'Asset account' => 'asset',
], 'Import account' => 'import',
'shortNamesByFullName' => 'Expense account' => 'expense',
[ 'Beneficiary account' => 'expense',
'Default account' => 'asset', 'Revenue account' => 'revenue',
'Asset account' => 'asset', 'Cash account' => 'cash',
'Import account' => 'import', 'Initial balance account' => 'initial-balance',
'Expense account' => 'expense', 'Reconciliation account' => 'reconciliation',
'Beneficiary account' => 'expense', 'Credit card' => 'liabilities',
'Revenue account' => 'revenue', 'Loan' => 'liabilities',
'Cash account' => 'cash', 'Debt' => 'liabilities',
'Initial balance account' => 'initial-balance', 'Mortgage' => 'liabilities',
'Reconciliation account' => 'reconciliation', ],
'Credit card' => 'liabilities',
'Loan' => 'liabilities',
'Debt' => 'liabilities',
'Mortgage' => 'liabilities',
],
'shortLiabilityNameByFullName' => [ 'shortLiabilityNameByFullName' => [
'Credit card' => 'creditcard', 'Credit card' => 'creditcard',
'Loan' => 'loan', 'Loan' => 'loan',
@ -313,7 +306,7 @@ return [
'Mortgage' => 'mortgage', 'Mortgage' => 'mortgage',
], ],
/** /**
* Languages configuration * Languages configuration.
*/ */
'languages' => [ 'languages' => [
// currently enabled languages // currently enabled languages
@ -337,7 +330,6 @@ return [
'fi_FI' => ['name_locale' => 'Suomi', 'name_english' => 'Finnish'], 'fi_FI' => ['name_locale' => 'Suomi', 'name_english' => 'Finnish'],
'vi_VN' => ['name_locale' => 'Tiếng Việt', 'name_english' => 'Vietnamese'], 'vi_VN' => ['name_locale' => 'Tiếng Việt', 'name_english' => 'Vietnamese'],
// currently disabled languages: // currently disabled languages:
// 'bg_BG' => ['name_locale' => 'Български', 'name_english' => 'Bulgarian'], // 'bg_BG' => ['name_locale' => 'Български', 'name_english' => 'Bulgarian'],
// 'ca_ES' => ['name_locale' => 'Catalan', 'name_english' => 'Catalan'], // 'ca_ES' => ['name_locale' => 'Catalan', 'name_english' => 'Catalan'],
@ -434,7 +426,6 @@ return [
'tagOrId' => TagOrId::class, 'tagOrId' => TagOrId::class,
'configName' => ConfigurationName::class, 'configName' => ConfigurationName::class,
], ],
'rule-triggers' => [ 'rule-triggers' => [
'user_action' => UserAction::class, 'user_action' => UserAction::class,
@ -547,7 +538,6 @@ return [
'notes_are', 'notes_are',
], ],
'test-triggers' => [ 'test-triggers' => [
'limit' => 10, 'limit' => 10,
'range' => 200, 'range' => 200,
@ -555,8 +545,8 @@ return [
'default_currency' => 'EUR', 'default_currency' => 'EUR',
'default_language' => envNonEmpty('DEFAULT_LANGUAGE', 'en_US'), 'default_language' => envNonEmpty('DEFAULT_LANGUAGE', 'en_US'),
'search_modifiers' => ['amount_is', 'amount', 'amount_max', 'amount_min', 'amount_less', 'amount_more', 'source', 'destination', 'category', 'search_modifiers' => ['amount_is', 'amount', 'amount_max', 'amount_min', 'amount_less', 'amount_more', 'source', 'destination', 'category',
'budget', 'bill', 'type', 'date', 'date_before', 'date_after', 'on', 'before', 'after', 'from', 'to', 'tag', 'created_on', 'budget', 'bill', 'type', 'date', 'date_before', 'date_after', 'on', 'before', 'after', 'from', 'to', 'tag', 'created_on',
'updated_on'], 'updated_on', ],
// TODO notes has_attachments // TODO notes has_attachments
'cer_providers' => [ 'cer_providers' => [
@ -569,10 +559,10 @@ return [
'source' => [ 'source' => [
TransactionTypeModel::WITHDRAWAL => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], TransactionTypeModel::WITHDRAWAL => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
TransactionTypeModel::DEPOSIT => [AccountType::REVENUE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE, TransactionTypeModel::DEPOSIT => [AccountType::REVENUE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE,
AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION], AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION, ],
TransactionTypeModel::TRANSFER => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], TransactionTypeModel::TRANSFER => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
TransactionTypeModel::OPENING_BALANCE => [AccountType::INITIAL_BALANCE, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, TransactionTypeModel::OPENING_BALANCE => [AccountType::INITIAL_BALANCE, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT,
AccountType::MORTGAGE], AccountType::MORTGAGE, ],
TransactionTypeModel::RECONCILIATION => [AccountType::RECONCILIATION, AccountType::ASSET], TransactionTypeModel::RECONCILIATION => [AccountType::RECONCILIATION, AccountType::ASSET],
// in case no transaction type is known yet, it could be anything. // in case no transaction type is known yet, it could be anything.
'none' => [ 'none' => [
@ -586,43 +576,43 @@ return [
], ],
'destination' => [ 'destination' => [
TransactionTypeModel::WITHDRAWAL => [AccountType::EXPENSE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT, TransactionTypeModel::WITHDRAWAL => [AccountType::EXPENSE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT,
AccountType::MORTGAGE], AccountType::MORTGAGE, ],
TransactionTypeModel::DEPOSIT => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], TransactionTypeModel::DEPOSIT => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
TransactionTypeModel::TRANSFER => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], TransactionTypeModel::TRANSFER => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
TransactionTypeModel::OPENING_BALANCE => [AccountType::INITIAL_BALANCE, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, TransactionTypeModel::OPENING_BALANCE => [AccountType::INITIAL_BALANCE, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT,
AccountType::MORTGAGE], AccountType::MORTGAGE, ],
TransactionTypeModel::RECONCILIATION => [AccountType::RECONCILIATION, AccountType::ASSET], TransactionTypeModel::RECONCILIATION => [AccountType::RECONCILIATION, AccountType::ASSET],
], ],
], ],
'allowed_opposing_types' => [ 'allowed_opposing_types' => [
'source' => [ 'source' => [
AccountType::ASSET => [AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::ASSET => [AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE,
AccountType::LOAN, AccountType::RECONCILIATION], AccountType::LOAN, AccountType::RECONCILIATION, ],
AccountType::CASH => [AccountType::ASSET], AccountType::CASH => [AccountType::ASSET],
AccountType::DEBT => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::DEBT => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE], AccountType::MORTGAGE, ],
AccountType::EXPENSE => [], // is not allowed as a source. AccountType::EXPENSE => [], // is not allowed as a source.
AccountType::INITIAL_BALANCE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE], AccountType::INITIAL_BALANCE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE],
AccountType::LOAN => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::LOAN => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE], AccountType::MORTGAGE, ],
AccountType::MORTGAGE => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE], AccountType::MORTGAGE, ],
AccountType::RECONCILIATION => [AccountType::ASSET], AccountType::RECONCILIATION => [AccountType::ASSET],
AccountType::REVENUE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE], AccountType::REVENUE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE],
], ],
'destination' => [ 'destination' => [
AccountType::ASSET => [AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::ASSET => [AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE, AccountType::RECONCILIATION, AccountType::REVENUE], AccountType::MORTGAGE, AccountType::RECONCILIATION, AccountType::REVENUE, ],
AccountType::CASH => [AccountType::ASSET], AccountType::CASH => [AccountType::ASSET],
AccountType::DEBT => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE, AccountType::DEBT => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE,
AccountType::REVENUE], AccountType::REVENUE, ],
AccountType::EXPENSE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE], AccountType::EXPENSE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE],
AccountType::INITIAL_BALANCE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE], AccountType::INITIAL_BALANCE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE],
AccountType::LOAN => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE, AccountType::LOAN => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE,
AccountType::REVENUE], AccountType::REVENUE, ],
AccountType::MORTGAGE => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE, AccountType::MORTGAGE => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE,
AccountType::REVENUE], AccountType::REVENUE, ],
AccountType::RECONCILIATION => [AccountType::ASSET], AccountType::RECONCILIATION => [AccountType::ASSET],
AccountType::REVENUE => [], // is not allowed as a destination AccountType::REVENUE => [], // is not allowed as a destination
], ],
@ -631,29 +621,29 @@ return [
'allowed_transaction_types' => [ 'allowed_transaction_types' => [
'source' => [ 'source' => [
AccountType::ASSET => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::TRANSFER, TransactionTypeModel::OPENING_BALANCE, AccountType::ASSET => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::TRANSFER, TransactionTypeModel::OPENING_BALANCE,
TransactionTypeModel::RECONCILIATION], TransactionTypeModel::RECONCILIATION, ],
AccountType::EXPENSE => [], // is not allowed as a source. AccountType::EXPENSE => [], // is not allowed as a source.
AccountType::REVENUE => [TransactionTypeModel::DEPOSIT], AccountType::REVENUE => [TransactionTypeModel::DEPOSIT],
AccountType::LOAN => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, AccountType::LOAN => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE], TransactionTypeModel::OPENING_BALANCE, ],
AccountType::DEBT => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, AccountType::DEBT => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE], TransactionTypeModel::OPENING_BALANCE, ],
AccountType::MORTGAGE => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, AccountType::MORTGAGE => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE], TransactionTypeModel::OPENING_BALANCE, ],
AccountType::INITIAL_BALANCE => [], // todo fill me in. AccountType::INITIAL_BALANCE => [], // todo fill me in.
AccountType::RECONCILIATION => [], // todo fill me in. AccountType::RECONCILIATION => [], // todo fill me in.
], ],
'destination' => [ 'destination' => [
AccountType::ASSET => [TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, TransactionTypeModel::OPENING_BALANCE, AccountType::ASSET => [TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, TransactionTypeModel::OPENING_BALANCE,
TransactionTypeModel::RECONCILIATION], TransactionTypeModel::RECONCILIATION, ],
AccountType::EXPENSE => [TransactionTypeModel::WITHDRAWAL], AccountType::EXPENSE => [TransactionTypeModel::WITHDRAWAL],
AccountType::REVENUE => [], // is not allowed as destination. AccountType::REVENUE => [], // is not allowed as destination.
AccountType::LOAN => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, AccountType::LOAN => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE], TransactionTypeModel::OPENING_BALANCE, ],
AccountType::DEBT => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, AccountType::DEBT => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE], TransactionTypeModel::OPENING_BALANCE, ],
AccountType::MORTGAGE => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, AccountType::MORTGAGE => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE], TransactionTypeModel::OPENING_BALANCE, ],
AccountType::INITIAL_BALANCE => [], // todo fill me in. AccountType::INITIAL_BALANCE => [], // todo fill me in.
AccountType::RECONCILIATION => [], // todo fill me in. AccountType::RECONCILIATION => [], // todo fill me in.
], ],

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* google2fa.php * google2fa.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -22,7 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
* Auth container binding * Auth container binding
*/ */
@ -91,7 +90,6 @@ return [
*/ */
'throw_exceptions' => true, 'throw_exceptions' => true,
'store_in_cookie' => true, 'store_in_cookie' => true,
]; ];

View File

@ -2,7 +2,7 @@
/** /**
* hashing.php * hashing.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -23,7 +23,6 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Hash Driver | Default Hash Driver

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* ide-helper.php * ide-helper.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,8 +21,7 @@
declare(strict_types=1); declare(strict_types=1);
return array( return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Filename & Format | Filename & Format
@ -86,9 +85,9 @@ return array(
'include_helpers' => false, 'include_helpers' => false,
'helper_files' => array( 'helper_files' => [
base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php', base_path() . '/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
), ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -100,10 +99,9 @@ return array(
| |
*/ */
'model_locations' => array( 'model_locations' => [
'app', 'app',
), ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -114,13 +112,13 @@ return array(
| |
*/ */
'extra' => array( 'extra' => [
'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'), 'Eloquent' => ['Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'],
'Session' => array('Illuminate\Session\Store'), 'Session' => ['Illuminate\Session\Store'],
), ],
'magic' => array( 'magic' => [
'Log' => array( 'Log' => [
'debug' => 'Monolog\Logger::addDebug', 'debug' => 'Monolog\Logger::addDebug',
'info' => 'Monolog\Logger::addInfo', 'info' => 'Monolog\Logger::addInfo',
'notice' => 'Monolog\Logger::addNotice', 'notice' => 'Monolog\Logger::addNotice',
@ -129,8 +127,8 @@ return array(
'critical' => 'Monolog\Logger::addCritical', 'critical' => 'Monolog\Logger::addCritical',
'alert' => 'Monolog\Logger::addAlert', 'alert' => 'Monolog\Logger::addAlert',
'emergency' => 'Monolog\Logger::addEmergency', 'emergency' => 'Monolog\Logger::addEmergency',
) ],
), ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -142,9 +140,9 @@ return array(
| |
*/ */
'interfaces' => array( 'interfaces' => [
), ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -172,9 +170,9 @@ return array(
| ), | ),
| |
*/ */
'custom_db_types' => array( 'custom_db_types' => [
), ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -210,10 +208,10 @@ return array(
| Cast the given "real type" to the given "type". | Cast the given "real type" to the given "type".
| |
*/ */
'type_overrides' => array( 'type_overrides' => [
'integer' => 'int', 'integer' => 'int',
'boolean' => 'bool', 'boolean' => 'bool',
), ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -226,4 +224,4 @@ return array(
*/ */
'include_class_docblocks' => false, 'include_class_docblocks' => false,
); ];

View File

@ -2,7 +2,7 @@
/** /**
* import.php * import.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* intro.php * intro.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -33,7 +33,7 @@ return [
'box_out_holder' => ['element' => '#box_out_holder'], 'box_out_holder' => ['element' => '#box_out_holder'],
'help' => ['element' => '#help', 'position' => 'bottom'], 'help' => ['element' => '#help', 'position' => 'bottom'],
'sidebar-toggle' => ['element' => '#sidebar-toggle', 'position' => 'bottom'], 'sidebar-toggle' => ['element' => '#sidebar-toggle', 'position' => 'bottom'],
'cash_account' => ['element' => '#all_transactions','position' => 'left'], 'cash_account' => ['element' => '#all_transactions', 'position' => 'left'],
'outro' => [], 'outro' => [],
], ],
// accounts: create // accounts: create
@ -42,24 +42,24 @@ return [
], ],
// transactions: create // transactions: create
'transactions_create_withdrawal' => [ 'transactions_create_withdrawal' => [
'source' => ['element' => 'input[name="source[]"]'], 'source' => ['element' => 'input[name="source[]"]'],
'destination' => ['element' => 'input[name="destination[]"]'], 'destination' => ['element' => 'input[name="destination[]"]'],
'more_meta' => ['element' => 'input[name="category[]"]'], 'more_meta' => ['element' => 'input[name="category[]"]'],
'split_add' => ['element' => '.split_add_btn'], 'split_add' => ['element' => '.split_add_btn'],
], ],
'transactions_create_deposit' => [ 'transactions_create_deposit' => [
'source' => ['element' => 'input[name="source[]"]'], 'source' => ['element' => 'input[name="source[]"]'],
'destination' => ['element' => 'input[name="destination[]"]'], 'destination' => ['element' => 'input[name="destination[]"]'],
'more_meta' => ['element' => 'input[name="category[]"]'], 'more_meta' => ['element' => 'input[name="category[]"]'],
'split_add' => ['element' => '.split_add_btn'], 'split_add' => ['element' => '.split_add_btn'],
], ],
'transactions_create_transfer' => [ 'transactions_create_transfer' => [
'source' => ['element' => 'input[name="source[]"]'], 'source' => ['element' => 'input[name="source[]"]'],
'destination' => ['element' => 'input[name="destination[]"]'], 'destination' => ['element' => 'input[name="destination[]"]'],
'more_meta' => ['element' => 'input[name="category[]"]'], 'more_meta' => ['element' => 'input[name="category[]"]'],
'split_add' => ['element' => '.split_add_btn'], 'split_add' => ['element' => '.split_add_btn'],
], ],
// extra text for asset account creation. // extra text for asset account creation.
@ -72,7 +72,7 @@ return [
// budgets: index // budgets: index
'budgets_index' => [ 'budgets_index' => [
'intro' => [], 'intro' => [],
'set_budget' => ['element' => '#availableBar',], 'set_budget' => ['element' => '#availableBar'],
'see_expenses_bar' => ['element' => '#spentBar'], 'see_expenses_bar' => ['element' => '#spentBar'],
'navigate_periods' => ['element' => '#periodNavigator'], 'navigate_periods' => ['element' => '#periodNavigator'],
'new_budget' => ['element' => '#createBudgetBox'], 'new_budget' => ['element' => '#createBudgetBox'],
@ -115,7 +115,7 @@ return [
// piggies: index, create, show // piggies: index, create, show
'piggy-banks_index' => [ 'piggy-banks_index' => [
'saved' => ['element' => '.piggySaved'], 'saved' => ['element' => '.piggySaved'],
'button' => ['element' => '.piggyBar',], 'button' => ['element' => '.piggyBar'],
'accountStatus' => ['element' => '#accountStatus', 'position' => 'top'], 'accountStatus' => ['element' => '#accountStatus', 'position' => 'top'],
], ],
'piggy-banks_create' => [ 'piggy-banks_create' => [
@ -173,9 +173,9 @@ return [
'currencies_index' => [ 'currencies_index' => [
'intro' => [], 'intro' => [],
'default' => ['element' => '#default-currency'], 'default' => ['element' => '#default-currency'],
'buttons' => ['element' => '.buttons',] 'buttons' => ['element' => '.buttons'],
], ],
'currencies_create' => [ 'currencies_create' => [
'code' => ['element' => '#ffInput_code',], 'code' => ['element' => '#ffInput_code'],
], ],
]; ];

View File

@ -2,7 +2,7 @@
/** /**
* ldap.php * ldap.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -37,8 +37,8 @@ if ('FreeIPA' === envNonEmpty('ADLDAP_CONNECTION_SCHEME', 'OpenLDAP')) {
if ('ActiveDirectory' === envNonEmpty('ADLDAP_CONNECTION_SCHEME', 'OpenLDAP')) { if ('ActiveDirectory' === envNonEmpty('ADLDAP_CONNECTION_SCHEME', 'OpenLDAP')) {
$schema = ActiveDirectory::class; $schema = ActiveDirectory::class;
} }
return [
return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Connections | Connections

View File

@ -2,7 +2,7 @@
/** /**
* ldap_auth.php * ldap_auth.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -25,7 +25,6 @@ declare(strict_types=1);
use Adldap\Laravel\Scopes\UidScope; use Adldap\Laravel\Scopes\UidScope;
use Adldap\Laravel\Scopes\UpnScope; use Adldap\Laravel\Scopes\UpnScope;
// default OpenLDAP scopes. // default OpenLDAP scopes.
$scopes = [ $scopes = [
UidScope::class, UidScope::class,
@ -39,9 +38,7 @@ if ('ActiveDirectory' === env('ADLDAP_CONNECTION_SCHEME')) {
]; ];
} }
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Connection | Connection
@ -78,7 +75,6 @@ return [
'provider' => Adldap\Laravel\Auth\DatabaseUserProvider::class, 'provider' => Adldap\Laravel\Auth\DatabaseUserProvider::class,
//'provider' => Adldap\Laravel\Auth\NoDatabaseUserProvider::class, //'provider' => Adldap\Laravel\Auth\NoDatabaseUserProvider::class,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Model | Model
@ -174,7 +170,7 @@ return [
'ldap' => [ 'ldap' => [
'locate_users_by' => envNonEmpty('ADLDAP_DISCOVER_FIELD', 'userprincipalname'), 'locate_users_by' => envNonEmpty('ADLDAP_DISCOVER_FIELD', 'userprincipalname'),
'bind_users_by' => envNonEmpty('ADLDAP_AUTH_FIELD', 'distinguishedname'), 'bind_users_by' => envNonEmpty('ADLDAP_AUTH_FIELD', 'distinguishedname'),
], ],

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* logging.php * logging.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -19,13 +19,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1); declare(strict_types=1);
use FireflyIII\Support\Logging\AuditLogger; use FireflyIII\Support\Logging\AuditLogger;
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Log Channel | Default Log Channel
@ -38,7 +36,7 @@ return [
*/ */
'default' => envNonEmpty('LOG_CHANNEL', 'stack'), 'default' => envNonEmpty('LOG_CHANNEL', 'stack'),
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'), 'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Log Channels | Log Channels

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* mail.php * mail.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,9 +21,7 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Mail Driver | Mail Driver
@ -78,7 +76,6 @@ return [
*/ */
'from' => ['address' => envNonEmpty('MAIL_FROM', 'changeme@example.com'), 'name' => 'Firefly III Mailer'], 'from' => ['address' => envNonEmpty('MAIL_FROM', 'changeme@example.com'), 'name' => 'Firefly III Mailer'],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| E-Mail Encryption Protocol | E-Mail Encryption Protocol

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* queue.php * queue.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,9 +21,7 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Queue Driver | Default Queue Driver

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* services.php * services.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,9 +21,7 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Third Party Services | Third Party Services
@ -37,9 +35,9 @@ return [
*/ */
'mailgun' => [ 'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'), 'domain' => env('MAILGUN_DOMAIN'),
'endpoint' => env('MAILGUN_ENDPOINT','api.mailgun.net'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'secret' => env('MAILGUN_SECRET'), 'secret' => env('MAILGUN_SECRET'),
], ],
'ses' => [ 'ses' => [

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* session.php * session.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,7 +21,6 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
'driver' => env('SESSION_DRIVER', 'file'), 'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => 120, 'lifetime' => 120,

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
/** /**
* This file is part of the TwigBridge package. * This file is part of the TwigBridge package.
* *
@ -28,7 +30,6 @@ use TwigBridge\Extension\Loader\Functions;
* Configuration options for Twig. * Configuration options for Twig.
*/ */
return [ return [
'twig' => [ 'twig' => [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -181,13 +182,12 @@ return [
'Steam', 'Steam',
'Config', 'Config',
'Request', 'Request',
'Form' => ['is_safe' => ['input', 'select', 'checkbox', 'model', 'open', 'radio', 'textarea', 'file',],], 'Form' => ['is_safe' => ['input', 'select', 'checkbox', 'model', 'open', 'radio', 'textarea', 'file']],
'ExpandedForm' => [ 'ExpandedForm' => [
'is_safe' => [ 'is_safe' => [
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location', 'file', 'staticText', 'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location', 'file', 'staticText',
'password', 'nonSelectableAmount', 'number', 'amountNoCurrency', 'percentage', 'password', 'nonSelectableAmount', 'number', 'amountNoCurrency', 'percentage',
], ],
], ],
'AccountForm' => [ 'AccountForm' => [
@ -201,12 +201,11 @@ return [
'currencyList', 'currencyListEmpty', 'balanceAll', 'currencyList', 'currencyListEmpty', 'balanceAll',
], ],
], ],
'PiggyBankForm' => 'PiggyBankForm' => [
[ 'is_safe' => [
'is_safe' => [ 'piggyBankList',
'piggyBankList',
],
], ],
],
'RuleForm' => [ 'RuleForm' => [
'is_safe' => [ 'is_safe' => [
'ruleGroupList', 'ruleGroupListWithEmpty', 'ruleGroupList', 'ruleGroupListWithEmpty',
@ -214,7 +213,6 @@ return [
], ],
], ],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Functions | Functions

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* upgrade.php * upgrade.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -23,31 +23,29 @@ declare(strict_types=1);
return [ return [
'text' => [ 'text' => [
'upgrade' => 'upgrade' => [
[ '4.3' => 'Make sure you run the migrations and clear your cache. If you need more help, please check Github or the Firefly III website.',
'4.3' => 'Make sure you run the migrations and clear your cache. If you need more help, please check Github or the Firefly III website.', '4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.',
'4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.', '4.6.4' => 'This version of Firefly III requires PHP7.1.',
'4.6.4' => 'This version of Firefly III requires PHP7.1.', '4.7.3' => 'This version of Firefly III handles bills differently. See http://bit.ly/FF3-new-bills for more information.',
'4.7.3' => 'This version of Firefly III handles bills differently. See http://bit.ly/FF3-new-bills for more information.', '4.7.4' => 'This version of Firefly III has a new import routine. See http://bit.ly/FF3-new-import for more information.',
'4.7.4' => 'This version of Firefly III has a new import routine. See http://bit.ly/FF3-new-import for more information.', '4.7.6' => 'This will be the last version to require PHP7.1. Future versions will require PHP7.2 minimum.',
'4.7.6' => 'This will be the last version to require PHP7.1. Future versions will require PHP7.2 minimum.', '4.7.7' => 'This version of Firefly III requires PHP7.2.',
'4.7.7' => 'This version of Firefly III requires PHP7.2.', '4.7.10' => 'Firefly III no longer encrypts database values. To protect your data, make sure you use TDE or FDE. Read more: https://bit.ly/FF3-encryption',
'4.7.10' => 'Firefly III no longer encrypts database values. To protect your data, make sure you use TDE or FDE. Read more: https://bit.ly/FF3-encryption', '4.8.0' => 'This is a huge upgrade for Firefly III. Please expect bugs and errors, and bear with me as I fix them. I tested a lot of things but pretty sure I missed some. Thanks for understanding.',
'4.8.0' => 'This is a huge upgrade for Firefly III. Please expect bugs and errors, and bear with me as I fix them. I tested a lot of things but pretty sure I missed some. Thanks for understanding.', '4.8.1' => 'This version of Firefly III requires PHP7.3.',
'4.8.1' => 'This version of Firefly III requires PHP7.3.', ],
], 'install' => [
'install' => '4.3' => 'Welcome to Firefly! Make sure you follow the installation guide. If you need more help, please check Github or the Firefly III website. The installation guide has a FAQ which you should check out as well.',
[ '4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.',
'4.3' => 'Welcome to Firefly! Make sure you follow the installation guide. If you need more help, please check Github or the Firefly III website. The installation guide has a FAQ which you should check out as well.', '4.6.4' => 'This version of Firefly III requires PHP7.1.',
'4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.', '4.7.3' => 'This version of Firefly III handles bills differently. See http://bit.ly/FF3-new-bills for more information.',
'4.6.4' => 'This version of Firefly III requires PHP7.1.', '4.7.4' => 'This version of Firefly III has a new import routine. See http://bit.ly/FF3-new-import for more information.',
'4.7.3' => 'This version of Firefly III handles bills differently. See http://bit.ly/FF3-new-bills for more information.', '4.7.6' => 'This will be the last version to require PHP7.1. Future versions will require PHP7.2 minimum.',
'4.7.4' => 'This version of Firefly III has a new import routine. See http://bit.ly/FF3-new-import for more information.', '4.7.7' => 'This version of Firefly III requires PHP7.2.',
'4.7.6' => 'This will be the last version to require PHP7.1. Future versions will require PHP7.2 minimum.', '4.7.10' => 'Firefly III no longer encrypts database values. To protect your data, make sure you use TDE or FDE. Read more: https://bit.ly/FF3-encryption',
'4.7.7' => 'This version of Firefly III requires PHP7.2.', '4.8.0' => 'This is a huge upgrade for Firefly III. Please expect bugs and errors, and bear with me as I fix them. I tested a lot of things but pretty sure I missed some. Thanks for understanding.',
'4.7.10' => 'Firefly III no longer encrypts database values. To protect your data, make sure you use TDE or FDE. Read more: https://bit.ly/FF3-encryption', '4.8.1' => 'This version of Firefly III requires PHP7.3.',
'4.8.0' => 'This is a huge upgrade for Firefly III. Please expect bugs and errors, and bear with me as I fix them. I tested a lot of things but pretty sure I missed some. Thanks for understanding.', ],
'4.8.1' => 'This version of Firefly III requires PHP7.3.',
],
], ],
]; ];

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* view.php * view.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,9 +21,7 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| View Storage Paths | View Storage Paths

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* AccountFactory.php * AccountFactory.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -22,10 +22,9 @@ declare(strict_types=1);
use Carbon\Carbon; use Carbon\Carbon;
$factory->define( $factory->define(
FireflyIII\Models\Account::class, FireflyIII\Models\Account::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->unique()->numberBetween(1000, 10000), 'id' => $faker->unique()->numberBetween(1000, 10000),
'user_id' => 1, 'user_id' => 1,

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* ModelFactory.php * ModelFactory.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -23,10 +23,9 @@ declare(strict_types=1);
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
$factory->define( $factory->define(
FireflyIII\Models\Attachment::class, FireflyIII\Models\Attachment::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'user_id' => 1, 'user_id' => 1,
'attachable_id' => 1, 'attachable_id' => 1,
@ -43,7 +42,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\CurrencyExchangeRate::class, FireflyIII\Models\CurrencyExchangeRate::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'user_id' => 1, 'user_id' => 1,
'from_currency_id' => 1, 'from_currency_id' => 1,
@ -57,7 +56,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\TransactionCurrency::class, FireflyIII\Models\TransactionCurrency::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'name' => $faker->words(1, true), 'name' => $faker->words(1, true),
'code' => 'ABC', 'code' => 'ABC',
@ -68,7 +67,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\ImportJob::class, FireflyIII\Models\ImportJob::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->numberBetween(1, 100), 'id' => $faker->numberBetween(1, 100),
'user_id' => 1, 'user_id' => 1,
@ -89,7 +88,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\TransactionJournal::class, FireflyIII\Models\TransactionJournal::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->unique()->numberBetween(1000, 10000), 'id' => $faker->unique()->numberBetween(1000, 10000),
'user_id' => 1, 'user_id' => 1,
@ -111,7 +110,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\Bill::class, FireflyIII\Models\Bill::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'created_at' => new Carbon, 'created_at' => new Carbon,
'updated_at' => new Carbon, 'updated_at' => new Carbon,
@ -131,7 +130,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\PiggyBankRepetition::class, FireflyIII\Models\PiggyBankRepetition::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->unique()->numberBetween(100, 10000), 'id' => $faker->unique()->numberBetween(100, 10000),
'piggy_bank_id' => $faker->numberBetween(1, 10), 'piggy_bank_id' => $faker->numberBetween(1, 10),
@ -144,7 +143,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\PiggyBank::class, FireflyIII\Models\PiggyBank::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->unique()->numberBetween(100, 10000), 'id' => $faker->unique()->numberBetween(100, 10000),
'created_at' => new Carbon, 'created_at' => new Carbon,
@ -162,7 +161,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\Tag::class, FireflyIII\Models\Tag::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->unique()->numberBetween(200, 10000), 'id' => $faker->unique()->numberBetween(200, 10000),
'user_id' => 1, 'user_id' => 1,
@ -174,7 +173,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\Category::class, FireflyIII\Models\Category::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->numberBetween(1, 10), 'id' => $faker->numberBetween(1, 10),
'name' => $faker->words(3, true), 'name' => $faker->words(3, true),
@ -184,7 +183,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\Budget::class, FireflyIII\Models\Budget::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->numberBetween(1, 10), 'id' => $faker->numberBetween(1, 10),
'name' => $faker->words(3, true), 'name' => $faker->words(3, true),
@ -194,7 +193,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\PiggyBankEvent::class, FireflyIII\Models\PiggyBankEvent::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->numberBetween(1, 10), 'id' => $faker->numberBetween(1, 10),
'piggy_bank_id' => $faker->numberBetween(1, 10), 'piggy_bank_id' => $faker->numberBetween(1, 10),
@ -207,7 +206,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\BudgetLimit::class, FireflyIII\Models\BudgetLimit::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'id' => $faker->numberBetween(1, 10), 'id' => $faker->numberBetween(1, 10),
'start_date' => '2017-01-01', 'start_date' => '2017-01-01',
@ -220,7 +219,7 @@ $factory->define(
$factory->define( $factory->define(
FireflyIII\Models\Transaction::class, FireflyIII\Models\Transaction::class,
function (Faker\Generator $faker) { static function (Faker\Generator $faker) {
return [ return [
'transaction_amount' => (string)$faker->randomFloat(2, -100, 100), 'transaction_amount' => (string)$faker->randomFloat(2, -100, 100),
'destination_amount' => (string)$faker->randomFloat(2, -100, 100), 'destination_amount' => (string)$faker->randomFloat(2, -100, 100),

View File

@ -2,7 +2,7 @@
/** /**
* UserFactory.php * UserFactory.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -36,11 +36,11 @@ use Faker\Generator as Faker;
*/ */
$factory->define( $factory->define(
FireflyIII\User::class, function (Faker $faker) { FireflyIII\User::class, static function (Faker $faker) {
return [ return [
'email' => $faker->unique()->safeEmail, 'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10), 'remember_token' => str_random(10),
]; ];
} }
); );

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_06_16_000000_create_support_tables.php * 2016_06_16_000000_create_support_tables.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateSupportTables * Class CreateSupportTables.
*/ */
class CreateSupportTables extends Migration class CreateSupportTables extends Migration
{ {
@ -64,15 +64,12 @@ class CreateSupportTables extends Migration
$this->createConfigurationTable(); $this->createConfigurationTable();
} }
/**
*
*/
private function createAccountTypeTable(): void private function createAccountTypeTable(): void
{ {
if (!Schema::hasTable('account_types')) { if (!Schema::hasTable('account_types')) {
Schema::create( Schema::create(
'account_types', 'account_types',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->string('type', 50); $table->string('type', 50);
@ -89,7 +86,7 @@ class CreateSupportTables extends Migration
if (!Schema::hasTable('configuration')) { if (!Schema::hasTable('configuration')) {
Schema::create( Schema::create(
'configuration', 'configuration',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -101,15 +98,12 @@ class CreateSupportTables extends Migration
} }
} }
/**
*
*/
private function createCurrencyTable(): void private function createCurrencyTable(): void
{ {
if (!Schema::hasTable('transaction_currencies')) { if (!Schema::hasTable('transaction_currencies')) {
Schema::create( Schema::create(
'transaction_currencies', 'transaction_currencies',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -124,15 +118,12 @@ class CreateSupportTables extends Migration
} }
} }
/**
*
*/
private function createJobsTable(): void private function createJobsTable(): void
{ {
if (!Schema::hasTable('jobs')) { if (!Schema::hasTable('jobs')) {
Schema::create( Schema::create(
'jobs', 'jobs',
function (Blueprint $table) { static function (Blueprint $table) {
// straight from Laravel // straight from Laravel
$table->bigIncrements('id'); $table->bigIncrements('id');
$table->string('queue'); $table->string('queue');
@ -148,15 +139,12 @@ class CreateSupportTables extends Migration
} }
} }
/**
*
*/
private function createPasswordTable(): void private function createPasswordTable(): void
{ {
if (!Schema::hasTable('password_resets')) { if (!Schema::hasTable('password_resets')) {
Schema::create( Schema::create(
'password_resets', 'password_resets',
function (Blueprint $table) { static function (Blueprint $table) {
// straight from laravel // straight from laravel
$table->string('email')->index(); $table->string('email')->index();
$table->string('token')->index(); $table->string('token')->index();
@ -166,15 +154,12 @@ class CreateSupportTables extends Migration
} }
} }
/**
*
*/
private function createPermissionRoleTable(): void private function createPermissionRoleTable(): void
{ {
if (!Schema::hasTable('permission_role')) { if (!Schema::hasTable('permission_role')) {
Schema::create( Schema::create(
'permission_role', 'permission_role',
function (Blueprint $table) { static function (Blueprint $table) {
$table->integer('permission_id')->unsigned(); $table->integer('permission_id')->unsigned();
$table->integer('role_id')->unsigned(); $table->integer('role_id')->unsigned();
@ -187,15 +172,12 @@ class CreateSupportTables extends Migration
} }
} }
/**
*
*/
private function createPermissionsTable(): void private function createPermissionsTable(): void
{ {
if (!Schema::hasTable('permissions')) { if (!Schema::hasTable('permissions')) {
Schema::create( Schema::create(
'permissions', 'permissions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->string('name')->unique(); $table->string('name')->unique();
@ -206,15 +188,12 @@ class CreateSupportTables extends Migration
} }
} }
/**
*
*/
private function createRolesTable(): void private function createRolesTable(): void
{ {
if (!Schema::hasTable('roles')) { if (!Schema::hasTable('roles')) {
Schema::create( Schema::create(
'roles', 'roles',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->string('name')->unique(); $table->string('name')->unique();
@ -225,15 +204,12 @@ class CreateSupportTables extends Migration
} }
} }
/**
*
*/
private function createSessionsTable(): void private function createSessionsTable(): void
{ {
if (!Schema::hasTable('sessions')) { if (!Schema::hasTable('sessions')) {
Schema::create( Schema::create(
'sessions', 'sessions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->string('id')->unique(); $table->string('id')->unique();
$table->integer('user_id')->nullable(); $table->integer('user_id')->nullable();
$table->string('ip_address', 45)->nullable(); $table->string('ip_address', 45)->nullable();
@ -245,15 +221,12 @@ class CreateSupportTables extends Migration
} }
} }
/**
*
*/
private function createTransactionTypeTable(): void private function createTransactionTypeTable(): void
{ {
if (!Schema::hasTable('transaction_types')) { if (!Schema::hasTable('transaction_types')) {
Schema::create( Schema::create(
'transaction_types', 'transaction_types',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_06_16_000001_create_users_table.php * 2016_06_16_000001_create_users_table.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateUsersTable * Class CreateUsersTable.
*/ */
class CreateUsersTable extends Migration class CreateUsersTable extends Migration
{ {
@ -46,7 +46,7 @@ class CreateUsersTable extends Migration
if (!Schema::hasTable('users')) { if (!Schema::hasTable('users')) {
Schema::create( Schema::create(
'users', 'users',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->string('email', 255); $table->string('email', 255);

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_06_16_000002_create_main_tables.php * 2016_06_16_000002_create_main_tables.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class CreateMainTables * Class CreateMainTables.
*/ */
class CreateMainTables extends Migration class CreateMainTables extends Migration
{ {
@ -84,15 +84,12 @@ class CreateMainTables extends Migration
$this->createTransactionTables(); $this->createTransactionTables();
} }
/**
*
*/
private function createAccountTables(): void private function createAccountTables(): void
{ {
if (!Schema::hasTable('accounts')) { if (!Schema::hasTable('accounts')) {
Schema::create( Schema::create(
'accounts', 'accounts',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -112,7 +109,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('account_meta')) { if (!Schema::hasTable('account_meta')) {
Schema::create( Schema::create(
'account_meta', 'account_meta',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('account_id', false, true); $table->integer('account_id', false, true);
@ -124,15 +121,12 @@ class CreateMainTables extends Migration
} }
} }
/**
*
*/
private function createAttachmentsTable(): void private function createAttachmentsTable(): void
{ {
if (!Schema::hasTable('attachments')) { if (!Schema::hasTable('attachments')) {
Schema::create( Schema::create(
'attachments', 'attachments',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -155,15 +149,12 @@ class CreateMainTables extends Migration
} }
} }
/**
*
*/
private function createBillsTable(): void private function createBillsTable(): void
{ {
if (!Schema::hasTable('bills')) { if (!Schema::hasTable('bills')) {
Schema::create( Schema::create(
'bills', 'bills',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -195,7 +186,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('budgets')) { if (!Schema::hasTable('budgets')) {
Schema::create( Schema::create(
'budgets', 'budgets',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -210,7 +201,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('budget_limits')) { if (!Schema::hasTable('budget_limits')) {
Schema::create( Schema::create(
'budget_limits', 'budget_limits',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('budget_id', false, true); $table->integer('budget_id', false, true);
@ -225,7 +216,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('limit_repetitions')) { if (!Schema::hasTable('limit_repetitions')) {
Schema::create( Schema::create(
'limit_repetitions', 'limit_repetitions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('budget_limit_id', false, true); $table->integer('budget_limit_id', false, true);
@ -238,15 +229,12 @@ class CreateMainTables extends Migration
} }
} }
/**
*
*/
private function createCategoriesTable(): void private function createCategoriesTable(): void
{ {
if (!Schema::hasTable('categories')) { if (!Schema::hasTable('categories')) {
Schema::create( Schema::create(
'categories', 'categories',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -261,15 +249,12 @@ class CreateMainTables extends Migration
} }
} }
/**
*
*/
private function createExportJobsTable(): void private function createExportJobsTable(): void
{ {
if (!Schema::hasTable('export_jobs')) { if (!Schema::hasTable('export_jobs')) {
Schema::create( Schema::create(
'export_jobs', 'export_jobs',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('user_id', false, true); $table->integer('user_id', false, true);
@ -283,7 +268,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('import_jobs')) { if (!Schema::hasTable('import_jobs')) {
Schema::create( Schema::create(
'import_jobs', 'import_jobs',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('user_id')->unsigned(); $table->integer('user_id')->unsigned();
@ -297,15 +282,12 @@ class CreateMainTables extends Migration
} }
} }
/**
*
*/
private function createPiggyBanksTable(): void private function createPiggyBanksTable(): void
{ {
if (!Schema::hasTable('piggy_banks')) { if (!Schema::hasTable('piggy_banks')) {
Schema::create( Schema::create(
'piggy_banks', 'piggy_banks',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -325,7 +307,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('piggy_bank_repetitions')) { if (!Schema::hasTable('piggy_bank_repetitions')) {
Schema::create( Schema::create(
'piggy_bank_repetitions', 'piggy_bank_repetitions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('piggy_bank_id', false, true); $table->integer('piggy_bank_id', false, true);
@ -338,15 +320,12 @@ class CreateMainTables extends Migration
} }
} }
/**
*
*/
private function createPreferencesTable(): void private function createPreferencesTable(): void
{ {
if (!Schema::hasTable('preferences')) { if (!Schema::hasTable('preferences')) {
Schema::create( Schema::create(
'preferences', 'preferences',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('user_id', false, true); $table->integer('user_id', false, true);
@ -359,15 +338,12 @@ class CreateMainTables extends Migration
} }
} }
/**
*
*/
private function createRoleTable(): void private function createRoleTable(): void
{ {
if (!Schema::hasTable('role_user')) { if (!Schema::hasTable('role_user')) {
Schema::create( Schema::create(
'role_user', 'role_user',
function (Blueprint $table) { static function (Blueprint $table) {
$table->integer('user_id', false, true); $table->integer('user_id', false, true);
$table->integer('role_id', false, true); $table->integer('role_id', false, true);
@ -389,7 +365,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('rule_groups')) { if (!Schema::hasTable('rule_groups')) {
Schema::create( Schema::create(
'rule_groups', 'rule_groups',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -407,7 +383,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('rules')) { if (!Schema::hasTable('rules')) {
Schema::create( Schema::create(
'rules', 'rules',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -430,7 +406,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('rule_actions')) { if (!Schema::hasTable('rule_actions')) {
Schema::create( Schema::create(
'rule_actions', 'rule_actions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('rule_id', false, true); $table->integer('rule_id', false, true);
@ -450,7 +426,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('rule_triggers')) { if (!Schema::hasTable('rule_triggers')) {
Schema::create( Schema::create(
'rule_triggers', 'rule_triggers',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('rule_id', false, true); $table->integer('rule_id', false, true);
@ -469,15 +445,12 @@ class CreateMainTables extends Migration
} }
} }
/**
*
*/
private function createTagsTable(): void private function createTagsTable(): void
{ {
if (!Schema::hasTable('tags')) { if (!Schema::hasTable('tags')) {
Schema::create( Schema::create(
'tags', 'tags',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -508,7 +481,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('transaction_journals')) { if (!Schema::hasTable('transaction_journals')) {
Schema::create( Schema::create(
'transaction_journals', 'transaction_journals',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -536,7 +509,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('journal_meta')) { if (!Schema::hasTable('journal_meta')) {
Schema::create( Schema::create(
'journal_meta', 'journal_meta',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('transaction_journal_id', false, true); $table->integer('transaction_journal_id', false, true);
@ -551,7 +524,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('tag_transaction_journal')) { if (!Schema::hasTable('tag_transaction_journal')) {
Schema::create( Schema::create(
'tag_transaction_journal', 'tag_transaction_journal',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('tag_id', false, true); $table->integer('tag_id', false, true);
$table->integer('transaction_journal_id', false, true); $table->integer('transaction_journal_id', false, true);
@ -567,7 +540,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('budget_transaction_journal')) { if (!Schema::hasTable('budget_transaction_journal')) {
Schema::create( Schema::create(
'budget_transaction_journal', 'budget_transaction_journal',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('budget_id', false, true); $table->integer('budget_id', false, true);
$table->integer('transaction_journal_id', false, true); $table->integer('transaction_journal_id', false, true);
@ -580,7 +553,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('category_transaction_journal')) { if (!Schema::hasTable('category_transaction_journal')) {
Schema::create( Schema::create(
'category_transaction_journal', 'category_transaction_journal',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('category_id', false, true); $table->integer('category_id', false, true);
$table->integer('transaction_journal_id', false, true); $table->integer('transaction_journal_id', false, true);
@ -593,7 +566,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('piggy_bank_events')) { if (!Schema::hasTable('piggy_bank_events')) {
Schema::create( Schema::create(
'piggy_bank_events', 'piggy_bank_events',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('piggy_bank_id', false, true); $table->integer('piggy_bank_id', false, true);
@ -610,7 +583,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('transactions')) { if (!Schema::hasTable('transactions')) {
Schema::create( Schema::create(
'transactions', 'transactions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -628,7 +601,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('budget_transaction')) { if (!Schema::hasTable('budget_transaction')) {
Schema::create( Schema::create(
'budget_transaction', 'budget_transaction',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('budget_id', false, true); $table->integer('budget_id', false, true);
$table->integer('transaction_id', false, true); $table->integer('transaction_id', false, true);
@ -642,7 +615,7 @@ class CreateMainTables extends Migration
if (!Schema::hasTable('category_transaction')) { if (!Schema::hasTable('category_transaction')) {
Schema::create( Schema::create(
'category_transaction', 'category_transaction',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('category_id', false, true); $table->integer('category_id', false, true);
$table->integer('transaction_id', false, true); $table->integer('transaction_id', false, true);

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_08_25_091522_changes_for_3101.php * 2016_08_25_091522_changes_for_3101.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesFor3101 * Class ChangesFor3101.
*/ */
class ChangesFor3101 extends Migration class ChangesFor3101 extends Migration
{ {

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_09_12_121359_fix_nullables.php * 2016_09_12_121359_fix_nullables.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class FixNullables * Class FixNullables.
*/ */
class FixNullables extends Migration class FixNullables extends Migration
{ {
@ -44,14 +44,14 @@ class FixNullables extends Migration
{ {
Schema::table( Schema::table(
'rule_groups', 'rule_groups',
function (Blueprint $table) { static function (Blueprint $table) {
$table->text('description')->nullable()->change(); $table->text('description')->nullable()->change();
} }
); );
Schema::table( Schema::table(
'rules', 'rules',
function (Blueprint $table) { static function (Blueprint $table) {
$table->text('description')->nullable()->change(); $table->text('description')->nullable()->change();
} }
); );

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_10_09_150037_expand_transactions_table.php * 2016_10_09_150037_expand_transactions_table.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ExpandTransactionsTable * Class ExpandTransactionsTable.
*/ */
class ExpandTransactionsTable extends Migration class ExpandTransactionsTable extends Migration
{ {
@ -35,7 +35,7 @@ class ExpandTransactionsTable extends Migration
{ {
Schema::table( Schema::table(
'transactions', 'transactions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('identifier'); $table->dropColumn('identifier');
} }
); );
@ -50,7 +50,7 @@ class ExpandTransactionsTable extends Migration
{ {
Schema::table( Schema::table(
'transactions', 'transactions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->smallInteger('identifier', false, true)->default(0); $table->smallInteger('identifier', false, true)->default(0);
} }
); );

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_10_22_075804_changes_for_v410.php * 2016_10_22_075804_changes_for_v410.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV410 * Class ChangesForV410.
*/ */
class ChangesForV410 extends Migration class ChangesForV410 extends Migration
{ {
@ -45,7 +45,7 @@ class ChangesForV410 extends Migration
{ {
Schema::create( Schema::create(
'notes', 'notes',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_11_24_210552_changes_for_v420.php * 2016_11_24_210552_changes_for_v420.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV420 * Class ChangesForV420.
*/ */
class ChangesForV420 extends Migration class ChangesForV420 extends Migration
{ {
@ -35,7 +35,7 @@ class ChangesForV420 extends Migration
{ {
Schema::table( Schema::table(
'journal_meta', 'journal_meta',
function (Blueprint $table) { static function (Blueprint $table) {
$table->dropSoftDeletes(); $table->dropSoftDeletes();
} }
); );
@ -50,7 +50,7 @@ class ChangesForV420 extends Migration
{ {
Schema::table( Schema::table(
'journal_meta', 'journal_meta',
function (Blueprint $table) { static function (Blueprint $table) {
$table->softDeletes(); $table->softDeletes();
} }
); );

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_12_22_150431_changes_for_v430.php * 2016_12_22_150431_changes_for_v430.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV430 * Class ChangesForV430.
*/ */
class ChangesForV430 extends Migration class ChangesForV430 extends Migration
{ {
@ -45,7 +45,7 @@ class ChangesForV430 extends Migration
{ {
Schema::create( Schema::create(
'available_budgets', 'available_budgets',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2016_12_28_203205_changes_for_v431.php * 2016_12_28_203205_changes_for_v431.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV431 * Class ChangesForV431.
*/ */
class ChangesForV431 extends Migration class ChangesForV431 extends Migration
{ {
@ -36,13 +36,13 @@ class ChangesForV431 extends Migration
// reinstate "repeats" and "repeat_freq". // reinstate "repeats" and "repeat_freq".
Schema::table( Schema::table(
'budget_limits', 'budget_limits',
function (Blueprint $table) { static function (Blueprint $table) {
$table->string('repeat_freq', 30)->nullable(); $table->string('repeat_freq', 30)->nullable();
} }
); );
Schema::table( Schema::table(
'budget_limits', 'budget_limits',
function (Blueprint $table) { static function (Blueprint $table) {
$table->boolean('repeats')->default(0); $table->boolean('repeats')->default(0);
} }
); );
@ -50,7 +50,7 @@ class ChangesForV431 extends Migration
// change field "start_date" to "startdate" // change field "start_date" to "startdate"
Schema::table( Schema::table(
'budget_limits', 'budget_limits',
function (Blueprint $table) { static function (Blueprint $table) {
$table->renameColumn('start_date', 'startdate'); $table->renameColumn('start_date', 'startdate');
} }
); );
@ -58,14 +58,14 @@ class ChangesForV431 extends Migration
// remove date field "end_date" // remove date field "end_date"
Schema::table( Schema::table(
'budget_limits', 'budget_limits',
function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('end_date'); $table->dropColumn('end_date');
} }
); );
// remove decimal places // remove decimal places
Schema::table( Schema::table(
'transaction_currencies', 'transaction_currencies',
function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('decimal_places'); $table->dropColumn('decimal_places');
} }
); );

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2017_04_13_163623_changes_for_v440.php * 2017_04_13_163623_changes_for_v440.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV440 * Class ChangesForV440.
*/ */
class ChangesForV440 extends Migration class ChangesForV440 extends Migration
{ {
@ -83,8 +83,8 @@ class ChangesForV440 extends Migration
'transactions', 'transactions',
static function (Blueprint $table) { static function (Blueprint $table) {
if (!Schema::hasColumn('transactions', 'transaction_currency_id')) { if (!Schema::hasColumn('transactions', 'transaction_currency_id')) {
$table->integer('transaction_currency_id', false, true)->after('description')->nullable(); $table->integer('transaction_currency_id', false, true)->after('description')->nullable();
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null'); $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
} }
} }
); );

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2017_06_02_105232_changes_for_v450.php * 2017_06_02_105232_changes_for_v450.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV450 * Class ChangesForV450.
*/ */
class ChangesForV450 extends Migration class ChangesForV450 extends Migration
{ {
@ -38,7 +38,6 @@ class ChangesForV450 extends Migration
'transactions', 'transactions',
static function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('foreign_amount'); $table->dropColumn('foreign_amount');
} }
); );
@ -70,7 +69,7 @@ class ChangesForV450 extends Migration
// add "foreign_amount" to transactions // add "foreign_amount" to transactions
Schema::table( Schema::table(
'transactions', 'transactions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->decimal('foreign_amount', 22, 12)->nullable()->after('amount'); $table->decimal('foreign_amount', 22, 12)->nullable()->after('amount');
} }
); );
@ -78,7 +77,7 @@ class ChangesForV450 extends Migration
// add foreign transaction currency id to transactions (is nullable): // add foreign transaction currency id to transactions (is nullable):
Schema::table( Schema::table(
'transactions', 'transactions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->integer('foreign_currency_id', false, true)->default(null)->after('foreign_amount')->nullable(); $table->integer('foreign_currency_id', false, true)->default(null)->after('foreign_amount')->nullable();
$table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null'); $table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
} }

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2017_08_20_062014_changes_for_v470.php * 2017_08_20_062014_changes_for_v470.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -25,7 +25,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV470 * Class ChangesForV470.
*/ */
class ChangesForV470 extends Migration class ChangesForV470 extends Migration
{ {
@ -48,7 +48,7 @@ class ChangesForV470 extends Migration
if (!Schema::hasTable('link_types')) { if (!Schema::hasTable('link_types')) {
Schema::create( Schema::create(
'link_types', 'link_types',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
@ -65,7 +65,7 @@ class ChangesForV470 extends Migration
if (!Schema::hasTable('journal_links')) { if (!Schema::hasTable('journal_links')) {
Schema::create( Schema::create(
'journal_links', 'journal_links',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->integer('link_type_id', false, true); $table->integer('link_type_id', false, true);

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2017_11_04_170844_changes_for_v470a.php * 2017_11_04_170844_changes_for_v470a.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -25,7 +25,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV470a * Class ChangesForV470a.
*/ */
class ChangesForV470a extends Migration class ChangesForV470a extends Migration
{ {
@ -36,7 +36,7 @@ class ChangesForV470a extends Migration
{ {
Schema::table( Schema::table(
'transactions', 'transactions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('reconciled'); $table->dropColumn('reconciled');
} }
); );
@ -51,7 +51,7 @@ class ChangesForV470a extends Migration
{ {
Schema::table( Schema::table(
'transactions', 'transactions',
function (Blueprint $table) { static function (Blueprint $table) {
$table->boolean('reconciled')->after('deleted_at')->default(0); $table->boolean('reconciled')->after('deleted_at')->default(0);
} }
); );

View File

@ -2,7 +2,7 @@
/** /**
* 2018_01_01_000001_create_oauth_auth_codes_table.php * 2018_01_01_000001_create_oauth_auth_codes_table.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class CreateOauthAuthCodesTable * Class CreateOauthAuthCodesTable.
*/ */
class CreateOauthAuthCodesTable extends Migration class CreateOauthAuthCodesTable extends Migration
{ {
@ -46,14 +46,14 @@ class CreateOauthAuthCodesTable extends Migration
public function up(): void public function up(): void
{ {
Schema::create( Schema::create(
'oauth_auth_codes', function (Blueprint $table) { 'oauth_auth_codes', static function (Blueprint $table) {
$table->string('id', 100)->primary(); $table->string('id', 100)->primary();
$table->integer('user_id'); $table->integer('user_id');
$table->integer('client_id'); $table->integer('client_id');
$table->text('scopes')->nullable(); $table->text('scopes')->nullable();
$table->boolean('revoked'); $table->boolean('revoked');
$table->dateTime('expires_at')->nullable(); $table->dateTime('expires_at')->nullable();
} }
); );
} }
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2018_01_01_000002_create_oauth_access_tokens_table.php * 2018_01_01_000002_create_oauth_access_tokens_table.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class CreateOauthAccessTokensTable * Class CreateOauthAccessTokensTable.
*/ */
class CreateOauthAccessTokensTable extends Migration class CreateOauthAccessTokensTable extends Migration
{ {
@ -46,16 +46,16 @@ class CreateOauthAccessTokensTable extends Migration
public function up(): void public function up(): void
{ {
Schema::create( Schema::create(
'oauth_access_tokens', function (Blueprint $table) { 'oauth_access_tokens', static function (Blueprint $table) {
$table->string('id', 100)->primary(); $table->string('id', 100)->primary();
$table->integer('user_id')->index()->nullable(); $table->integer('user_id')->index()->nullable();
$table->integer('client_id'); $table->integer('client_id');
$table->string('name')->nullable(); $table->string('name')->nullable();
$table->text('scopes')->nullable(); $table->text('scopes')->nullable();
$table->boolean('revoked'); $table->boolean('revoked');
$table->timestamps(); $table->timestamps();
$table->dateTime('expires_at')->nullable(); $table->dateTime('expires_at')->nullable();
} }
); );
} }
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2018_01_01_000003_create_oauth_refresh_tokens_table.php * 2018_01_01_000003_create_oauth_refresh_tokens_table.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class CreateOauthRefreshTokensTable * Class CreateOauthRefreshTokensTable.
*/ */
class CreateOauthRefreshTokensTable extends Migration class CreateOauthRefreshTokensTable extends Migration
{ {
@ -46,12 +46,12 @@ class CreateOauthRefreshTokensTable extends Migration
public function up(): void public function up(): void
{ {
Schema::create( Schema::create(
'oauth_refresh_tokens', function (Blueprint $table) { 'oauth_refresh_tokens', static function (Blueprint $table) {
$table->string('id', 100)->primary(); $table->string('id', 100)->primary();
$table->string('access_token_id', 100)->index(); $table->string('access_token_id', 100)->index();
$table->boolean('revoked'); $table->boolean('revoked');
$table->dateTime('expires_at')->nullable(); $table->dateTime('expires_at')->nullable();
} }
); );
} }
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2018_01_01_000004_create_oauth_clients_table.php * 2018_01_01_000004_create_oauth_clients_table.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class CreateOauthClientsTable * Class CreateOauthClientsTable.
*/ */
class CreateOauthClientsTable extends Migration class CreateOauthClientsTable extends Migration
{ {
@ -46,17 +46,17 @@ class CreateOauthClientsTable extends Migration
public function up(): void public function up(): void
{ {
Schema::create( Schema::create(
'oauth_clients', function (Blueprint $table) { 'oauth_clients', static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('user_id')->index()->nullable(); $table->integer('user_id')->index()->nullable();
$table->string('name'); $table->string('name');
$table->string('secret', 100); $table->string('secret', 100);
$table->text('redirect'); $table->text('redirect');
$table->boolean('personal_access_client'); $table->boolean('personal_access_client');
$table->boolean('password_client'); $table->boolean('password_client');
$table->boolean('revoked'); $table->boolean('revoked');
$table->timestamps(); $table->timestamps();
} }
); );
} }
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2018_01_01_000005_create_oauth_personal_access_clients_table.php * 2018_01_01_000005_create_oauth_personal_access_clients_table.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class CreateOauthPersonalAccessClientsTable * Class CreateOauthPersonalAccessClientsTable.
*/ */
class CreateOauthPersonalAccessClientsTable extends Migration class CreateOauthPersonalAccessClientsTable extends Migration
{ {
@ -37,7 +37,6 @@ class CreateOauthPersonalAccessClientsTable extends Migration
public function down(): void public function down(): void
{ {
Schema::drop('oauth_personal_access_clients'); Schema::drop('oauth_personal_access_clients');
} }
/** /**
@ -47,11 +46,11 @@ class CreateOauthPersonalAccessClientsTable extends Migration
public function up(): void public function up(): void
{ {
Schema::create( Schema::create(
'oauth_personal_access_clients', function (Blueprint $table) { 'oauth_personal_access_clients', static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('client_id')->index(); $table->integer('client_id')->index();
$table->timestamps(); $table->timestamps();
} }
); );
} }
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2018_03_19_141348_changes_for_v472.php * 2018_03_19_141348_changes_for_v472.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -26,7 +26,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV472 * Class ChangesForV472.
*/ */
class ChangesForV472 extends Migration class ChangesForV472 extends Migration
{ {
@ -39,13 +39,13 @@ class ChangesForV472 extends Migration
{ {
Schema::table( Schema::table(
'attachments', 'attachments',
function (Blueprint $table) { static function (Blueprint $table) {
$table->text('notes')->nullable(); $table->text('notes')->nullable();
} }
); );
Schema::table( Schema::table(
'budgets', 'budgets',
function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('order'); $table->dropColumn('order');
} }
); );
@ -61,14 +61,14 @@ class ChangesForV472 extends Migration
{ {
Schema::table( Schema::table(
'attachments', 'attachments',
function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('notes'); $table->dropColumn('notes');
} }
); );
Schema::table( Schema::table(
'budgets', 'budgets',
function (Blueprint $table) { static function (Blueprint $table) {
$table->mediumInteger('order', false, true)->default(0); $table->mediumInteger('order', false, true)->default(0);
} }
); );

View File

@ -2,7 +2,7 @@
/** /**
* 2018_04_07_210913_changes_for_v473.php * 2018_04_07_210913_changes_for_v473.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV473 * Class ChangesForV473.
*/ */
class ChangesForV473 extends Migration class ChangesForV473 extends Migration
{ {
@ -40,7 +40,7 @@ class ChangesForV473 extends Migration
{ {
Schema::table( Schema::table(
'bills', 'bills',
function (Blueprint $table) { static function (Blueprint $table) {
// cannot drop foreign keys in SQLite: // cannot drop foreign keys in SQLite:
if ('sqlite' !== config('database.default')) { if ('sqlite' !== config('database.default')) {
@ -50,10 +50,9 @@ class ChangesForV473 extends Migration
} }
); );
Schema::table( Schema::table(
'rules', 'rules',
function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('strict'); $table->dropColumn('strict');
} }
); );
@ -69,14 +68,14 @@ class ChangesForV473 extends Migration
{ {
Schema::table( Schema::table(
'bills', 'bills',
function (Blueprint $table) { static function (Blueprint $table) {
$table->integer('transaction_currency_id', false, true)->nullable()->after('user_id'); $table->integer('transaction_currency_id', false, true)->nullable()->after('user_id');
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null'); $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
} }
); );
Schema::table( Schema::table(
'rules', 'rules',
function (Blueprint $table) { static function (Blueprint $table) {
$table->boolean('strict')->default(true); $table->boolean('strict')->default(true);
} }
); );

View File

@ -2,7 +2,7 @@
/** /**
* 2018_04_29_174524_changes_for_v474.php * 2018_04_29_174524_changes_for_v474.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -26,7 +26,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV474 * Class ChangesForV474.
*/ */
class ChangesForV474 extends Migration class ChangesForV474 extends Migration
{ {
@ -54,7 +54,6 @@ class ChangesForV474 extends Migration
'import_jobs', 'import_jobs',
static function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('provider'); $table->dropColumn('provider');
} }
); );
@ -62,7 +61,6 @@ class ChangesForV474 extends Migration
'import_jobs', 'import_jobs',
static function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('stage'); $table->dropColumn('stage');
} }
); );
@ -70,7 +68,6 @@ class ChangesForV474 extends Migration
'import_jobs', 'import_jobs',
static function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('transactions'); $table->dropColumn('transactions');
} }
); );
@ -78,7 +75,6 @@ class ChangesForV474 extends Migration
'import_jobs', 'import_jobs',
static function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('errors'); $table->dropColumn('errors');
} }
); );
@ -86,7 +82,6 @@ class ChangesForV474 extends Migration
'import_jobs', 'import_jobs',
static function (Blueprint $table) { static function (Blueprint $table) {
$table->dropColumn('tag_id'); $table->dropColumn('tag_id');
} }
); );
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2018_06_08_200526_changes_for_v475.php * 2018_06_08_200526_changes_for_v475.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -26,8 +26,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* * Class ChangesForV475.
* Class ChangesForV475
*/ */
class ChangesForV475 extends Migration class ChangesForV475 extends Migration
{ {
@ -55,97 +54,93 @@ class ChangesForV475 extends Migration
public function up(): void public function up(): void
{ {
Schema::create( Schema::create(
'recurrences', function (Blueprint $table) { 'recurrences', static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->integer('user_id', false, true); $table->integer('user_id', false, true);
$table->integer('transaction_type_id', false, true); $table->integer('transaction_type_id', false, true);
$table->string('title', 1024); $table->string('title', 1024);
$table->text('description'); $table->text('description');
$table->date('first_date'); $table->date('first_date');
$table->date('repeat_until')->nullable(); $table->date('repeat_until')->nullable();
$table->date('latest_date')->nullable(); $table->date('latest_date')->nullable();
$table->smallInteger('repetitions', false, true); $table->smallInteger('repetitions', false, true);
$table->boolean('apply_rules')->default(true); $table->boolean('apply_rules')->default(true);
$table->boolean('active')->default(true); $table->boolean('active')->default(true);
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->foreign('transaction_type_id')->references('id')->on('transaction_types')->onDelete('cascade'); $table->foreign('transaction_type_id')->references('id')->on('transaction_types')->onDelete('cascade');
} }
); );
Schema::create( Schema::create(
'recurrences_transactions', function (Blueprint $table) { 'recurrences_transactions', static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->integer('recurrence_id', false, true); $table->integer('recurrence_id', false, true);
$table->integer('transaction_currency_id', false, true); $table->integer('transaction_currency_id', false, true);
$table->integer('foreign_currency_id', false, true)->nullable(); $table->integer('foreign_currency_id', false, true)->nullable();
$table->integer('source_id', false, true); $table->integer('source_id', false, true);
$table->integer('destination_id', false, true); $table->integer('destination_id', false, true);
$table->decimal('amount', 22, 12); $table->decimal('amount', 22, 12);
$table->decimal('foreign_amount', 22, 12)->nullable(); $table->decimal('foreign_amount', 22, 12)->nullable();
$table->string('description', 1024); $table->string('description', 1024);
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade'); $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade'); $table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
$table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null'); $table->foreign('source_id')->references('id')->on('accounts')->onDelete('cascade');
$table->foreign('source_id')->references('id')->on('accounts')->onDelete('cascade'); $table->foreign('destination_id')->references('id')->on('accounts')->onDelete('cascade');
$table->foreign('destination_id')->references('id')->on('accounts')->onDelete('cascade'); }
}
);
Schema::create(
'recurrences_repetitions', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->softDeletes();
$table->integer('recurrence_id', false, true);
$table->string('repetition_type', 50);
$table->string('repetition_moment', 50);
$table->smallInteger('repetition_skip', false, true);
$table->smallInteger('weekend', false, true);
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
}
); );
Schema::create( Schema::create(
'recurrences_meta', function (Blueprint $table) { 'recurrences_repetitions', static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->integer('recurrence_id', false, true); $table->integer('recurrence_id', false, true);
$table->string('repetition_type', 50);
$table->string('repetition_moment', 50);
$table->smallInteger('repetition_skip', false, true);
$table->smallInteger('weekend', false, true);
$table->string('name', 50); $table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
$table->text('value'); }
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
}
); );
Schema::create( Schema::create(
'rt_meta', function (Blueprint $table) { 'recurrences_meta', static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->integer('rt_id', false, true); $table->integer('recurrence_id', false, true);
$table->string('name', 50); $table->string('name', 50);
$table->text('value'); $table->text('value');
$table->foreign('rt_id')->references('id')->on('recurrences_transactions')->onDelete('cascade'); $table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
} }
); );
Schema::create(
'rt_meta', static function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->softDeletes();
$table->integer('rt_id', false, true);
$table->string('name', 50);
$table->text('value');
$table->foreign('rt_id')->references('id')->on('recurrences_transactions')->onDelete('cascade');
}
);
} }
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2018_09_05_195147_changes_for_v477.php * 2018_09_05_195147_changes_for_v477.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -26,8 +26,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* * Class ChangesForV477.
* Class ChangesForV477
*/ */
class ChangesForV477 extends Migration class ChangesForV477 extends Migration
{ {
@ -39,15 +38,15 @@ class ChangesForV477 extends Migration
public function down(): void public function down(): void
{ {
Schema::table( Schema::table(
'budget_limits', function (Blueprint $table) { 'budget_limits', static function (Blueprint $table) {
// cannot drop foreign keys in SQLite: // cannot drop foreign keys in SQLite:
if ('sqlite' !== config('database.default')) { if ('sqlite' !== config('database.default')) {
$table->dropForeign('budget_limits_transaction_currency_id_foreign'); $table->dropForeign('budget_limits_transaction_currency_id_foreign');
} }
$table->dropColumn(['transaction_currency_id']); $table->dropColumn(['transaction_currency_id']);
} }
); );
} }
@ -61,7 +60,7 @@ class ChangesForV477 extends Migration
{ {
Schema::table( Schema::table(
'budget_limits', 'budget_limits',
function (Blueprint $table) { static function (Blueprint $table) {
$table->integer('transaction_currency_id', false, true)->nullable()->after('budget_id'); $table->integer('transaction_currency_id', false, true)->nullable()->after('budget_id');
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null'); $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2018_11_06_172532_changes_for_v479.php * 2018_11_06_172532_changes_for_v479.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -26,7 +26,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV479 * Class ChangesForV479.
*/ */
class ChangesForV479 extends Migration class ChangesForV479 extends Migration
{ {
@ -38,9 +38,9 @@ class ChangesForV479 extends Migration
public function down() public function down()
{ {
Schema::table( Schema::table(
'transaction_currencies', function (Blueprint $table) { 'transaction_currencies', static function (Blueprint $table) {
$table->dropColumn(['enabled']); $table->dropColumn(['enabled']);
} }
); );
} }
@ -54,7 +54,7 @@ class ChangesForV479 extends Migration
{ {
Schema::table( Schema::table(
'transaction_currencies', 'transaction_currencies',
function (Blueprint $table) { static function (Blueprint $table) {
$table->boolean('enabled')->default(0)->after('deleted_at'); $table->boolean('enabled')->default(0)->after('deleted_at');
} }
); );

View File

@ -2,7 +2,7 @@
/** /**
* 2019_01_28_193833_changes_for_v4710.php * 2019_01_28_193833_changes_for_v4710.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -49,23 +49,22 @@ class ChangesForV4710 extends Migration
{ {
if (!Schema::hasTable('transaction_groups')) { if (!Schema::hasTable('transaction_groups')) {
Schema::create( Schema::create(
'transaction_groups', function (Blueprint $table) { 'transaction_groups', static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->integer('user_id', false, true); $table->integer('user_id', false, true);
$table->string('title', 1024)->nullable(); $table->string('title', 1024)->nullable();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); }
}
); );
} }
if (!Schema::hasTable('group_journals')) { if (!Schema::hasTable('group_journals')) {
Schema::create( Schema::create(
'group_journals', 'group_journals',
function (Blueprint $table) { static function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->integer('transaction_group_id', false, true); $table->integer('transaction_group_id', false, true);
$table->integer('transaction_journal_id', false, true); $table->integer('transaction_journal_id', false, true);
@ -78,6 +77,5 @@ class ChangesForV4710 extends Migration
} }
); );
} }
} }
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2019_02_05_055516_changes_for_v4711.php * 2019_02_05_055516_changes_for_v4711.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -55,15 +55,15 @@ class ChangesForV4711 extends Migration
* nice. * nice.
*/ */
Schema::table( Schema::table(
'transaction_journals', function (Blueprint $table) { 'transaction_journals', static function (Blueprint $table) {
$table->dateTime('date')->change(); $table->dateTime('date')->change();
} }
); );
Schema::table( Schema::table(
'preferences', function (Blueprint $table) { 'preferences', static function (Blueprint $table) {
$table->text('data')->nullable()->change(); $table->text('data')->nullable()->change();
} }
); );
} }
} }

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2019_02_11_170529_changes_for_v4712.php * 2019_02_11_170529_changes_for_v4712.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -26,7 +26,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class ChangesForV4712 * Class ChangesForV4712.
*/ */
class ChangesForV4712 extends Migration class ChangesForV4712 extends Migration
{ {
@ -57,9 +57,9 @@ class ChangesForV4712 extends Migration
* nice. * nice.
*/ */
Schema::table( Schema::table(
'transaction_journals', function (Blueprint $table) { 'transaction_journals', static function (Blueprint $table) {
$table->dateTime('date')->change(); $table->dateTime('date')->change();
} }
); );
} }
} }

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2019_03_11_223700_fix_ldap_configuration.php * 2019_03_11_223700_fix_ldap_configuration.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,13 +21,12 @@
declare(strict_types=1); declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class FixLdapConfiguration * Class FixLdapConfiguration.
*/ */
class FixLdapConfiguration extends Migration class FixLdapConfiguration extends Migration
{ {
@ -39,9 +38,9 @@ class FixLdapConfiguration extends Migration
public function down(): void public function down(): void
{ {
Schema::table( Schema::table(
'users', function (Blueprint $table) { 'users', static function (Blueprint $table) {
$table->dropColumn(['objectguid']); $table->dropColumn(['objectguid']);
} }
); );
} }
@ -58,9 +57,9 @@ class FixLdapConfiguration extends Migration
* now. To support this, we add the column. * now. To support this, we add the column.
*/ */
Schema::table( Schema::table(
'users', function (Blueprint $table) { 'users', static function (Blueprint $table) {
$table->uuid('objectguid')->nullable()->after('id'); $table->uuid('objectguid')->nullable()->after('id');
} }
); );
} }
} }

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* 2019_03_22_183214_changes_for_v480.php * 2019_03_22_183214_changes_for_v480.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,12 +21,11 @@
declare(strict_types=1); declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV480 * Class ChangesForV480.
*/ */
class ChangesForV480 extends Migration class ChangesForV480 extends Migration
{ {
@ -39,7 +38,7 @@ class ChangesForV480 extends Migration
{ {
Schema::table( Schema::table(
'transaction_journals', 'transaction_journals',
function (Blueprint $table) { static function (Blueprint $table) {
// drop transaction_group_id + foreign key. // drop transaction_group_id + foreign key.
// cannot drop foreign keys in SQLite: // cannot drop foreign keys in SQLite:
if ('sqlite' !== config('database.default')) { if ('sqlite' !== config('database.default')) {
@ -50,14 +49,14 @@ class ChangesForV480 extends Migration
); );
Schema::table( Schema::table(
'rule_groups', static function (Blueprint $table) { 'rule_groups', static function (Blueprint $table) {
$table->dropColumn('stop_processing'); $table->dropColumn('stop_processing');
} }
); );
Schema::table( Schema::table(
'users', static function (Blueprint $table) { 'users', static function (Blueprint $table) {
$table->dropColumn('mfa_secret'); $table->dropColumn('mfa_secret');
} }
); );
} }
@ -69,11 +68,9 @@ class ChangesForV480 extends Migration
*/ */
public function up(): void public function up(): void
{ {
Schema::table( Schema::table(
'transaction_journals', 'transaction_journals',
static function (Blueprint $table) { static function (Blueprint $table) {
$table->integer('transaction_currency_id', false, true)->nullable()->change(); $table->integer('transaction_currency_id', false, true)->nullable()->change();
// add column "group_id" after "transaction_type_id" // add column "group_id" after "transaction_type_id"
@ -86,13 +83,13 @@ class ChangesForV480 extends Migration
); );
Schema::table( Schema::table(
'rule_groups', static function (Blueprint $table) { 'rule_groups', static function (Blueprint $table) {
$table->boolean('stop_processing')->default(false); $table->boolean('stop_processing')->default(false);
} }
); );
Schema::table( Schema::table(
'users', static function (Blueprint $table) { 'users', static function (Blueprint $table) {
$table->string('mfa_secret', 50)->nullable(); $table->string('mfa_secret', 50)->nullable();
} }
); );
} }
} }

View File

@ -2,7 +2,7 @@
/** /**
* 2019_12_28_191351_make_locations_table.php * 2019_12_28_191351_make_locations_table.php
* Copyright (c) 2020 james@firefly-iii.org * Copyright (c) 2020 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/** /**
* Class MakeLocationsTable * Class MakeLocationsTable.
*/ */
class MakeLocationsTable extends Migration class MakeLocationsTable extends Migration
{ {
@ -50,17 +50,17 @@ class MakeLocationsTable extends Migration
{ {
Schema::create( Schema::create(
'locations', static function (Blueprint $table) { 'locations', static function (Blueprint $table) {
$table->bigIncrements('id'); $table->bigIncrements('id');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->integer('locatable_id', false, true); $table->integer('locatable_id', false, true);
$table->string('locatable_type', 255); $table->string('locatable_type', 255);
$table->decimal('latitude', 24, 12)->nullable(); $table->decimal('latitude', 24, 12)->nullable();
$table->decimal('longitude', 24, 12)->nullable(); $table->decimal('longitude', 24, 12)->nullable();
$table->smallInteger('zoom_level', false, true)->nullable(); $table->smallInteger('zoom_level', false, true)->nullable();
} }
); );
} }
} }

View File

@ -1,10 +1,12 @@
<?php <?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
/** /**
* Class ChangesForV520 * Class ChangesForV520.
*/ */
class ChangesForV520 extends Migration class ChangesForV520 extends Migration
{ {
@ -38,7 +40,6 @@ class ChangesForV520 extends Migration
$table->decimal('amount', 22, 12); $table->decimal('amount', 22, 12);
$table->string('period', 50); $table->string('period', 50);
//$table->string('password', 60); //$table->string('password', 60);
//$table->string('remember_token', 100)->nullable(); //$table->string('remember_token', 100)->nullable();
//$table->string('reset', 32)->nullable(); //$table->string('reset', 32)->nullable();

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* AccountTypeSeeder.php * AccountTypeSeeder.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use FireflyIII\Models\AccountType;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
/** /**
* Class AccountTypeSeeder * Class AccountTypeSeeder.
*/ */
class AccountTypeSeeder extends Seeder class AccountTypeSeeder extends Seeder
{ {

View File

@ -1,9 +1,10 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* ConfigSeeder.php * ConfigSeeder.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -25,7 +26,7 @@ use FireflyIII\Models\Configuration;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
/** /**
* Class ConfigSeeder * Class ConfigSeeder.
*/ */
class ConfigSeeder extends Seeder class ConfigSeeder extends Seeder
{ {

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* DatabaseSeeder.php * DatabaseSeeder.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -23,7 +23,7 @@ declare(strict_types=1);
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
/** /**
* Class DatabaseSeeder * Class DatabaseSeeder.
*/ */
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
{ {

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* LinkTypeSeeder.php * LinkTypeSeeder.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,13 +24,10 @@ use FireflyIII\Models\LinkType;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
/** /**
* Class LinkTypeSeeder * Class LinkTypeSeeder.
*/ */
class LinkTypeSeeder extends Seeder class LinkTypeSeeder extends Seeder
{ {
/**
*
*/
public function run() public function run()
{ {
$types = [ $types = [

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* PermissionSeeder.php * PermissionSeeder.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use FireflyIII\Models\Role;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
/** /**
* Class PermissionSeeder * Class PermissionSeeder.
*/ */
class PermissionSeeder extends Seeder class PermissionSeeder extends Seeder
{ {

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* TransactionCurrencySeeder.php * TransactionCurrencySeeder.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use FireflyIII\Models\TransactionCurrency;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
/** /**
* Class TransactionCurrencySeeder * Class TransactionCurrencySeeder.
*/ */
class TransactionCurrencySeeder extends Seeder class TransactionCurrencySeeder extends Seeder
{ {

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* TransactionTypeSeeder.php * TransactionTypeSeeder.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -24,7 +24,7 @@ use FireflyIII\Models\TransactionType;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
/** /**
* Class TransactionTypeSeeder * Class TransactionTypeSeeder.
*/ */
class TransactionTypeSeeder extends Seeder class TransactionTypeSeeder extends Seeder
{ {

View File

@ -2,7 +2,7 @@
/** /**
* api.php * api.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -22,11 +22,10 @@
declare(strict_types=1); declare(strict_types=1);
Route::group( Route::group(
[ [
'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'about', 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'about',
'as' => 'api.v1.about.'], 'as' => 'api.v1.about.', ],
static function () { static function () {
// Accounts API routes: // Accounts API routes:
@ -35,10 +34,9 @@ Route::group(
} }
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'accounts', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'accounts',
'as' => 'api.v1.accounts.'], 'as' => 'api.v1.accounts.', ],
static function () { static function () {
// Accounts API routes: // Accounts API routes:
@ -50,13 +48,12 @@ Route::group(
Route::get('{account}/piggy_banks', ['uses' => 'AccountController@piggyBanks', 'as' => 'piggy_banks']); Route::get('{account}/piggy_banks', ['uses' => 'AccountController@piggyBanks', 'as' => 'piggy_banks']);
Route::get('{account}/transactions', ['uses' => 'AccountController@transactions', 'as' => 'transactions']); Route::get('{account}/transactions', ['uses' => 'AccountController@transactions', 'as' => 'transactions']);
} }
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'attachments', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'attachments',
'as' => 'api.v1.attachments.'], 'as' => 'api.v1.attachments.', ],
static function () { static function () {
// Attachment API routes: // Attachment API routes:
@ -71,8 +68,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'available_budgets', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'available_budgets',
'as' => 'api.v1.available_budgets.'], 'as' => 'api.v1.available_budgets.', ],
static function () { static function () {
// Available Budget API routes: // Available Budget API routes:
@ -85,26 +82,25 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'bills', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'bills',
'as' => 'api.v1.bills.'], static function () { 'as' => 'api.v1.bills.', ], static function () {
// Bills API routes: // Bills API routes:
Route::get('', ['uses' => 'BillController@index', 'as' => 'index']); Route::get('', ['uses' => 'BillController@index', 'as' => 'index']);
Route::post('', ['uses' => 'BillController@store', 'as' => 'store']); Route::post('', ['uses' => 'BillController@store', 'as' => 'store']);
Route::get('{bill}', ['uses' => 'BillController@show', 'as' => 'show']); Route::get('{bill}', ['uses' => 'BillController@show', 'as' => 'show']);
Route::put('{bill}', ['uses' => 'BillController@update', 'as' => 'update']); Route::put('{bill}', ['uses' => 'BillController@update', 'as' => 'update']);
Route::delete('{bill}', ['uses' => 'BillController@delete', 'as' => 'delete']); Route::delete('{bill}', ['uses' => 'BillController@delete', 'as' => 'delete']);
Route::get('{bill}/attachments', ['uses' => 'BillController@attachments', 'as' => 'attachments']); Route::get('{bill}/attachments', ['uses' => 'BillController@attachments', 'as' => 'attachments']);
Route::get('{bill}/rules', ['uses' => 'BillController@rules', 'as' => 'rules']); Route::get('{bill}/rules', ['uses' => 'BillController@rules', 'as' => 'rules']);
Route::get('{bill}/transactions', ['uses' => 'BillController@transactions', 'as' => 'transactions']); Route::get('{bill}/transactions', ['uses' => 'BillController@transactions', 'as' => 'transactions']);
} }
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'budgets/limits', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'budgets/limits',
'as' => 'api.v1.budget_limits.'], 'as' => 'api.v1.budget_limits.', ],
static function () { static function () {
// Budget Limit API routes: // Budget Limit API routes:
@ -118,8 +114,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'budgets', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'budgets',
'as' => 'api.v1.budgets.'], 'as' => 'api.v1.budgets.', ],
static function () { static function () {
// Budget API routes: // Budget API routes:
@ -135,8 +131,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'categories', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'categories',
'as' => 'api.v1.categories.'], 'as' => 'api.v1.categories.', ],
static function () { static function () {
// Category API routes: // Category API routes:
@ -150,25 +146,24 @@ Route::group(
); );
/** /**
* CHART ROUTES * CHART ROUTES.
*/ */
// Accounts // Accounts
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers\Chart', 'prefix' => 'chart/account', ['namespace' => 'FireflyIII\Api\V1\Controllers\Chart', 'prefix' => 'chart/account',
'as' => 'api.v1.chart.account.'], 'as' => 'api.v1.chart.account.', ],
static function () { static function () {
Route::get('overview', ['uses' => 'AccountController@overview', 'as' => 'overview']); Route::get('overview', ['uses' => 'AccountController@overview', 'as' => 'overview']);
Route::get('expense', ['uses' => 'AccountController@expenseOverview', 'as' => 'expense']); Route::get('expense', ['uses' => 'AccountController@expenseOverview', 'as' => 'expense']);
Route::get('revenue', ['uses' => 'AccountController@revenueOverview', 'as' => 'revenue']); Route::get('revenue', ['uses' => 'AccountController@revenueOverview', 'as' => 'revenue']);
} }
); );
// Available budgets // Available budgets
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers\Chart', 'prefix' => 'chart/ab', ['namespace' => 'FireflyIII\Api\V1\Controllers\Chart', 'prefix' => 'chart/ab',
'as' => 'api.v1.chart.ab.'], 'as' => 'api.v1.chart.ab.', ],
static function () { static function () {
// Overview API routes: // Overview API routes:
@ -178,8 +173,8 @@ Route::group(
// Categories // Categories
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers\Chart', 'prefix' => 'chart/category', ['namespace' => 'FireflyIII\Api\V1\Controllers\Chart', 'prefix' => 'chart/category',
'as' => 'api.v1.chart.category.'], 'as' => 'api.v1.chart.category.', ],
static function () { static function () {
// Overview API routes: // Overview API routes:
@ -187,13 +182,9 @@ Route::group(
} }
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'configuration', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'configuration',
'as' => 'api.v1.configuration.'], 'as' => 'api.v1.configuration.', ],
static function () { static function () {
// Configuration API routes: // Configuration API routes:
@ -203,8 +194,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'cer', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'cer',
'as' => 'api.v1.cer.'], 'as' => 'api.v1.cer.', ],
static function () { static function () {
// Currency Exchange Rate API routes: // Currency Exchange Rate API routes:
@ -213,8 +204,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'import', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'import',
'as' => 'api.v1.import.'], 'as' => 'api.v1.import.', ],
static function () { static function () {
// Transaction Links API routes: // Transaction Links API routes:
@ -224,8 +215,8 @@ Route::group(
} }
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'link_types', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'link_types',
'as' => 'api.v1.link_types.'], 'as' => 'api.v1.link_types.', ],
static function () { static function () {
// Link Type API routes: // Link Type API routes:
@ -239,8 +230,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'transaction_links', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'transaction_links',
'as' => 'api.v1.transaction_links.'], 'as' => 'api.v1.transaction_links.', ],
static function () { static function () {
// Transaction Links API routes: // Transaction Links API routes:
@ -249,13 +240,12 @@ Route::group(
Route::get('{journalLink}', ['uses' => 'TransactionLinkController@show', 'as' => 'show']); Route::get('{journalLink}', ['uses' => 'TransactionLinkController@show', 'as' => 'show']);
Route::put('{journalLink}', ['uses' => 'TransactionLinkController@update', 'as' => 'update']); Route::put('{journalLink}', ['uses' => 'TransactionLinkController@update', 'as' => 'update']);
Route::delete('{journalLink}', ['uses' => 'TransactionLinkController@delete', 'as' => 'delete']); Route::delete('{journalLink}', ['uses' => 'TransactionLinkController@delete', 'as' => 'delete']);
} }
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'piggy_banks', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'piggy_banks',
'as' => 'api.v1.piggy_banks.'], 'as' => 'api.v1.piggy_banks.', ],
static function () { static function () {
// Piggy Bank API routes: // Piggy Bank API routes:
@ -269,8 +259,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'preferences', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'preferences',
'as' => 'api.v1.preferences.'], 'as' => 'api.v1.preferences.', ],
static function () { static function () {
// Preference API routes: // Preference API routes:
@ -281,8 +271,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'recurrences', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'recurrences',
'as' => 'api.v1.recurrences.'], 'as' => 'api.v1.recurrences.', ],
static function () { static function () {
// Recurrence API routes: // Recurrence API routes:
@ -297,8 +287,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'rules', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'rules',
'as' => 'api.v1.rules.'], 'as' => 'api.v1.rules.', ],
static function () { static function () {
// Rules API routes: // Rules API routes:
@ -315,8 +305,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'rule_groups', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'rule_groups',
'as' => 'api.v1.rule_groups.'], 'as' => 'api.v1.rule_groups.', ],
static function () { static function () {
// Rules API routes: // Rules API routes:
@ -335,8 +325,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers\Search', 'prefix' => 'search', ['namespace' => 'FireflyIII\Api\V1\Controllers\Search', 'prefix' => 'search',
'as' => 'api.v1.search.'], 'as' => 'api.v1.search.', ],
static function () { static function () {
// Attachment API routes: // Attachment API routes:
@ -347,19 +337,18 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'summary', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'summary',
'as' => 'api.v1.summary.'], 'as' => 'api.v1.summary.', ],
static function () { static function () {
// Overview API routes: // Overview API routes:
Route::get('basic', ['uses' => 'SummaryController@basic', 'as' => 'basic']); Route::get('basic', ['uses' => 'SummaryController@basic', 'as' => 'basic']);
} }
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'currencies', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'currencies',
'as' => 'api.v1.currencies.'], 'as' => 'api.v1.currencies.', ],
static function () { static function () {
// Transaction currency API routes: // Transaction currency API routes:
@ -385,8 +374,8 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'tags', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'tags',
'as' => 'api.v1.tags.'], 'as' => 'api.v1.tags.', ],
static function () { static function () {
// Tag API routes: // Tag API routes:
Route::get('', ['uses' => 'TagController@index', 'as' => 'index']); Route::get('', ['uses' => 'TagController@index', 'as' => 'index']);
@ -399,18 +388,17 @@ Route::group(
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'tag-cloud', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'tag-cloud',
'as' => 'api.v1.tag-cloud.'], 'as' => 'api.v1.tag-cloud.', ],
static function () { static function () {
// Tag cloud API routes (to prevent collisions) // Tag cloud API routes (to prevent collisions)
Route::get('', ['uses' => 'TagController@cloud', 'as' => 'cloud']); Route::get('', ['uses' => 'TagController@cloud', 'as' => 'cloud']);
} }
); );
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'transactions', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'transactions',
'as' => 'api.v1.transactions.'], 'as' => 'api.v1.transactions.', ],
static function () { static function () {
// Transaction API routes: // Transaction API routes:
@ -427,8 +415,8 @@ Route::group(
// special group for transaction journals // special group for transaction journals
Route::group( Route::group(
['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'transaction-journals', ['namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'transaction-journals',
'as' => 'api.v1.journals.'], 'as' => 'api.v1.journals.', ],
static function () { static function () {
// Transaction API routes: // Transaction API routes:
@ -436,10 +424,9 @@ Route::group(
} }
); );
Route::group( Route::group(
['middleware' => ['auth:api', 'bindings', \FireflyIII\Http\Middleware\IsAdmin::class], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'users', ['middleware' => ['auth:api', 'bindings', \FireflyIII\Http\Middleware\IsAdmin::class], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'users',
'as' => 'api.v1.users.'], 'as' => 'api.v1.users.', ],
static function () { static function () {
// Users API routes: // Users API routes:

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* breadcrumbs.php * breadcrumbs.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -68,14 +68,14 @@ try {
// HOME // HOME
Breadcrumbs::register( Breadcrumbs::register(
'home', 'home',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->push(trans('breadcrumbs.home'), route('index')); $breadcrumbs->push(trans('breadcrumbs.home'), route('index'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'index', 'index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->push(trans('breadcrumbs.home'), route('index')); $breadcrumbs->push(trans('breadcrumbs.home'), route('index'));
} }
); );
@ -83,7 +83,7 @@ try {
// ACCOUNTS // ACCOUNTS
Breadcrumbs::register( Breadcrumbs::register(
'accounts.index', 'accounts.index',
function (BreadcrumbsGenerator $breadcrumbs, string $what) { static function (BreadcrumbsGenerator $breadcrumbs, string $what) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.' . strtolower(e($what)) . '_accounts'), route('accounts.index', [$what])); $breadcrumbs->push(trans('firefly.' . strtolower(e($what)) . '_accounts'), route('accounts.index', [$what]));
} }
@ -98,7 +98,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'accounts.create', 'accounts.create',
function (BreadcrumbsGenerator $breadcrumbs, string $what) { static function (BreadcrumbsGenerator $breadcrumbs, string $what) {
$breadcrumbs->parent('accounts.index', $what); $breadcrumbs->parent('accounts.index', $what);
$breadcrumbs->push(trans('firefly.new_' . strtolower(e($what)) . '_account'), route('accounts.create', [$what])); $breadcrumbs->push(trans('firefly.new_' . strtolower(e($what)) . '_account'), route('accounts.create', [$what]));
} }
@ -106,7 +106,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'accounts.show', 'accounts.show',
function (BreadcrumbsGenerator $breadcrumbs, Account $account, Carbon $start = null, Carbon $end = null) { static function (BreadcrumbsGenerator $breadcrumbs, Account $account, Carbon $start = null, Carbon $end = null) {
$what = config('firefly.shortNamesByFullName.' . $account->accountType->type); $what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
$breadcrumbs->parent('accounts.index', $what); $breadcrumbs->parent('accounts.index', $what);
@ -114,8 +114,8 @@ try {
if (null !== $start && null !== $end) { if (null !== $start && null !== $end) {
$title = trans( $title = trans(
'firefly.between_dates_breadcrumb', 'firefly.between_dates_breadcrumb',
['start' => $start ? $start->formatLocalized((string)trans('config.month_and_day')) : '', ['start' => $start ? $start->formatLocalized((string)trans('config.month_and_day')) : '',
'end' => $end ? $end->formatLocalized((string)trans('config.month_and_day')) : '',] 'end' => $end ? $end->formatLocalized((string)trans('config.month_and_day')) : '', ]
); );
$breadcrumbs->push($title, route('accounts.show', $account)); $breadcrumbs->push($title, route('accounts.show', $account));
} }
@ -124,7 +124,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'accounts.show.all', 'accounts.show.all',
function (BreadcrumbsGenerator $breadcrumbs, Account $account) { static function (BreadcrumbsGenerator $breadcrumbs, Account $account) {
$what = config('firefly.shortNamesByFullName.' . $account->accountType->type); $what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
$breadcrumbs->parent('accounts.index', $what); $breadcrumbs->parent('accounts.index', $what);
@ -134,7 +134,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'accounts.reconcile', 'accounts.reconcile',
function (BreadcrumbsGenerator $breadcrumbs, Account $account) { static function (BreadcrumbsGenerator $breadcrumbs, Account $account) {
$breadcrumbs->parent('accounts.show', $account); $breadcrumbs->parent('accounts.show', $account);
$breadcrumbs->push(trans('firefly.reconcile_account', ['account' => $account->name]), route('accounts.reconcile', [$account->id])); $breadcrumbs->push(trans('firefly.reconcile_account', ['account' => $account->name]), route('accounts.reconcile', [$account->id]));
} }
@ -142,7 +142,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'accounts.reconcile.show', 'accounts.reconcile.show',
function (BreadcrumbsGenerator $breadcrumbs, Account $account, TransactionJournal $journal) { static function (BreadcrumbsGenerator $breadcrumbs, Account $account, TransactionJournal $journal) {
$breadcrumbs->parent('accounts.show', $account); $breadcrumbs->parent('accounts.show', $account);
$title = trans('firefly.reconciliation') . ' "' . $journal->description . '"'; $title = trans('firefly.reconciliation') . ' "' . $journal->description . '"';
$breadcrumbs->push($title, route('accounts.reconcile.show', [$journal->id])); $breadcrumbs->push($title, route('accounts.reconcile.show', [$journal->id]));
@ -151,7 +151,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'accounts.delete', 'accounts.delete',
function (BreadcrumbsGenerator $breadcrumbs, Account $account) { static function (BreadcrumbsGenerator $breadcrumbs, Account $account) {
$breadcrumbs->parent('accounts.show', $account); $breadcrumbs->parent('accounts.show', $account);
$breadcrumbs->push(trans('firefly.delete_account', ['name' => limitStringLength($account->name)]), route('accounts.delete', [$account->id])); $breadcrumbs->push(trans('firefly.delete_account', ['name' => limitStringLength($account->name)]), route('accounts.delete', [$account->id]));
} }
@ -159,7 +159,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'accounts.edit', 'accounts.edit',
function (BreadcrumbsGenerator $breadcrumbs, Account $account) { static function (BreadcrumbsGenerator $breadcrumbs, Account $account) {
$breadcrumbs->parent('accounts.show', $account); $breadcrumbs->parent('accounts.show', $account);
$what = config('firefly.shortNamesByFullName.' . $account->accountType->type); $what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
@ -172,7 +172,7 @@ try {
// ADMIN // ADMIN
Breadcrumbs::register( Breadcrumbs::register(
'admin.index', 'admin.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.administration'), route('admin.index')); $breadcrumbs->push(trans('firefly.administration'), route('admin.index'));
} }
@ -180,7 +180,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.users', 'admin.users',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('admin.index'); $breadcrumbs->parent('admin.index');
$breadcrumbs->push(trans('firefly.list_all_users'), route('admin.users')); $breadcrumbs->push(trans('firefly.list_all_users'), route('admin.users'));
} }
@ -188,21 +188,21 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.users.show', 'admin.users.show',
function (BreadcrumbsGenerator $breadcrumbs, User $user) { static function (BreadcrumbsGenerator $breadcrumbs, User $user) {
$breadcrumbs->parent('admin.users'); $breadcrumbs->parent('admin.users');
$breadcrumbs->push(trans('firefly.single_user_administration', ['email' => $user->email]), route('admin.users.show', [$user->id])); $breadcrumbs->push(trans('firefly.single_user_administration', ['email' => $user->email]), route('admin.users.show', [$user->id]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'admin.users.edit', 'admin.users.edit',
function (BreadcrumbsGenerator $breadcrumbs, User $user) { static function (BreadcrumbsGenerator $breadcrumbs, User $user) {
$breadcrumbs->parent('admin.users'); $breadcrumbs->parent('admin.users');
$breadcrumbs->push(trans('firefly.edit_user', ['email' => $user->email]), route('admin.users.edit', [$user->id])); $breadcrumbs->push(trans('firefly.edit_user', ['email' => $user->email]), route('admin.users.edit', [$user->id]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'admin.users.delete', 'admin.users.delete',
function (BreadcrumbsGenerator $breadcrumbs, User $user) { static function (BreadcrumbsGenerator $breadcrumbs, User $user) {
$breadcrumbs->parent('admin.users'); $breadcrumbs->parent('admin.users');
$breadcrumbs->push(trans('firefly.delete_user', ['email' => $user->email]), route('admin.users.delete', [$user->id])); $breadcrumbs->push(trans('firefly.delete_user', ['email' => $user->email]), route('admin.users.delete', [$user->id]));
} }
@ -210,7 +210,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.users.domains', 'admin.users.domains',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('admin.index'); $breadcrumbs->parent('admin.index');
$breadcrumbs->push(trans('firefly.blocked_domains'), route('admin.users.domains')); $breadcrumbs->push(trans('firefly.blocked_domains'), route('admin.users.domains'));
} }
@ -218,14 +218,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.configuration.index', 'admin.configuration.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('admin.index'); $breadcrumbs->parent('admin.index');
$breadcrumbs->push(trans('firefly.instance_configuration'), route('admin.configuration.index')); $breadcrumbs->push(trans('firefly.instance_configuration'), route('admin.configuration.index'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'admin.update-check', 'admin.update-check',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('admin.index'); $breadcrumbs->parent('admin.index');
$breadcrumbs->push(trans('firefly.update_check_title'), route('admin.update-check')); $breadcrumbs->push(trans('firefly.update_check_title'), route('admin.update-check'));
} }
@ -233,7 +233,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.links.index', 'admin.links.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('admin.index'); $breadcrumbs->parent('admin.index');
$breadcrumbs->push(trans('firefly.journal_link_configuration'), route('admin.links.index')); $breadcrumbs->push(trans('firefly.journal_link_configuration'), route('admin.links.index'));
} }
@ -241,7 +241,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.links.create', 'admin.links.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('admin.links.index'); $breadcrumbs->parent('admin.links.index');
$breadcrumbs->push(trans('firefly.create_new_link_type'), route('admin.links.create')); $breadcrumbs->push(trans('firefly.create_new_link_type'), route('admin.links.create'));
} }
@ -249,7 +249,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.links.show', 'admin.links.show',
function (BreadcrumbsGenerator $breadcrumbs, LinkType $linkType) { static function (BreadcrumbsGenerator $breadcrumbs, LinkType $linkType) {
$breadcrumbs->parent('admin.links.index'); $breadcrumbs->parent('admin.links.index');
$breadcrumbs->push(trans('firefly.overview_for_link', ['name' => limitStringLength($linkType->name)]), route('admin.links.show', [$linkType->id])); $breadcrumbs->push(trans('firefly.overview_for_link', ['name' => limitStringLength($linkType->name)]), route('admin.links.show', [$linkType->id]));
} }
@ -257,7 +257,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.links.edit', 'admin.links.edit',
function (BreadcrumbsGenerator $breadcrumbs, LinkType $linkType) { static function (BreadcrumbsGenerator $breadcrumbs, LinkType $linkType) {
$breadcrumbs->parent('admin.links.index'); $breadcrumbs->parent('admin.links.index');
$breadcrumbs->push(trans('firefly.edit_link_type', ['name' => limitStringLength($linkType->name)]), route('admin.links.edit', [$linkType->id])); $breadcrumbs->push(trans('firefly.edit_link_type', ['name' => limitStringLength($linkType->name)]), route('admin.links.edit', [$linkType->id]));
} }
@ -265,7 +265,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'admin.links.delete', 'admin.links.delete',
function (BreadcrumbsGenerator $breadcrumbs, LinkType $linkType) { static function (BreadcrumbsGenerator $breadcrumbs, LinkType $linkType) {
$breadcrumbs->parent('admin.links.index'); $breadcrumbs->parent('admin.links.index');
$breadcrumbs->push(trans('firefly.delete_link_type', ['name' => limitStringLength($linkType->name)]), route('admin.links.delete', [$linkType->id])); $breadcrumbs->push(trans('firefly.delete_link_type', ['name' => limitStringLength($linkType->name)]), route('admin.links.delete', [$linkType->id]));
} }
@ -289,7 +289,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'transactions.link.delete', 'transactions.link.delete',
function (BreadcrumbsGenerator $breadcrumbs, TransactionJournalLink $link) { static function (BreadcrumbsGenerator $breadcrumbs, TransactionJournalLink $link) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.delete_journal_link'), route('transactions.link.delete', $link->id)); $breadcrumbs->push(trans('breadcrumbs.delete_journal_link'), route('transactions.link.delete', $link->id));
} }
@ -298,7 +298,7 @@ try {
// ATTACHMENTS // ATTACHMENTS
Breadcrumbs::register( Breadcrumbs::register(
'attachments.index', 'attachments.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.attachments'), route('attachments.index')); $breadcrumbs->push(trans('firefly.attachments'), route('attachments.index'));
} }
@ -306,7 +306,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'attachments.edit', 'attachments.edit',
function (BreadcrumbsGenerator $breadcrumbs, Attachment $attachment) { static function (BreadcrumbsGenerator $breadcrumbs, Attachment $attachment) {
$object = $attachment->attachable; $object = $attachment->attachable;
if ($object instanceof TransactionJournal) { if ($object instanceof TransactionJournal) {
$group = $object->transactionGroup; $group = $object->transactionGroup;
@ -323,7 +323,7 @@ try {
); );
Breadcrumbs::register( Breadcrumbs::register(
'attachments.delete', 'attachments.delete',
function (BreadcrumbsGenerator $breadcrumbs, Attachment $attachment) { static function (BreadcrumbsGenerator $breadcrumbs, Attachment $attachment) {
$object = $attachment->attachable; $object = $attachment->attachable;
if ($object instanceof TransactionJournal) { if ($object instanceof TransactionJournal) {
$breadcrumbs->parent('transactions.show', $object->transactionGroup); $breadcrumbs->parent('transactions.show', $object->transactionGroup);
@ -340,14 +340,14 @@ try {
// BILLS // BILLS
Breadcrumbs::register( Breadcrumbs::register(
'bills.index', 'bills.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.bills'), route('bills.index')); $breadcrumbs->push(trans('breadcrumbs.bills'), route('bills.index'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'bills.create', 'bills.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('bills.index'); $breadcrumbs->parent('bills.index');
$breadcrumbs->push(trans('breadcrumbs.newBill'), route('bills.create')); $breadcrumbs->push(trans('breadcrumbs.newBill'), route('bills.create'));
} }
@ -355,14 +355,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'bills.edit', 'bills.edit',
function (BreadcrumbsGenerator $breadcrumbs, Bill $bill) { static function (BreadcrumbsGenerator $breadcrumbs, Bill $bill) {
$breadcrumbs->parent('bills.show', $bill); $breadcrumbs->parent('bills.show', $bill);
$breadcrumbs->push(trans('breadcrumbs.edit_bill', ['name' => limitStringLength($bill->name)]), route('bills.edit', [$bill->id])); $breadcrumbs->push(trans('breadcrumbs.edit_bill', ['name' => limitStringLength($bill->name)]), route('bills.edit', [$bill->id]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'bills.delete', 'bills.delete',
function (BreadcrumbsGenerator $breadcrumbs, Bill $bill) { static function (BreadcrumbsGenerator $breadcrumbs, Bill $bill) {
$breadcrumbs->parent('bills.show', $bill); $breadcrumbs->parent('bills.show', $bill);
$breadcrumbs->push(trans('breadcrumbs.delete_bill', ['name' => limitStringLength($bill->name)]), route('bills.delete', [$bill->id])); $breadcrumbs->push(trans('breadcrumbs.delete_bill', ['name' => limitStringLength($bill->name)]), route('bills.delete', [$bill->id]));
} }
@ -370,7 +370,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'bills.show', 'bills.show',
function (BreadcrumbsGenerator $breadcrumbs, Bill $bill) { static function (BreadcrumbsGenerator $breadcrumbs, Bill $bill) {
$breadcrumbs->parent('bills.index'); $breadcrumbs->parent('bills.index');
$breadcrumbs->push(limitStringLength($bill->name), route('bills.show', [$bill->id])); $breadcrumbs->push(limitStringLength($bill->name), route('bills.show', [$bill->id]));
} }
@ -379,14 +379,14 @@ try {
// BUDGETS // BUDGETS
Breadcrumbs::register( Breadcrumbs::register(
'budgets.index', 'budgets.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.budgets'), route('budgets.index')); $breadcrumbs->push(trans('firefly.budgets'), route('budgets.index'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'budgets.create', 'budgets.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('budgets.index'); $breadcrumbs->parent('budgets.index');
$breadcrumbs->push(trans('firefly.create_new_budget'), route('budgets.create')); $breadcrumbs->push(trans('firefly.create_new_budget'), route('budgets.create'));
} }
@ -394,14 +394,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'budgets.edit', 'budgets.edit',
function (BreadcrumbsGenerator $breadcrumbs, Budget $budget) { static function (BreadcrumbsGenerator $breadcrumbs, Budget $budget) {
$breadcrumbs->parent('budgets.show', $budget); $breadcrumbs->parent('budgets.show', $budget);
$breadcrumbs->push(trans('firefly.edit_budget', ['name' => limitStringLength($budget->name)]), route('budgets.edit', [$budget->id])); $breadcrumbs->push(trans('firefly.edit_budget', ['name' => limitStringLength($budget->name)]), route('budgets.edit', [$budget->id]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'budgets.delete', 'budgets.delete',
function (BreadcrumbsGenerator $breadcrumbs, Budget $budget) { static function (BreadcrumbsGenerator $breadcrumbs, Budget $budget) {
$breadcrumbs->parent('budgets.show', $budget); $breadcrumbs->parent('budgets.show', $budget);
$breadcrumbs->push(trans('firefly.delete_budget', ['name' => limitStringLength($budget->name)]), route('budgets.delete', [$budget->id])); $breadcrumbs->push(trans('firefly.delete_budget', ['name' => limitStringLength($budget->name)]), route('budgets.delete', [$budget->id]));
} }
@ -409,14 +409,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'budgets.no-budget', 'budgets.no-budget',
function (BreadcrumbsGenerator $breadcrumbs, Carbon $start = null, Carbon $end = null) { static function (BreadcrumbsGenerator $breadcrumbs, Carbon $start = null, Carbon $end = null) {
$breadcrumbs->parent('budgets.index'); $breadcrumbs->parent('budgets.index');
$breadcrumbs->push(trans('firefly.journals_without_budget'), route('budgets.no-budget')); $breadcrumbs->push(trans('firefly.journals_without_budget'), route('budgets.no-budget'));
if (null !== $start && null !== $end) { if (null !== $start && null !== $end) {
$title = trans( $title = trans(
'firefly.between_dates_breadcrumb', 'firefly.between_dates_breadcrumb',
['start' => $start->formatLocalized((string)trans('config.month_and_day')), ['start' => $start->formatLocalized((string)trans('config.month_and_day')),
'end' => $end->formatLocalized((string)trans('config.month_and_day')),] 'end' => $end->formatLocalized((string)trans('config.month_and_day')), ]
); );
$breadcrumbs->push($title, route('budgets.no-budget')); $breadcrumbs->push($title, route('budgets.no-budget'));
} }
@ -425,7 +425,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'budgets.no-budget-all', 'budgets.no-budget-all',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('budgets.index'); $breadcrumbs->parent('budgets.index');
$breadcrumbs->push(trans('firefly.journals_without_budget'), route('budgets.no-budget')); $breadcrumbs->push(trans('firefly.journals_without_budget'), route('budgets.no-budget'));
$breadcrumbs->push(trans('firefly.everything'), route('budgets.no-budget-all')); $breadcrumbs->push(trans('firefly.everything'), route('budgets.no-budget-all'));
@ -434,7 +434,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'budgets.show', 'budgets.show',
function (BreadcrumbsGenerator $breadcrumbs, Budget $budget) { static function (BreadcrumbsGenerator $breadcrumbs, Budget $budget) {
$breadcrumbs->parent('budgets.index'); $breadcrumbs->parent('budgets.index');
$breadcrumbs->push(limitStringLength($budget->name), route('budgets.show', [$budget->id])); $breadcrumbs->push(limitStringLength($budget->name), route('budgets.show', [$budget->id]));
$breadcrumbs->push(trans('firefly.everything'), route('budgets.show', [$budget->id])); $breadcrumbs->push(trans('firefly.everything'), route('budgets.show', [$budget->id]));
@ -443,14 +443,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'budgets.show.limit', 'budgets.show.limit',
function (BreadcrumbsGenerator $breadcrumbs, Budget $budget, BudgetLimit $budgetLimit) { static function (BreadcrumbsGenerator $breadcrumbs, Budget $budget, BudgetLimit $budgetLimit) {
$breadcrumbs->parent('budgets.index'); $breadcrumbs->parent('budgets.index');
$breadcrumbs->push(limitStringLength($budget->name), route('budgets.show', [$budget->id])); $breadcrumbs->push(limitStringLength($budget->name), route('budgets.show', [$budget->id]));
$title = trans( $title = trans(
'firefly.between_dates_breadcrumb', 'firefly.between_dates_breadcrumb',
['start' => $budgetLimit->start_date->formatLocalized((string)trans('config.month_and_day')), ['start' => $budgetLimit->start_date->formatLocalized((string)trans('config.month_and_day')),
'end' => $budgetLimit->end_date->formatLocalized((string)trans('config.month_and_day')),] 'end' => $budgetLimit->end_date->formatLocalized((string)trans('config.month_and_day')), ]
); );
$breadcrumbs->push( $breadcrumbs->push(
@ -463,14 +463,14 @@ try {
// CATEGORIES // CATEGORIES
Breadcrumbs::register( Breadcrumbs::register(
'categories.index', 'categories.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.categories'), route('categories.index')); $breadcrumbs->push(trans('firefly.categories'), route('categories.index'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'categories.create', 'categories.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('categories.index'); $breadcrumbs->parent('categories.index');
$breadcrumbs->push(trans('firefly.new_category'), route('categories.create')); $breadcrumbs->push(trans('firefly.new_category'), route('categories.create'));
} }
@ -478,14 +478,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'categories.edit', 'categories.edit',
function (BreadcrumbsGenerator $breadcrumbs, Category $category) { static function (BreadcrumbsGenerator $breadcrumbs, Category $category) {
$breadcrumbs->parent('categories.show.all', $category); $breadcrumbs->parent('categories.show.all', $category);
$breadcrumbs->push(trans('firefly.edit_category', ['name' => limitStringLength($category->name)]), route('categories.edit', [$category->id])); $breadcrumbs->push(trans('firefly.edit_category', ['name' => limitStringLength($category->name)]), route('categories.edit', [$category->id]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'categories.delete', 'categories.delete',
function (BreadcrumbsGenerator $breadcrumbs, Category $category) { static function (BreadcrumbsGenerator $breadcrumbs, Category $category) {
$breadcrumbs->parent('categories.show', $category); $breadcrumbs->parent('categories.show', $category);
$breadcrumbs->push(trans('firefly.delete_category', ['name' => limitStringLength($category->name)]), route('categories.delete', [$category->id])); $breadcrumbs->push(trans('firefly.delete_category', ['name' => limitStringLength($category->name)]), route('categories.delete', [$category->id]));
} }
@ -493,14 +493,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'categories.show', 'categories.show',
function (BreadcrumbsGenerator $breadcrumbs, Category $category, Carbon $start = null, Carbon $end = null) { static function (BreadcrumbsGenerator $breadcrumbs, Category $category, Carbon $start = null, Carbon $end = null) {
$breadcrumbs->parent('categories.index'); $breadcrumbs->parent('categories.index');
$breadcrumbs->push(limitStringLength($category->name), route('categories.show', [$category->id])); $breadcrumbs->push(limitStringLength($category->name), route('categories.show', [$category->id]));
if (null !== $start && null !== $end) { if (null !== $start && null !== $end) {
$title = trans( $title = trans(
'firefly.between_dates_breadcrumb', 'firefly.between_dates_breadcrumb',
['start' => $start->formatLocalized((string)trans('config.month_and_day')), ['start' => $start->formatLocalized((string)trans('config.month_and_day')),
'end' => $end->formatLocalized((string)trans('config.month_and_day')),] 'end' => $end->formatLocalized((string)trans('config.month_and_day')), ]
); );
$breadcrumbs->push($title, route('categories.show', [$category->id])); $breadcrumbs->push($title, route('categories.show', [$category->id]));
} }
@ -509,7 +509,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'categories.show.all', 'categories.show.all',
function (BreadcrumbsGenerator $breadcrumbs, Category $category) { static function (BreadcrumbsGenerator $breadcrumbs, Category $category) {
$breadcrumbs->parent('categories.index'); $breadcrumbs->parent('categories.index');
$breadcrumbs->push(limitStringLength($category->name), route('categories.show', [$category->id])); $breadcrumbs->push(limitStringLength($category->name), route('categories.show', [$category->id]));
$breadcrumbs->push(trans('firefly.everything'), route('categories.show.all', [$category->id])); $breadcrumbs->push(trans('firefly.everything'), route('categories.show.all', [$category->id]));
@ -518,24 +518,23 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'categories.no-category', 'categories.no-category',
function (BreadcrumbsGenerator $breadcrumbs, Carbon $start = null, Carbon $end = null) { static function (BreadcrumbsGenerator $breadcrumbs, Carbon $start = null, Carbon $end = null) {
$breadcrumbs->parent('categories.index'); $breadcrumbs->parent('categories.index');
$breadcrumbs->push(trans('firefly.journals_without_category'), route('categories.no-category')); $breadcrumbs->push(trans('firefly.journals_without_category'), route('categories.no-category'));
if (null !== $start && null !== $end) { if (null !== $start && null !== $end) {
$title = trans( $title = trans(
'firefly.between_dates_breadcrumb', 'firefly.between_dates_breadcrumb',
['start' => $start->formatLocalized((string)trans('config.month_and_day')), ['start' => $start->formatLocalized((string)trans('config.month_and_day')),
'end' => $end->formatLocalized((string)trans('config.month_and_day')),] 'end' => $end->formatLocalized((string)trans('config.month_and_day')), ]
); );
$breadcrumbs->push($title, route('categories.no-category')); $breadcrumbs->push($title, route('categories.no-category'));
} }
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'categories.no-category.all', 'categories.no-category.all',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('categories.index'); $breadcrumbs->parent('categories.index');
$breadcrumbs->push(trans('firefly.journals_without_category'), route('categories.no-category')); $breadcrumbs->push(trans('firefly.journals_without_category'), route('categories.no-category'));
$breadcrumbs->push(trans('firefly.everything'), route('categories.no-category.all')); $breadcrumbs->push(trans('firefly.everything'), route('categories.no-category.all'));
@ -545,7 +544,7 @@ try {
// CURRENCIES // CURRENCIES
Breadcrumbs::register( Breadcrumbs::register(
'currencies.index', 'currencies.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.currencies'), route('currencies.index')); $breadcrumbs->push(trans('firefly.currencies'), route('currencies.index'));
} }
@ -553,7 +552,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'currencies.create', 'currencies.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('currencies.index'); $breadcrumbs->parent('currencies.index');
$breadcrumbs->push(trans('firefly.create_currency'), route('currencies.create')); $breadcrumbs->push(trans('firefly.create_currency'), route('currencies.create'));
} }
@ -561,14 +560,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'currencies.edit', 'currencies.edit',
function (BreadcrumbsGenerator $breadcrumbs, TransactionCurrency $currency) { static function (BreadcrumbsGenerator $breadcrumbs, TransactionCurrency $currency) {
$breadcrumbs->parent('currencies.index'); $breadcrumbs->parent('currencies.index');
$breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => $currency->name]), route('currencies.edit', [$currency->id])); $breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => $currency->name]), route('currencies.edit', [$currency->id]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'currencies.delete', 'currencies.delete',
function (BreadcrumbsGenerator $breadcrumbs, TransactionCurrency $currency) { static function (BreadcrumbsGenerator $breadcrumbs, TransactionCurrency $currency) {
$breadcrumbs->parent('currencies.index'); $breadcrumbs->parent('currencies.index');
$breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => $currency->name]), route('currencies.delete', [$currency->id])); $breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => $currency->name]), route('currencies.delete', [$currency->id]));
} }
@ -577,7 +576,7 @@ try {
// EXPORT // EXPORT
Breadcrumbs::register( Breadcrumbs::register(
'export.index', 'export.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.export_data_bc'), route('export.index')); $breadcrumbs->push(trans('firefly.export_data_bc'), route('export.index'));
} }
@ -586,14 +585,14 @@ try {
// PIGGY BANKS // PIGGY BANKS
Breadcrumbs::register( Breadcrumbs::register(
'piggy-banks.index', 'piggy-banks.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.piggyBanks'), route('piggy-banks.index')); $breadcrumbs->push(trans('firefly.piggyBanks'), route('piggy-banks.index'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'piggy-banks.create', 'piggy-banks.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('piggy-banks.index'); $breadcrumbs->parent('piggy-banks.index');
$breadcrumbs->push(trans('breadcrumbs.newPiggyBank'), route('piggy-banks.create')); $breadcrumbs->push(trans('breadcrumbs.newPiggyBank'), route('piggy-banks.create'));
} }
@ -601,14 +600,14 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'piggy-banks.edit', 'piggy-banks.edit',
function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) { static function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('piggy-banks.show', $piggyBank); $breadcrumbs->parent('piggy-banks.show', $piggyBank);
$breadcrumbs->push(trans('breadcrumbs.edit_piggyBank', ['name' => $piggyBank->name]), route('piggy-banks.edit', [$piggyBank->id])); $breadcrumbs->push(trans('breadcrumbs.edit_piggyBank', ['name' => $piggyBank->name]), route('piggy-banks.edit', [$piggyBank->id]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'piggy-banks.delete', 'piggy-banks.delete',
function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) { static function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('piggy-banks.show', $piggyBank); $breadcrumbs->parent('piggy-banks.show', $piggyBank);
$breadcrumbs->push(trans('firefly.delete_piggy_bank', ['name' => $piggyBank->name]), route('piggy-banks.delete', [$piggyBank->id])); $breadcrumbs->push(trans('firefly.delete_piggy_bank', ['name' => $piggyBank->name]), route('piggy-banks.delete', [$piggyBank->id]));
} }
@ -616,7 +615,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'piggy-banks.show', 'piggy-banks.show',
function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) { static function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('piggy-banks.index'); $breadcrumbs->parent('piggy-banks.index');
$breadcrumbs->push($piggyBank->name, route('piggy-banks.show', [$piggyBank->id])); $breadcrumbs->push($piggyBank->name, route('piggy-banks.show', [$piggyBank->id]));
} }
@ -624,7 +623,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'piggy-banks.add-money-mobile', 'piggy-banks.add-money-mobile',
function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) { static function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('piggy-banks.show', $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->push(trans('firefly.add_money_to_piggy', ['name' => $piggyBank->name]), route('piggy-banks.add-money-mobile', [$piggyBank->id]));
} }
@ -632,7 +631,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'piggy-banks.remove-money-mobile', 'piggy-banks.remove-money-mobile',
function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) { static function (BreadcrumbsGenerator $breadcrumbs, PiggyBank $piggyBank) {
$breadcrumbs->parent('piggy-banks.show', $piggyBank); $breadcrumbs->parent('piggy-banks.show', $piggyBank);
$breadcrumbs->push( $breadcrumbs->push(
trans('firefly.remove_money_from_piggy_title', ['name' => $piggyBank->name]), trans('firefly.remove_money_from_piggy_title', ['name' => $piggyBank->name]),
@ -644,7 +643,7 @@ try {
// IMPORT // IMPORT
Breadcrumbs::register( Breadcrumbs::register(
'import.index', 'import.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.import_index_title'), route('import.index')); $breadcrumbs->push(trans('firefly.import_index_title'), route('import.index'));
} }
@ -652,7 +651,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'import.prerequisites.index', 'import.prerequisites.index',
function (BreadcrumbsGenerator $breadcrumbs, string $importProvider) { static function (BreadcrumbsGenerator $breadcrumbs, string $importProvider) {
$breadcrumbs->parent('import.index'); $breadcrumbs->parent('import.index');
$breadcrumbs->push(trans('import.prerequisites_breadcrumb_' . $importProvider), route('import.prerequisites.index', [$importProvider])); $breadcrumbs->push(trans('import.prerequisites_breadcrumb_' . $importProvider), route('import.prerequisites.index', [$importProvider]));
} }
@ -660,7 +659,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'import.job.configuration.index', 'import.job.configuration.index',
function (BreadcrumbsGenerator $breadcrumbs, ImportJob $job) { static function (BreadcrumbsGenerator $breadcrumbs, ImportJob $job) {
$breadcrumbs->parent('import.index'); $breadcrumbs->parent('import.index');
$breadcrumbs->push(trans('import.job_configuration_breadcrumb', ['key' => $job->key]), route('import.job.configuration.index', [$job->key])); $breadcrumbs->push(trans('import.job_configuration_breadcrumb', ['key' => $job->key]), route('import.job.configuration.index', [$job->key]));
} }
@ -668,17 +667,16 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'import.job.status.index', 'import.job.status.index',
function (BreadcrumbsGenerator $breadcrumbs, ImportJob $job) { static function (BreadcrumbsGenerator $breadcrumbs, ImportJob $job) {
$breadcrumbs->parent('import.index'); $breadcrumbs->parent('import.index');
$breadcrumbs->push(trans('import.job_status_breadcrumb', ['key' => $job->key]), route('import.job.status.index', [$job->key])); $breadcrumbs->push(trans('import.job_status_breadcrumb', ['key' => $job->key]), route('import.job.status.index', [$job->key]));
} }
); );
// PREFERENCES // PREFERENCES
Breadcrumbs::register( Breadcrumbs::register(
'preferences.index', 'preferences.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index')); $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index'));
} }
@ -686,7 +684,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'profile.code', 'profile.code',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index')); $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index'));
} }
@ -694,7 +692,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'profile.new-backup-codes', 'profile.new-backup-codes',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index')); $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index'));
} }
@ -703,14 +701,14 @@ try {
// PROFILE // PROFILE
Breadcrumbs::register( Breadcrumbs::register(
'profile.index', 'profile.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index')); $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'profile.change-password', 'profile.change-password',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('profile.index'); $breadcrumbs->parent('profile.index');
$breadcrumbs->push(trans('breadcrumbs.changePassword'), route('profile.change-password')); $breadcrumbs->push(trans('breadcrumbs.changePassword'), route('profile.change-password'));
} }
@ -718,7 +716,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'profile.change-email', 'profile.change-email',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('profile.index'); $breadcrumbs->parent('profile.index');
$breadcrumbs->push(trans('breadcrumbs.change_email'), route('profile.change-email')); $breadcrumbs->push(trans('breadcrumbs.change_email'), route('profile.change-email'));
} }
@ -726,7 +724,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'profile.delete-account', 'profile.delete-account',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('profile.index'); $breadcrumbs->parent('profile.index');
$breadcrumbs->push(trans('firefly.delete_account'), route('profile.delete-account')); $breadcrumbs->push(trans('firefly.delete_account'), route('profile.delete-account'));
} }
@ -735,7 +733,7 @@ try {
// REPORTS // REPORTS
Breadcrumbs::register( Breadcrumbs::register(
'reports.index', 'reports.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.reports'), route('reports.index')); $breadcrumbs->push(trans('breadcrumbs.reports'), route('reports.index'));
} }
@ -743,7 +741,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'reports.report.audit', 'reports.report.audit',
function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) { static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) {
$breadcrumbs->parent('reports.index'); $breadcrumbs->parent('reports.index');
$monthFormat = (string)trans('config.month_and_day'); $monthFormat = (string)trans('config.month_and_day');
@ -756,7 +754,7 @@ try {
); );
Breadcrumbs::register( Breadcrumbs::register(
'reports.report.budget', 'reports.report.budget',
function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $budgetIds, Carbon $start, Carbon $end) { static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $budgetIds, Carbon $start, Carbon $end) {
$breadcrumbs->parent('reports.index'); $breadcrumbs->parent('reports.index');
$monthFormat = (string)trans('config.month_and_day'); $monthFormat = (string)trans('config.month_and_day');
@ -770,7 +768,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'reports.report.tag', 'reports.report.tag',
function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $tagTags, Carbon $start, Carbon $end) { static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $tagTags, Carbon $start, Carbon $end) {
$breadcrumbs->parent('reports.index'); $breadcrumbs->parent('reports.index');
$monthFormat = (string)trans('config.month_and_day'); $monthFormat = (string)trans('config.month_and_day');
@ -784,7 +782,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'reports.report.category', 'reports.report.category',
function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $categoryIds, Carbon $start, Carbon $end) { static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $categoryIds, Carbon $start, Carbon $end) {
$breadcrumbs->parent('reports.index'); $breadcrumbs->parent('reports.index');
$monthFormat = (string)trans('config.month_and_day'); $monthFormat = (string)trans('config.month_and_day');
@ -798,7 +796,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'reports.report.double', 'reports.report.double',
function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $doubleIds, Carbon $start, Carbon $end) { static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $doubleIds, Carbon $start, Carbon $end) {
$breadcrumbs->parent('reports.index'); $breadcrumbs->parent('reports.index');
$monthFormat = (string)trans('config.month_and_day'); $monthFormat = (string)trans('config.month_and_day');
@ -812,7 +810,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'reports.report.default', 'reports.report.default',
function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) { static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) {
$breadcrumbs->parent('reports.index'); $breadcrumbs->parent('reports.index');
$monthFormat = (string)trans('config.month_and_day'); $monthFormat = (string)trans('config.month_and_day');
@ -827,7 +825,7 @@ try {
// New user Controller // New user Controller
Breadcrumbs::register( Breadcrumbs::register(
'new-user.index', 'new-user.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.getting_started'), route('new-user.index')); $breadcrumbs->push(trans('firefly.getting_started'), route('new-user.index'));
} }
@ -836,14 +834,14 @@ try {
// Recurring transactions controller: // Recurring transactions controller:
Breadcrumbs::register( Breadcrumbs::register(
'recurring.index', 'recurring.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.recurrences'), route('recurring.index')); $breadcrumbs->push(trans('firefly.recurrences'), route('recurring.index'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'recurring.show', 'recurring.show',
function (BreadcrumbsGenerator $breadcrumbs, Recurrence $recurrence) { static function (BreadcrumbsGenerator $breadcrumbs, Recurrence $recurrence) {
$breadcrumbs->parent('recurring.index'); $breadcrumbs->parent('recurring.index');
$breadcrumbs->push($recurrence->title, route('recurring.show', [$recurrence->id])); $breadcrumbs->push($recurrence->title, route('recurring.show', [$recurrence->id]));
} }
@ -851,7 +849,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'recurring.delete', 'recurring.delete',
function (BreadcrumbsGenerator $breadcrumbs, Recurrence $recurrence) { static function (BreadcrumbsGenerator $breadcrumbs, Recurrence $recurrence) {
$breadcrumbs->parent('recurring.index'); $breadcrumbs->parent('recurring.index');
$breadcrumbs->push(trans('firefly.delete_recurring', ['title' => $recurrence->title]), route('recurring.delete', [$recurrence->id])); $breadcrumbs->push(trans('firefly.delete_recurring', ['title' => $recurrence->title]), route('recurring.delete', [$recurrence->id]));
} }
@ -859,7 +857,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'recurring.edit', 'recurring.edit',
function (BreadcrumbsGenerator $breadcrumbs, Recurrence $recurrence) { static function (BreadcrumbsGenerator $breadcrumbs, Recurrence $recurrence) {
$breadcrumbs->parent('recurring.index'); $breadcrumbs->parent('recurring.index');
$breadcrumbs->push(trans('firefly.edit_recurrence', ['title' => $recurrence->title]), route('recurring.edit', [$recurrence->id])); $breadcrumbs->push(trans('firefly.edit_recurrence', ['title' => $recurrence->title]), route('recurring.edit', [$recurrence->id]));
} }
@ -867,7 +865,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'recurring.create', 'recurring.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('recurring.index'); $breadcrumbs->parent('recurring.index');
$breadcrumbs->push(trans('firefly.create_new_recurrence'), route('recurring.create')); $breadcrumbs->push(trans('firefly.create_new_recurrence'), route('recurring.create'));
} }
@ -876,7 +874,7 @@ try {
// Rules // Rules
Breadcrumbs::register( Breadcrumbs::register(
'rules.index', 'rules.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.rules'), route('rules.index')); $breadcrumbs->push(trans('firefly.rules'), route('rules.index'));
} }
@ -884,7 +882,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'rules.create', 'rules.create',
function (BreadcrumbsGenerator $breadcrumbs, RuleGroup $ruleGroup = null) { static function (BreadcrumbsGenerator $breadcrumbs, RuleGroup $ruleGroup = null) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
if (null === $ruleGroup) { if (null === $ruleGroup) {
$breadcrumbs->push(trans('firefly.make_new_rule_no_group'), route('rules.create')); $breadcrumbs->push(trans('firefly.make_new_rule_no_group'), route('rules.create'));
@ -892,13 +890,12 @@ try {
if (null !== $ruleGroup) { if (null !== $ruleGroup) {
$breadcrumbs->push(trans('firefly.make_new_rule', ['title' => $ruleGroup->title]), route('rules.create', [$ruleGroup])); $breadcrumbs->push(trans('firefly.make_new_rule', ['title' => $ruleGroup->title]), route('rules.create', [$ruleGroup]));
} }
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'rules.create-from-bill', 'rules.create-from-bill',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push(trans('firefly.make_new_rule_no_group'), route('rules.create')); $breadcrumbs->push(trans('firefly.make_new_rule_no_group'), route('rules.create'));
} }
@ -906,7 +903,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'rules.create-from-journal', 'rules.create-from-journal',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push(trans('firefly.make_new_rule_no_group'), route('rules.create')); $breadcrumbs->push(trans('firefly.make_new_rule_no_group'), route('rules.create'));
} }
@ -914,35 +911,35 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'rules.edit', 'rules.edit',
function (BreadcrumbsGenerator $breadcrumbs, Rule $rule) { static function (BreadcrumbsGenerator $breadcrumbs, Rule $rule) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push(trans('firefly.edit_rule', ['title' => $rule->title]), route('rules.edit', [$rule])); $breadcrumbs->push(trans('firefly.edit_rule', ['title' => $rule->title]), route('rules.edit', [$rule]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'rules.delete', 'rules.delete',
function (BreadcrumbsGenerator $breadcrumbs, Rule $rule) { static function (BreadcrumbsGenerator $breadcrumbs, Rule $rule) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push(trans('firefly.delete_rule', ['title' => $rule->title]), route('rules.delete', [$rule])); $breadcrumbs->push(trans('firefly.delete_rule', ['title' => $rule->title]), route('rules.delete', [$rule]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'rule-groups.create', 'rule-groups.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push(trans('firefly.make_new_rule_group'), route('rule-groups.create')); $breadcrumbs->push(trans('firefly.make_new_rule_group'), route('rule-groups.create'));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'rule-groups.edit', 'rule-groups.edit',
function (BreadcrumbsGenerator $breadcrumbs, RuleGroup $ruleGroup) { static function (BreadcrumbsGenerator $breadcrumbs, RuleGroup $ruleGroup) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push(trans('firefly.edit_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.edit', [$ruleGroup])); $breadcrumbs->push(trans('firefly.edit_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.edit', [$ruleGroup]));
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'rule-groups.delete', 'rule-groups.delete',
function (BreadcrumbsGenerator $breadcrumbs, RuleGroup $ruleGroup) { static function (BreadcrumbsGenerator $breadcrumbs, RuleGroup $ruleGroup) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push(trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.delete', [$ruleGroup])); $breadcrumbs->push(trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]), route('rule-groups.delete', [$ruleGroup]));
} }
@ -950,7 +947,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'rules.select-transactions', 'rules.select-transactions',
function (BreadcrumbsGenerator $breadcrumbs, Rule $rule) { static function (BreadcrumbsGenerator $breadcrumbs, Rule $rule) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push( $breadcrumbs->push(
trans('firefly.rule_select_transactions', ['title' => $rule->title]), route('rules.select-transactions', [$rule]) trans('firefly.rule_select_transactions', ['title' => $rule->title]), route('rules.select-transactions', [$rule])
@ -960,7 +957,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'rule-groups.select-transactions', 'rule-groups.select-transactions',
function (BreadcrumbsGenerator $breadcrumbs, RuleGroup $ruleGroup) { static function (BreadcrumbsGenerator $breadcrumbs, RuleGroup $ruleGroup) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push( $breadcrumbs->push(
trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup]) trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup])
@ -971,7 +968,7 @@ try {
// SEARCH // SEARCH
Breadcrumbs::register( Breadcrumbs::register(
'search.index', 'search.index',
function (BreadcrumbsGenerator $breadcrumbs, $query) { static function (BreadcrumbsGenerator $breadcrumbs, $query) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.search_result', ['query' => $query]), route('search.index')); $breadcrumbs->push(trans('breadcrumbs.search_result', ['query' => $query]), route('search.index'));
} }
@ -980,7 +977,7 @@ try {
// TAGS // TAGS
Breadcrumbs::register( Breadcrumbs::register(
'tags.index', 'tags.index',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.tags'), route('tags.index')); $breadcrumbs->push(trans('breadcrumbs.tags'), route('tags.index'));
} }
@ -988,7 +985,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'tags.create', 'tags.create',
function (BreadcrumbsGenerator $breadcrumbs) { static function (BreadcrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('tags.index'); $breadcrumbs->parent('tags.index');
$breadcrumbs->push(trans('breadcrumbs.createTag'), route('tags.create')); $breadcrumbs->push(trans('breadcrumbs.createTag'), route('tags.create'));
} }
@ -996,7 +993,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'tags.edit', 'tags.edit',
function (BreadcrumbsGenerator $breadcrumbs, Tag $tag) { static function (BreadcrumbsGenerator $breadcrumbs, Tag $tag) {
$breadcrumbs->parent('tags.show', $tag); $breadcrumbs->parent('tags.show', $tag);
$breadcrumbs->push(trans('breadcrumbs.edit_tag', ['tag' => $tag->tag]), route('tags.edit', [$tag->id])); $breadcrumbs->push(trans('breadcrumbs.edit_tag', ['tag' => $tag->tag]), route('tags.edit', [$tag->id]));
} }
@ -1004,7 +1001,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'tags.delete', 'tags.delete',
function (BreadcrumbsGenerator $breadcrumbs, Tag $tag) { static function (BreadcrumbsGenerator $breadcrumbs, Tag $tag) {
$breadcrumbs->parent('tags.show', $tag); $breadcrumbs->parent('tags.show', $tag);
$breadcrumbs->push(trans('breadcrumbs.delete_tag', ['tag' => $tag->tag]), route('tags.delete', [$tag->id])); $breadcrumbs->push(trans('breadcrumbs.delete_tag', ['tag' => $tag->tag]), route('tags.delete', [$tag->id]));
} }
@ -1012,25 +1009,24 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'tags.show', 'tags.show',
function (BreadcrumbsGenerator $breadcrumbs, Tag $tag, Carbon $start = null, Carbon $end = null) { static function (BreadcrumbsGenerator $breadcrumbs, Tag $tag, Carbon $start = null, Carbon $end = null) {
$breadcrumbs->parent('tags.index'); $breadcrumbs->parent('tags.index');
$breadcrumbs->push($tag->tag, route('tags.show', [$tag->id, $start, $end])); $breadcrumbs->push($tag->tag, route('tags.show', [$tag->id, $start, $end]));
if (null !== $start && $end !== null) { if (null !== $start && null !== $end) {
$title = trans( $title = trans(
'firefly.between_dates_breadcrumb', 'firefly.between_dates_breadcrumb',
['start' => $start->formatLocalized((string)trans('config.month_and_day')), ['start' => $start->formatLocalized((string)trans('config.month_and_day')),
'end' => $end->formatLocalized((string)trans('config.month_and_day')),] 'end' => $end->formatLocalized((string)trans('config.month_and_day')), ]
); );
$breadcrumbs->push($title, route('tags.show', [$tag->id, $start, $end])); $breadcrumbs->push($title, route('tags.show', [$tag->id, $start, $end]));
} }
} }
); );
Breadcrumbs::register( Breadcrumbs::register(
'tags.show.all', 'tags.show.all',
function (BreadcrumbsGenerator $breadcrumbs, Tag $tag) { static function (BreadcrumbsGenerator $breadcrumbs, Tag $tag) {
$breadcrumbs->parent('tags.index'); $breadcrumbs->parent('tags.index');
$breadcrumbs->push($tag->tag, route('tags.show', [$tag->id])); $breadcrumbs->push($tag->tag, route('tags.show', [$tag->id]));
$title = (string)trans('firefly.all_journals_for_tag', ['tag' => $tag->tag]); $title = (string)trans('firefly.all_journals_for_tag', ['tag' => $tag->tag]);
@ -1042,7 +1038,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'transactions.index', 'transactions.index',
function (BreadcrumbsGenerator $breadcrumbs, string $what, Carbon $start = null, Carbon $end = null) { static function (BreadcrumbsGenerator $breadcrumbs, string $what, Carbon $start = null, Carbon $end = null) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what])); $breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what]));
@ -1050,8 +1046,8 @@ try {
// add date range: // add date range:
$title = trans( $title = trans(
'firefly.between_dates_breadcrumb', 'firefly.between_dates_breadcrumb',
['start' => $start->formatLocalized((string)trans('config.month_and_day')), ['start' => $start->formatLocalized((string)trans('config.month_and_day')),
'end' => $end->formatLocalized((string)trans('config.month_and_day')),] 'end' => $end->formatLocalized((string)trans('config.month_and_day')), ]
); );
$breadcrumbs->push($title, route('transactions.index', [$what, $start, $end])); $breadcrumbs->push($title, route('transactions.index', [$what, $start, $end]));
} }
@ -1060,7 +1056,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'transactions.index.all', 'transactions.index.all',
function (BreadcrumbsGenerator $breadcrumbs, string $what) { static function (BreadcrumbsGenerator $breadcrumbs, string $what) {
$breadcrumbs->parent('home'); $breadcrumbs->parent('home');
$breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what])); $breadcrumbs->push(trans('breadcrumbs.' . $what . '_list'), route('transactions.index', [$what]));
} }
@ -1068,7 +1064,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'transactions.create', 'transactions.create',
function (BreadcrumbsGenerator $breadcrumbs, string $objectType) { static function (BreadcrumbsGenerator $breadcrumbs, string $objectType) {
$breadcrumbs->parent('transactions.index', $objectType); $breadcrumbs->parent('transactions.index', $objectType);
$breadcrumbs->push(trans('breadcrumbs.create_new_transaction'), route('transactions.create', [$objectType])); $breadcrumbs->push(trans('breadcrumbs.create_new_transaction'), route('transactions.create', [$objectType]));
} }
@ -1076,7 +1072,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'transactions.edit', 'transactions.edit',
function (BreadcrumbsGenerator $breadcrumbs, TransactionGroup $group) { static function (BreadcrumbsGenerator $breadcrumbs, TransactionGroup $group) {
$breadcrumbs->parent('transactions.show', $group); $breadcrumbs->parent('transactions.show', $group);
/** @var TransactionJournal $first */ /** @var TransactionJournal $first */
@ -1091,7 +1087,7 @@ try {
// also edit reconciliations: // also edit reconciliations:
Breadcrumbs::register( Breadcrumbs::register(
'accounts.reconcile.edit', 'accounts.reconcile.edit',
function (BreadcrumbsGenerator $breadcrumbs, TransactionJournal $journal) { static function (BreadcrumbsGenerator $breadcrumbs, TransactionJournal $journal) {
$breadcrumbs->parent('transactions.show', $journal); $breadcrumbs->parent('transactions.show', $journal);
$breadcrumbs->push( $breadcrumbs->push(
trans('breadcrumbs.edit_reconciliation', ['description' => limitStringLength($journal->description)]), trans('breadcrumbs.edit_reconciliation', ['description' => limitStringLength($journal->description)]),
@ -1123,14 +1119,16 @@ try {
if ($group->transactionJournals()->count() > 1) { if ($group->transactionJournals()->count() > 1) {
$title = limitStringLength($group->title); $title = limitStringLength($group->title);
} }
if('opening balance' === $type) { if ('opening balance' === $type) {
// TODO link to account. // TODO link to account.
$breadcrumbs->push($title, route('transactions.show', [$group->id])); $breadcrumbs->push($title, route('transactions.show', [$group->id]));
return; return;
} }
if('reconciliation' === $type) { if ('reconciliation' === $type) {
// TODO link to account. // TODO link to account.
$breadcrumbs->push($title, route('transactions.show', [$group->id])); $breadcrumbs->push($title, route('transactions.show', [$group->id]));
return; return;
} }
@ -1141,7 +1139,7 @@ try {
Breadcrumbs::register( Breadcrumbs::register(
'transactions.convert.index', 'transactions.convert.index',
function (BreadcrumbsGenerator $breadcrumbs, TransactionGroup $group, string $groupTitle) { static function (BreadcrumbsGenerator $breadcrumbs, TransactionGroup $group, string $groupTitle) {
$breadcrumbs->parent('transactions.show', $group); $breadcrumbs->parent('transactions.show', $group);
$breadcrumbs->push( $breadcrumbs->push(
trans('firefly.breadcrumb_convert_group', ['description' => limitStringLength($groupTitle)]), trans('firefly.breadcrumb_convert_group', ['description' => limitStringLength($groupTitle)]),
@ -1194,7 +1192,7 @@ try {
// SPLIT // SPLIT
Breadcrumbs::register( Breadcrumbs::register(
'transactions.split.edit', 'transactions.split.edit',
function (BreadcrumbsGenerator $breadcrumbs, TransactionJournal $journal) { static function (BreadcrumbsGenerator $breadcrumbs, TransactionJournal $journal) {
$breadcrumbs->parent('transactions.show', $journal); $breadcrumbs->parent('transactions.show', $journal);
$breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.split.edit', [$journal->id])); $breadcrumbs->push(trans('breadcrumbs.edit_journal', ['description' => $journal->description]), route('transactions.split.edit', [$journal->id]));
} }

View File

@ -2,7 +2,7 @@
/** /**
* channels.php * channels.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -22,7 +22,6 @@
declare(strict_types=1); declare(strict_types=1);
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Broadcast Channels | Broadcast Channels
@ -35,7 +34,7 @@ declare(strict_types=1);
*/ */
Broadcast::channel( Broadcast::channel(
'App.User.{id}', function ($user, $id) { 'App.User.{id}', static function ($user, $id) {
return (int)$user->id === (int)$id; return (int)$user->id === (int)$id;
} }
); );

View File

@ -2,7 +2,7 @@
/** /**
* console.php * console.php
* Copyright (c) 2019 james@firefly-iii.org * Copyright (c) 2019 james@firefly-iii.org.
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@ -21,4 +21,3 @@
*/ */
declare(strict_types=1); declare(strict_types=1);

File diff suppressed because it is too large Load Diff