33 lines
627 B
PHP
Executable File
33 lines
627 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* @package App\Models
|
|
* @property integer $id
|
|
* @property integer $order_id
|
|
* @property integer $city_id
|
|
* @property string $home
|
|
* @property string $landmark
|
|
*
|
|
* @property-read Order $order
|
|
* @property-read City $city
|
|
*/
|
|
class OrderAddress extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
public function city(): BelongsTo
|
|
{
|
|
return $this->belongsTo(City::class);
|
|
}
|
|
|
|
public function order(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Order::class);
|
|
}
|
|
}
|