Initial Commit; base feats
This commit is contained in:
commit
9732135e90
137 changed files with 13856 additions and 0 deletions
33
app/Models/Address.php
Normal file
33
app/Models/Address.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Address extends Model
|
||||
{
|
||||
|
||||
protected $table = 'addresses';
|
||||
protected $primaryKey = 'address_id';
|
||||
public $timestamps = false;
|
||||
protected $fillable = [
|
||||
'address_street',
|
||||
'address_city',
|
||||
'address_state',
|
||||
'address_zip',
|
||||
'address_country',
|
||||
'user_id', // to whom does this address belong?
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue