Last active
April 15, 2020 02:17
-
-
Save Cerwyn/1a3164f5624fe50fe86be45008c1cf69 to your computer and use it in GitHub Desktop.
One-to-one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Address extends Model | |
{ | |
protected $fillable = [ | |
'zip_code', 'country', | |
]; | |
public function user(){ | |
return $this->belongsTo('App\User'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment