tethys/app/Models/DatasetReference.php

22 lines
469 B
PHP
Raw Normal View History

2018-10-29 13:24:41 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\Dataset;
use Illuminate\Database\Eloquent\Factories\HasFactory;
2018-10-29 13:24:41 +00:00
class DatasetReference extends Model
{
use HasFactory;
2018-10-29 13:24:41 +00:00
protected $table = 'document_references';
public $timestamps = false;
protected $fillable = ['value', 'label', 'type', 'relation'];
public function dataset()
{
return $this->belongsTo(Dataset::class, 'document_id', 'id');
}
}