-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathLtiToolSetting.php
More file actions
86 lines (78 loc) · 2.18 KB
/
LtiToolSetting.php
File metadata and controls
86 lines (78 loc) · 2.18 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
namespace App\Models\LtiTool;
use App\Models\Organization;
use App\Models\Traits\GlobalScope;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\User;
use App\Models\MediaSource;
use App\Models\LtiTool\LtiToolType;
class LtiToolSetting extends Model
{
use SoftDeletes, GlobalScope;
protected $table = 'lti_tool_settings';
/**
* @author Asim Sarwar
* Date 11-10-2021
* The attributes that are mass assignable. *
* @var array
*/
protected $fillable = [
'user_id',
'organization_id',
'tool_name',
'tool_url',
'tool_domain',
'lti_version',
'tool_consumer_key',
'tool_secret_key',
'tool_description',
'tool_custom_parameter',
'tool_content_selection_url',
'tool_client_id',
'tool_proxy_id',
'tool_enabled_capability',
'tool_icon',
'tool_secure_icon',
'media_source_id',
'lti_tool_type_id'
];
/**
* @author Asim Sarwar
* Date 11-10-2021
* Detail Define belongs to relationship with users table,
* @return Relationship
*/
public function user()
{
return $this->belongsTo(User::class, 'user_id', 'id');
}
/**
* @author Asim Sarwar
* Date 11-10-2021
* Detail Define belongs to relationship with organizations table,
* @return Relationship
*/
public function organization()
{
return $this->belongsTo(Organization::class, 'organization_id', 'id');
}
/**
* @author Asim Sarwar
* Detail Define belongs to relationship with media_sources table,
* @return Relationship
*/
public function mediaSources()
{
return $this->belongsTo(MediaSource::class, 'media_source_id', 'id');
}
/**
* @author Asim Sarwar
* Detail Define belongs to relationship with lti_tool_type table,
* @return Relationship
*/
public function ltiToolType()
{
return $this->belongsTo(LtiToolType::class, 'lti_tool_type_id', 'id');
}
}