tethys/app/Models/License.php

31 lines
624 B
PHP
Raw Normal View History

2018-08-06 12:30:51 +00:00
<?php
2018-09-10 13:09:10 +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;
2018-08-06 12:30:51 +00:00
class License extends Model
{
protected $table = 'document_licences';
public $timestamps = false;
protected $fillable = [
'active',
'desc_text',
'desc_text',
'desc_text',
'language',
'link_licence',
'link_logo',
'mime_type',
'name_long',
'pod_allowed',
2018-09-10 13:09:10 +00:00
'sort_order',
2018-08-06 12:30:51 +00:00
];
public function datasets()
{
2018-09-10 13:09:10 +00:00
return $this->belongsToMany(Dataset::class, 'link_documents_licences', 'licence_id', 'document_id');
2018-08-06 12:30:51 +00:00
}
}