Make customer addresses editable.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Address extends Model
|
||||
@@ -26,4 +27,12 @@ class Address extends Model
|
||||
'country',
|
||||
'zip',
|
||||
];
|
||||
|
||||
/**
|
||||
* Return the customer having the address.
|
||||
*/
|
||||
public function customer(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user