tethys/app/Models/Title.php

26 lines
482 B
PHP
Raw Permalink Normal View History

2018-08-06 12:30:51 +00:00
<?php
2018-08-29 15:18:15 +00:00
namespace App\Models;
2018-08-06 12:30:51 +00:00
use Illuminate\Database\Eloquent\Model;
2018-09-10 13:09:10 +00:00
use App\Models\Dataset;
use Illuminate\Database\Eloquent\Factories\HasFactory;
2018-08-06 12:30:51 +00:00
class Title extends Model
{
use HasFactory;
2019-01-22 17:24:18 +00:00
protected $table = 'dataset_titles';
2018-08-06 12:30:51 +00:00
public $timestamps = false;
protected $fillable = [
2019-01-24 15:56:39 +00:00
'value',
'type',
'language'
2018-08-06 12:30:51 +00:00
];
public function dataset()
{
2018-09-10 13:09:10 +00:00
return $this->belongsTo(Dataset::class, 'document_id', 'id');
2018-08-06 12:30:51 +00:00
}
}