osb/app/Models/AdslPlan.php

30 lines
587 B
PHP
Raw Normal View History

2018-08-11 05:09:41 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Traits\OrderServiceOptions;
class AdslPlan extends Model
{
use OrderServiceOptions;
protected $table = 'ab_adsl_plan';
protected $order_attributes = [
'options.address'=>[
'request'=>'options.address',
'key'=>'service_address',
'validation'=>'required|string:10',
'validation_message'=>'Address is a required field.',
],
];
protected $order_model = Service\Adsl::class;
2018-08-11 05:09:41 +00:00
public function product()
{
return $this->hasOne(AdslSupplierPlan::class,'id','adsl_supplier_plan_id');
}
}