You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
526 B
27 lines
526 B
<?php
|
|
// this is comment in address
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Address extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $fillable = ['city_id', 'title', 'postal_code', 'phones', 'addressable_id', 'addressable_type', 'district_id'];
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
public function addressable()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
public function city ()
|
|
{
|
|
return $this->belongsTo('App\City');
|
|
}
|
|
|
|
}
|