Last active
March 28, 2020 21:44
-
-
Save nwaughachukwuma/216977de737680063cbb61af0e44025e to your computer and use it in GitHub Desktop.
A photo model with it's relationships
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
<? | |
use Illuminate\Database\Eloquent\Model; | |
class Photo extends Model | |
{ | |
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