Permission.php
738 Bytes
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
<?php
namespace App\Access\Model\Permission;
use Illuminate\Database\Eloquent\Model;
use App\Access\Model\Permission\Traits\Relationship\PermissionRelationship;
/**
* Class Permission.
*/
class Permission extends Model
{
use PermissionRelationship;
/**
* The database table used by the model.
*
* @var string
*/
protected $table;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['name', 'display_name', 'sort'];
/**
* @param array $attributes
*/
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->table = config('access.permissions_table');
}
}