Skip to content

Instantly share code, notes, and snippets.

@EmmanuelObua
Created May 13, 2021 09:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save EmmanuelObua/1afba7497f3a913c32500f1f1b9dc44a to your computer and use it in GitHub Desktop.
User model with profile relationship
<?php
/**
* User
*
* @author Obua Emmanuel <eobua6882@gmail.com>
* @copyright 2021 Obua Emmanuel
* @link http://emmanuelobua.me
* @version 1.0.0
*
*/
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
public function profile()
{
return $this->hasOne(Profile::class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment