WIP: Standard backend theme page and login

Signed-off-by: Deon George <deon@leenooks.net>
This commit is contained in:
Deon George
2017-12-12 16:28:49 +11:00
parent e594ff2057
commit 33658e37a3
45 changed files with 1150 additions and 896 deletions

26
app/Models/Country.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Country extends Model
{
public $timestamps = FALSE;
/**
* The currency this country belongs to
*/
public function currency()
{
return $this->belongsTo('App\Models\Currency');
}
/**
* The accounts in this country
*/
public function users()
{
return $this->hasMany('App\User');
}
}

18
app/Models/Currency.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Currency extends Model
{
public $timestamps = FALSE;
/**
* The accounts in this country
*/
public function countries()
{
return $this->hasMany('App\Models\Country');
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Models\Old;
use Illuminate\Database\Eloquent\Model;
class Account extends Model
{
protected $table = 'ab_account';
/**
* The country this account belongs to
*/
public function country()
{
return $this->belongsTo('App\Models\Old\Country');
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Models\Old;
use Illuminate\Database\Eloquent\Model;
class Country extends Model
{
protected $table = 'ab_country';
/**
* The currency this country belongs to
*/
public function currency()
{
return $this->belongsTo('App\Models\Old\Currency');
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Models\Old;
use Illuminate\Database\Eloquent\Model;
class Currency extends Model
{
protected $table = 'ab_currency';
}

View File

@@ -6,8 +6,6 @@ use Illuminate\Database\Eloquent\Model;
class Site extends Model
{
protected $table = 'site';
protected $casts = [
'address'=>'array',
];