Last change
on this file since 0c07a90 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
331 bytes
|
Line | |
---|
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 |
|
---|
11 | public function user() {
|
---|
12 | return $this->hasMany(User::class);
|
---|
13 | }
|
---|
14 |
|
---|
15 | public function permission() {
|
---|
16 | return $this->belongsToMany(Permission::class, "roles_permissions");
|
---|
17 | }
|
---|
18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.