Skip to content

Instantly share code, notes, and snippets.

@andidp
Created August 9, 2016 07:07
Show Gist options
  • Save andidp/b66e822e065b533933c29c7d95176b3a to your computer and use it in GitHub Desktop.
Save andidp/b66e822e065b533933c29c7d95176b3a to your computer and use it in GitHub Desktop.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Answer extends Model
{
/**
* Get the question that owns the answer.
*/
public function question()
{
return $this->belongsTo('App\Question');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment