diff --git a/app/Http/Controllers/AppController.php b/app/Http/Controllers/AppController.php index d701f35da..71263647f 100644 --- a/app/Http/Controllers/AppController.php +++ b/app/Http/Controllers/AppController.php @@ -10,6 +10,7 @@ use Utils; use View; use Ninja\Mailers\Mailer; use Ninja\Repositories\AccountRepository; +use Redirect; class AppController extends BaseController { diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 14a1c17a8..983bd8889 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -3,6 +3,7 @@ use App\Libraries\Utils; use Ninja\Mailers\Mailer; use Redirect; +use App\Models\Account; class HomeController extends BaseController { diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index a72197074..81d9ee6e2 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -1,5 +1,8 @@ hasMany('User'); + return $this->hasMany('App\Models\User'); } public function clients() { - return $this->hasMany('Client'); + return $this->hasMany('App\Models\Client'); } public function invoices() { - return $this->hasMany('Invoice'); + return $this->hasMany('App\Models\Invoice'); } public function account_gateways() { - return $this->hasMany('AccountGateway'); + return $this->hasMany('App\Models\AccountGateway'); } public function tax_rates() { - return $this->hasMany('TaxRate'); + return $this->hasMany('App\Models\TaxRate'); } public function country() { - return $this->belongsTo('Country'); + return $this->belongsTo('App\Models\Country'); } public function timezone() { - return $this->belongsTo('Timezone'); + return $this->belongsTo('App\Models\Timezone'); } public function language() { - return $this->belongsTo('Language'); + return $this->belongsTo('App\Models\Language'); } public function date_format() { - return $this->belongsTo('DateFormat'); + return $this->belongsTo('App\Models\DateFormat'); } public function datetime_format() { - return $this->belongsTo('DatetimeFormat'); + return $this->belongsTo('App\Models\DatetimeFormat'); } public function size() { - return $this->belongsTo('Size'); + return $this->belongsTo('App\Models\Size'); } public function industry() { - return $this->belongsTo('Industry'); + return $this->belongsTo('App\Models\Industry'); } public function isGatewayConfigured($gatewayId = 0) diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 23c248de0..4b0653284 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -17,7 +17,7 @@ class Activity extends Eloquent public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\Models\User'); } private static function getBlank($entity = false) diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php index dc0ea2c46..ef0a53753 100644 --- a/app/Models/Invitation.php +++ b/app/Models/Invitation.php @@ -14,7 +14,7 @@ class Invitation extends EntityModel public function user() { - return $this->belongsTo('User')->withTrashed(); + return $this->belongsTo('App\Models\User')->withTrashed(); } public function account() diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index fc3699b0e..f93832e59 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -9,7 +9,7 @@ class Invoice extends EntityModel public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\Models\User'); } public function client() diff --git a/app/Models/Project.php b/app/Models/Project.php index 79cf9bf8c..f3ecdf3f1 100644 --- a/app/Models/Project.php +++ b/app/Models/Project.php @@ -15,7 +15,7 @@ class Project extends Eloquent public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\Models\User'); } public function client() diff --git a/app/Models/ProjectCode.php b/app/Models/ProjectCode.php index c1a999f88..17531449b 100644 --- a/app/Models/ProjectCode.php +++ b/app/Models/ProjectCode.php @@ -15,7 +15,7 @@ class ProjectCode extends Eloquent public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\Models\User'); } public function project() diff --git a/app/Models/Timesheet.php b/app/Models/Timesheet.php index bb946305d..c1739c654 100644 --- a/app/Models/Timesheet.php +++ b/app/Models/Timesheet.php @@ -12,7 +12,7 @@ class Timesheet extends Eloquent public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\Models\User'); } public function timesheet_events() diff --git a/app/Models/TimesheetEvent.php b/app/Models/TimesheetEvent.php index d66896868..33f8e39c5 100644 --- a/app/Models/TimesheetEvent.php +++ b/app/Models/TimesheetEvent.php @@ -27,7 +27,7 @@ class TimesheetEvent extends Eloquent public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\Models\User'); } public function source() diff --git a/app/Models/TimesheetEventSource.php b/app/Models/TimesheetEventSource.php index 52c64a580..2f82b3c6b 100644 --- a/app/Models/TimesheetEventSource.php +++ b/app/Models/TimesheetEventSource.php @@ -15,7 +15,7 @@ class TimesheetEventSource extends Eloquent public function user() { - return $this->belongsTo('User'); + return $this->belongsTo('App\Models\User'); } public function events() diff --git a/app/Models/User.php b/app/Models/User.php index 86c5aeda0..27dd24e1a 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -1,14 +1,25 @@