Word.php 391 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Word extends Model
  5. {
  6. /**
  7. * The attributes that are mass assignable.
  8. *
  9. * @var array
  10. */
  11. protected $fillable = [
  12. 'value','sentence_id'
  13. ];
  14. protected $table = 'words';
  15. public $timestamps = true;
  16. public function sentence()
  17. {
  18. return $this->belongsTo('App\Models\Sentence');
  19. }
  20. }