Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Some updates.
James Colebc16298b6e3f
diff --git a/app/Models/Account.php b/app/Models/Account.phpindex 086a812704..0fc0d17393 100644--- a/app/Models/Account.php+++ b/app/Models/Account.php@@ -12,17 +12,17 @@ class Account extends Modelpublic function accountMeta(){- return $this->hasMany('AccountMeta');+ return $this->hasMany('FireflyIII\Models\AccountMeta');}public function accountType(){- return $this->belongsTo('AccountType');+ return $this->belongsTo('FireflyIII\Models\AccountType');}public function user(){- return $this->belongsTo('User');+ return $this->belongsTo('FireflyIII\User');}diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.phpindex a90460af49..9dc8b17ff2 100644--- a/app/Models/AccountMeta.php+++ b/app/Models/AccountMeta.php@@ -7,7 +7,7 @@ class AccountMeta extends Modelpublic function account(){- return $this->belongsTo('Account');+ return $this->belongsTo('FireflyIII\Models\Account');}diff --git a/app/Models/AccountType.php b/app/Models/AccountType.phpindex b3369c656c..4933080210 100644--- a/app/Models/AccountType.php+++ b/app/Models/AccountType.php@@ -8,6 +8,6 @@ class AccountType extends Model//public function accounts(){- return $this->hasMany('Account');+ return $this->hasMany('FireflyIII\Models\Account');}}diff --git a/app/Models/Bill.php b/app/Models/Bill.phpindex b1226a1a1d..1ef82afe84 100644--- a/app/Models/Bill.php+++ b/app/Models/Bill.php@@ -7,12 +7,12 @@ class Bill extends Modelpublic function transactionjournals(){- return $this->hasMany('TransactionJournal');+ return $this->hasMany('FireflyIII\Models\TransactionJournal');}public function user(){- return $this->belongsTo('User');+ return $this->belongsTo('FireflyIII\User');}diff --git a/app/Models/Budget.php b/app/Models/Budget.phpindex e8c7ac829a..469f8c791b 100644--- a/app/Models/Budget.php+++ b/app/Models/Budget.php@@ -8,22 +8,22 @@ class Budget extends Modelpublic function budgetlimits(){- return $this->hasMany('BudgetLimit');+ return $this->hasMany('FireflyIII\Models\BudgetLimit');}public function limitrepetitions(){- return $this->hasManyThrough('LimitRepetition', 'BudgetLimit', 'budget_id');+ return $this->hasManyThrough('FireflyIII\Models\LimitRepetition', 'BudgetLimit', 'budget_id');}public function transactionjournals(){- return $this->belongsToMany('TransactionJournal', 'budget_transaction_journal', 'budget_id');+ return $this->belongsToMany('FireflyIII\Models\TransactionJournal', 'budget_transaction_journal', 'budget_id');}public function user(){- return $this->belongsTo('User');+ return $this->belongsTo('FireflyIII\User');}diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.phpindex 61fdc17962..c9723f7f9b 100644--- a/app/Models/BudgetLimit.php+++ b/app/Models/BudgetLimit.php@@ -7,12 +7,12 @@ class BudgetLimit extends Modelpublic function budget(){- return $this->belongsTo('Budget');+ return $this->belongsTo('FireflyIII\Models\Budget');}public function limitrepetitions(){- return $this->hasMany('LimitRepetition');+ return $this->hasMany('FireflyIII\Models\LimitRepetition');}}diff --git a/app/Models/Category.php b/app/Models/Category.phpindex 912242f176..4e74ae7b69 100644--- a/app/Models/Category.php+++ b/app/Models/Category.php@@ -7,12 +7,12 @@ class Category extends Modelpublic function transactionjournals(){- return $this->belongsToMany('TransactionJournal', 'category_transaction_journal', 'category_id');+ return $this->belongsToMany('FireflyIII\Models\TransactionJournal', 'category_transaction_journal', 'category_id');}public function user(){- return $this->belongsTo('User');+ return $this->belongsTo('FireflyIII\User');}}diff --git a/app/Models/LimitRepetition.php b/app/Models/LimitRepetition.phpindex 039aa5f941..c485bc7add 100644--- a/app/Models/LimitRepetition.php+++ b/app/Models/LimitRepetition.php@@ -7,7 +7,7 @@ class LimitRepetition extends Modelpublic function budgetLimit(){- return $this->belongsTo('BudgetLimit');+ return $this->belongsTo('FireflyIII\Models\BudgetLimit');}}diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.phpindex fbd728bbde..5d1eb4ee33 100644--- a/app/Models/PiggyBank.php+++ b/app/Models/PiggyBank.php@@ -7,21 +7,21 @@ class PiggyBank extends Modelpublic function account(){- return $this->belongsTo('Account');+ return $this->belongsTo('FireflyIII\Models\Account');}public function piggyBankEvents(){- return $this->hasMany('PiggyBankEvent');+ return $this->hasMany('FireflyIII\Models\PiggyBankEvent');}public function piggyBankRepetitions(){- return $this->hasMany('PiggyBankRepetition');+ return $this->hasMany('FireflyIII\Models\PiggyBankRepetition');}public function reminders(){- return $this->morphMany('Reminder', 'remindersable');+ return $this->morphMany('FireflyIII\Models\Reminder', 'remindersable');}}diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.phpindex 85242c29f8..405fb14b2b 100644--- a/app/Models/PiggyBankEvent.php+++ b/app/Models/PiggyBankEvent.php@@ -7,12 +7,12 @@ class PiggyBankEvent extends Modelpublic function piggyBank(){- return $this->belongsTo('PiggyBank');+ return $this->belongsTo('FireflyIII\Models\PiggyBank');}public function transactionJournal(){- return $this->belongsTo('TransactionJournal');+ return $this->belongsTo('FireflyIII\Models\TransactionJournal');}}diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.phpindex b17a2547b6..356373b4cf 100644--- a/app/Models/PiggyBankRepetition.php+++ b/app/Models/PiggyBankRepetition.php@@ -7,7 +7,7 @@ class PiggyBankRepetition extends Modelpublic function piggyBank(){- return $this->belongsTo('PiggyBank');+ return $this->belongsTo('FireflyIII\Models\PiggyBank');}}diff --git a/app/Models/Preference.php b/app/Models/Preference.phpindex 26fba678e0..b06be83545 100644--- a/app/Models/Preference.php+++ b/app/Models/Preference.php@@ -17,7 +17,7 @@ class Preference extends Modelpublic function user(){- return $this->belongsTo('User');+ return $this->belongsTo('FireflyIII\User');}}diff --git a/app/Models/Reminder.php b/app/Models/Reminder.phpindex 9ea434e14b..124cc12cd4 100644--- a/app/Models/Reminder.php+++ b/app/Models/Reminder.php@@ -12,7 +12,7 @@ class Reminder extends Modelpublic function user(){- return $this->belongsTo('User');+ return $this->belongsTo('FireflyIII\User');}diff --git a/app/Models/Transaction.php b/app/Models/Transaction.phpindex 84672db4ff..afe1adf8ce 100644--- a/app/Models/Transaction.php+++ b/app/Models/Transaction.php@@ -7,12 +7,12 @@ class Transaction extends Modelpublic function account(){- return $this->belongsTo('Account');+ return $this->belongsTo('FireflyIII\Models\Account');}public function transactionJournal(){- return $this->belongsTo('TransactionJournal');+ return $this->belongsTo('FireflyIII\Models\TransactionJournal');}}diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.phpindex a14db72e4c..d30539b27c 100644--- a/app/Models/TransactionCurrency.php+++ b/app/Models/TransactionCurrency.php@@ -7,7 +7,7 @@ class TransactionCurrency extends Modelpublic function transactionJournals(){- return $this->hasMany('TransactionJournal');+ return $this->hasMany('FireflyIII\Models\TransactionJournal');}}diff --git a/app/Models/TransactionGroup.php b/app/Models/TransactionGroup.phpindex c65f6a7ccd..e9369265ed 100644--- a/app/Models/TransactionGroup.php+++ b/app/Models/TransactionGroup.php@@ -7,12 +7,12 @@ class TransactionGroup extends Modelpublic function transactionjournals(){- return $this->belongsToMany('TransactionJournal');+ return $this->belongsToMany('FireflyIII\Models\TransactionJournal');}public function user(){- return $this->belongsTo('User');+ return $this->belongsTo('FireflyIII\User');}diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.phpindex 973eef46b3..0c4c694eef 100644--- a/app/Models/TransactionJournal.php+++ b/app/Models/TransactionJournal.php@@ -7,17 +7,17 @@ class TransactionJournal extends Modelpublic function bill(){- return $this->belongsTo('Bill');+ return $this->belongsTo('FireflyIII\Models\Bill');}public function budgets(){- return $this->belongsToMany('Budget');+ return $this->belongsToMany('FireflyIII\Models\Budget');}public function categories(){- return $this->belongsToMany('Category');+ return $this->belongsToMany('FireflyIII\Models\Category');}public function getDescriptionAttribute($value)@@ -33,38 +33,38 @@ class TransactionJournal extends Modelpublic function piggyBankEvents(){- return $this->hasMany('PiggyBankEvent');+ return $this->hasMany('FireflyIII\Models\PiggyBankEvent');}public function setDescriptionAttribute($value){- $this->attributes['description'] = Crypt::encrypt($value);+ $this->attributes['description'] = \Crypt::encrypt($value);$this->attributes['encrypted'] = true;}public function transactionCurrency(){- return $this->belongsTo('TransactionCurrency');+ return $this->belongsTo('FireflyIII\Models\TransactionCurrency');}public function transactionType(){- return $this->belongsTo('TransactionType');+ return $this->belongsTo('FireflyIII\Models\TransactionType');}public function transactiongroups(){- return $this->belongsToMany('TransactionGroup');+ return $this->belongsToMany('FireflyIII\Models\TransactionGroup');}public function transactions(){- return $this->hasMany('Transaction');+ return $this->hasMany('FireflyIII\Models\Transaction');}public function user(){- return $this->belongsTo('User');+ return $this->belongsTo('FireflyIII\User');}diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.phpindex d587b027d5..37acae6acb 100644--- a/app/Models/TransactionType.php+++ b/app/Models/TransactionType.php@@ -7,7 +7,7 @@ class TransactionType extends Modelpublic function transactionJournals(){- return $this->hasMany('TransactionJournal');+ return $this->hasMany('FireflyIII\Models\TransactionJournal');}}diff --git a/app/Models/User.php b/app/User.phpsimilarity index 67%rename from app/Models/User.phprename to app/User.phpindex e606e579d0..595f1bcddc 100644--- a/app/Models/User.php+++ b/app/User.php@@ -1,4 +1,4 @@-<?php namespace FireflyIII\Models;+<?php namespace FireflyIII;use Illuminate\Auth\Authenticatable;use Illuminate\Auth\Passwords\CanResetPassword;@@ -32,47 +32,47 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordConpublic function accounts(){- return $this->hasMany('Account');+ return $this->hasMany('FireflyIII\Models\Account');}public function bills(){- return $this->hasMany('Bill');+ return $this->hasMany('FireflyIII\Models\Bill');}public function budgets(){- return $this->hasMany('Budget');+ return $this->hasMany('FireflyIII\Models\Budget');}public function categories(){- return $this->hasMany('Category');+ return $this->hasMany('FireflyIII\Models\Category');}public function piggyBanks(){- return $this->hasManyThrough('PiggyBank', 'Account');+ return $this->hasManyThrough('FireflyIII\Models\PiggyBank', 'Account');}public function preferences(){- return $this->hasMany('Preference');+ return $this->hasMany('FireflyIII\Models\Preference');}public function reminders(){- return $this->hasMany('Reminder');+ return $this->hasMany('FireflyIII\Models\Reminder');}public function transactionjournals(){- return $this->hasMany('TransactionJournal');+ return $this->hasMany('FireflyIII\Models\TransactionJournal');}public function setPasswordAttribute($value){- $this->attributes['password'] = Hash::make($value);+ $this->attributes['password'] = \Hash::make($value);}}diff --git a/composer.lock b/composer.lockindex 724e3cbbe0..1d2d6a6bde 100644--- a/composer.lock+++ b/composer.lock@@ -4,7 +4,7 @@"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file","This file is @generated automatically"],- "hash": "748428ef7844b760438fcafa6965cafa",+ "hash": "5bb84809ab2fa2c5a8486b6b38f1e47f","packages": [{"name": "classpreloader/classpreloader",diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.phpindex 2f75349429..3d24119910 100644--- a/database/seeds/TestDataSeeder.php+++ b/database/seeds/TestDataSeeder.php@@ -1,7 +1,7 @@<?phpuse Carbon\Carbon;use Illuminate\Database\Seeder;-use FireflyIII\Models\User;+use FireflyIII\User;use FireflyIII\Models\Account;use FireflyIII\Models\AccountType;use FireflyIII\Models\Budget;@@ -17,6 +17,7 @@ use FireflyIII\Models\Transaction;use FireflyIII\Models\TransactionCurrency;use FireflyIII\Models\TransactionJournal;use FireflyIII\Models\TransactionType;+use FireflyIII\Models\TransactionGroup;/*** @SuppressWarnings("CamelCase") // I'm fine with this.