-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoute.php
50 lines (45 loc) · 1.04 KB
/
Route.php
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
<?php namespace Gzero\Entity;
/**
* This file is part of the GZERO CMS package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Class Route
*
* @package Gzero\Entity
* @author Adrian Skierniewski <[email protected]>
* @copyright Copyright (c) 2014, Adrian Skierniewski
*/
class Route extends Base {
/**
* @var array
*/
protected $fillable = [
'is_active'
];
/**
* @var array
*/
protected $attributes = [
'is_active' => false
];
/**
* Polymorphic relation to entities that could have route
*
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
*/
public function routable()
{
return $this->morphTo();
}
/**
* Translation one to many relation
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function translations()
{
return $this->hasMany(RouteTranslation::class);
}
}