all models into model folder
This commit is contained in:
parent
98f50a2b6f
commit
6990469c67
46 changed files with 325 additions and 203 deletions
30
app/Models/License.php
Normal file
30
app/Models/License.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\Dataset;
|
||||
|
||||
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',
|
||||
'sort_order',
|
||||
];
|
||||
|
||||
public function datasets()
|
||||
{
|
||||
return $this->belongsToMany(Dataset::class, 'link_documents_licences', 'licence_id', 'document_id');
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue