bulk commit

This commit is contained in:
omair saleh
2020-08-24 09:54:49 +08:00
parent bd9fe94ddc
commit 7f712e6ca8
108 changed files with 1601 additions and 583 deletions
+2 -47
View File
@@ -2,7 +2,7 @@
namespace App\Models;
use App\Models\AbstractModel as Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;
@@ -26,60 +26,15 @@ class Address extends AbstractModel
protected $table = 'addresses';
protected $dates = ['deleted_at'];
public $fillable = [
'street_one',
'street_two',
'city',
'state',
'post_code',
'country'
];
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'street_one' => 'string',
'street_two' => 'string',
'city' => 'string',
'state' => 'string',
'post_code' => 'string',
'country' => 'string',
'default' => 'integer',
'billing' => 'integer'
];
/**
* Validation rules
*
* @var array
*/
public static $rules = [
'company_id' => 'required',
'street_one' => 'required',
'city' => 'required',
'state' => 'required',
'post_code' => 'required',
'country' => 'required',
'default' => 'required',
'billing' => 'required'
];
/**
* @return \Illuminate\Database\Eloquent\Relations\HasOne
**/
public function company(): HasOne
{
return $this->hasOne(\App\Models\Company::class, 'company_id', 'id');
return $this->hasOne(Company::class, 'company_id', 'id');
}
}