Fixed order processing, broken after upgrade to Laravel 5.8
This commit is contained in:
@@ -9,6 +9,9 @@ use App\Traits\NextKey;
|
||||
class Account extends Model
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'account';
|
||||
|
||||
public $incrementing = FALSE;
|
||||
|
||||
protected $table = 'ab_account';
|
||||
|
@@ -21,7 +21,7 @@ class AdslPlan extends Model
|
||||
],
|
||||
];
|
||||
|
||||
protected $order_model = ServiceAdsl::class;
|
||||
protected $order_model = Service\Adsl::class;
|
||||
|
||||
public function product()
|
||||
{
|
||||
|
@@ -4,12 +4,8 @@ namespace App\Models\Base;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
abstract class ServiceType extends Model
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
public $timestamps = FALSE;
|
||||
public $dateFormat = 'U';
|
||||
|
||||
|
@@ -31,5 +31,5 @@ class PlanVoip extends Model
|
||||
],
|
||||
];
|
||||
|
||||
protected $order_model = ServiceVoip::class;
|
||||
protected $order_model = Service\Voip::class;
|
||||
}
|
@@ -10,9 +10,11 @@ class Service extends Model
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
public $incrementing = FALSE;
|
||||
const RECORD_ID = 'service';
|
||||
|
||||
const CREATED_AT = 'date_orig';
|
||||
const UPDATED_AT = 'date_last';
|
||||
public $incrementing = FALSE;
|
||||
|
||||
protected $table = 'ab_service';
|
||||
protected $with = ['product.descriptions','account.language'];
|
||||
@@ -86,7 +88,7 @@ class Service extends Model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function orderedby()
|
||||
public function orderby()
|
||||
{
|
||||
return $this->belongsTo(Account::class);
|
||||
}
|
||||
|
@@ -2,8 +2,14 @@
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class Adsl extends \App\Models\Base\ServiceType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'service__adsl';
|
||||
|
||||
// @todo column service_id can be removed.
|
||||
protected $table = 'ab_service__adsl';
|
||||
|
||||
|
@@ -2,8 +2,14 @@
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class Domain extends \App\Models\Base\ServiceType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'service__domain';
|
||||
|
||||
protected $table = 'ab_service__domain';
|
||||
|
||||
public function tld()
|
||||
|
@@ -2,8 +2,14 @@
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class Host extends \App\Models\Base\ServiceType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'service__hosting';
|
||||
|
||||
protected $table = 'ab_service__hosting';
|
||||
|
||||
public function getNameAttribute()
|
||||
|
@@ -2,9 +2,16 @@
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class SSL extends \App\Models\Base\ServiceType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'service__ssl';
|
||||
|
||||
protected $table = 'ab_service__ssl';
|
||||
|
||||
protected $_o = NULL;
|
||||
|
||||
public function tld()
|
||||
|
@@ -2,8 +2,14 @@
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class Voip extends \App\Models\Base\ServiceType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'service__adsl';
|
||||
|
||||
protected $table = 'ab_service__voip';
|
||||
|
||||
public function getFullNameAttribute()
|
||||
|
Reference in New Issue
Block a user