1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 00:53:10 +01:00

Namespace Updates and Confide Changes

This commit is contained in:
Jeramy Simpson 2015-03-23 16:52:01 +10:00
parent 5584121afb
commit cf5adfad25
16 changed files with 72 additions and 31 deletions

View File

@ -10,6 +10,7 @@ use Utils;
use View;
use Ninja\Mailers\Mailer;
use Ninja\Repositories\AccountRepository;
use Redirect;
class AppController extends BaseController
{

View File

@ -3,6 +3,7 @@
use App\Libraries\Utils;
use Ninja\Mailers\Mailer;
use Redirect;
use App\Models\Account;
class HomeController extends BaseController
{

View File

@ -1,5 +1,8 @@
<?php namespace App\Http\Controllers;
use Config;
use View;
use Confide;
use Auth;
use App\Http\Requests;
use App\Http\Controllers\Controller;

View File

@ -3,6 +3,9 @@
use Closure;
use Utils;
use App;
use Auth;
use Input;
use Redirect;
class StartupCheck {

View File

@ -1,67 +1,69 @@
<?php namespace App\Models;
use Eloquent;
class Account extends Eloquent
{
protected $softDelete = true;
public function users()
{
return $this->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)

View File

@ -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)

View File

@ -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()

View File

@ -9,7 +9,7 @@ class Invoice extends EntityModel
public function user()
{
return $this->belongsTo('User');
return $this->belongsTo('App\Models\User');
}
public function client()

View File

@ -15,7 +15,7 @@ class Project extends Eloquent
public function user()
{
return $this->belongsTo('User');
return $this->belongsTo('App\Models\User');
}
public function client()

View File

@ -15,7 +15,7 @@ class ProjectCode extends Eloquent
public function user()
{
return $this->belongsTo('User');
return $this->belongsTo('App\Models\User');
}
public function project()

View File

@ -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()

View File

@ -27,7 +27,7 @@ class TimesheetEvent extends Eloquent
public function user()
{
return $this->belongsTo('User');
return $this->belongsTo('App\Models\User');
}
public function source()

View File

@ -15,7 +15,7 @@ class TimesheetEventSource extends Eloquent
public function user()
{
return $this->belongsTo('User');
return $this->belongsTo('App\Models\User');
}
public function events()

View File

@ -1,14 +1,25 @@
<?php namespace App\Models;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Eloquent;
// use Illuminate\Auth\UserInterface;
// use Illuminate\Auth\Reminders\RemindableInterface;
use Zizaco\Confide\ConfideUser;
class User extends Model implements AuthenticatableContract, CanResetPasswordContract {
// use Illuminate\Auth\Authenticatable;
// use Illuminate\Auth\Passwords\CanResetPassword;
// use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
// use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Authenticatable, CanResetPassword;
// use Zizaco\Confide\ConfideUser;
use Zizaco\Confide\ConfideUserInterface;
class User extends Eloquent implements ConfideUserInterface {
// class User extends ConfideUser implements UserInterface, RemindableInterface {
// use Authenticatable, CanResetPassword;
use ConfideUser;
protected $softDelete = true;
@ -172,4 +183,9 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
{
return 'remember_token';
}
// public function confirm(){}
// public function forgotPassword(){}
// public function isValid(){}
}

View File

@ -1,12 +1,12 @@
<?php namespace Ninja\Repositories;
use Client;
use Contact;
use Account;
use App\Models\Client;
use App\Models\Contact;
use App\Models\Account;
use Request;
use Session;
use Language;
use User;
use App\Models\User;
use Auth;
use Invitation;
use Invoice;

View File

@ -25,10 +25,23 @@
"reference": "origin/master"
}
}
},
{
"type": "package",
"package": {
"name": "impleri/confide",
"version": "dev-master",
"source": {
"url": "https://github.com/impleri/confide",
"type": "git",
"reference": "origin/master"
}
}
}
],
"require": {
"laravel/framework": "5.0.*",
"impleri/confide": "dev-master",
"patricktalmadge/bootstrapper": "5.5.x",
"anahkiasen/former": "4.0.*@dev",
"barryvdh/laravel-debugbar": "~2.0.2",
@ -61,7 +74,9 @@
"app/Http/Controllers",
"app/Models",
"app/Ninja",
"app/Ninja/Repositories",
"vendor/calvinfroedge/PHP-Payments/lib",
"vendor/impleri/confide/src",
"database"
],
"psr-4": {