all models into model folder

This commit is contained in:
Arno Kaimbacher 2018-09-10 15:09:10 +02:00
parent 98f50a2b6f
commit 6990469c67
46 changed files with 325 additions and 203 deletions

15
app/Models/Collection.php Normal file
View file

@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\Dataset;
class Collection extends Model
{
public function documents()
{
return $this->belongsToMany(Dataset::class, 'link_documents_collections', 'collection_id', 'document_id');
}
}