From Test, 4 Months ago, written in PHP.
Embed
  1. <?php
  2.  
  3. namespace App;
  4.  
  5. use Illuminate\Database\Eloquent\Model;
  6.  
  7. class Answer extends Model
  8. {
  9.     protected $fillalbe = [
  10.         'respondent_id', 'body'
  11.     ];
  12.  
  13.     public function respondent()
  14.     {
  15.         return $this->belongsTo(Respondent::class);
  16.     }
  17. }
  18.