Skip to content

Commit

Permalink
Update Permission.php
Browse files Browse the repository at this point in the history
  • Loading branch information
RamonSmit authored Apr 13, 2018
1 parent 02abe59 commit 5c6f7da
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/Models/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

use Illuminate\Database\Eloquent\Model;

class Permission extends Model
class Role extends Model
{
protected $fillable = [
'name',
'description'
'name'
];

protected $hidden = [
Expand All @@ -17,4 +16,14 @@ class Permission extends Model
'updated_at',
'pivot'
];

/**
* Get permissions that are linked to this role
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function permissions()
{
return $this->belongsToMany(Permission::class);
}
}

0 comments on commit 5c6f7da

Please sign in to comment.