Last change
on this file since 4521f25 was 53d99ce, checked in by beratkjufliju <kufliju@…>, 3 years ago |
edited permissions
|
-
Property mode
set to
100644
|
File size:
368 bytes
|
Rev | Line | |
---|
[7304c7f] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | namespace App\Models;
|
---|
| 4 |
|
---|
| 5 | use Illuminate\Database\Eloquent\Model;
|
---|
| 6 |
|
---|
| 7 | class Role extends Model
|
---|
| 8 | {
|
---|
| 9 | protected $table = "roles";
|
---|
| 10 |
|
---|
[53d99ce] | 11 | protected $fillable = ["name"];
|
---|
| 12 |
|
---|
[7304c7f] | 13 | public function user() {
|
---|
| 14 | return $this->hasMany(User::class);
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | public function permission() {
|
---|
| 18 | return $this->belongsToMany(Permission::class, "roles_permissions");
|
---|
| 19 | }
|
---|
| 20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.