summaryrefslogtreecommitdiff
path: root/src/Model/ScormModel.php
blob: c2304075d733a8bada59d4d3ec0225f2753e84ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php


namespace Peopleaps\Scorm\Model;


use Illuminate\Database\Eloquent\Model;

class ScormModel extends Model
{

    public function whereOriginFile($identifier)
    {
        return $this->where('origin_file', $identifier);
    }

    public function getTable()
    {
        return config('scorm.table_names.scorm_table', parent::getTable());
    }

    public function scos() {
        return $this->hasMany(ScormScoModel::class, 'scorm_id', 'id');
    }
}