Commit e8f48ae8 authored by Marcos Albano's avatar Marcos Albano 💬

Adicionado relacionamentos dos Models Role e Permission com User

parent 782b6abf
...@@ -12,13 +12,13 @@ class Role extends Model ...@@ -12,13 +12,13 @@ class Role extends Model
'name', 'description', 'name', 'description',
]; ];
// public function users() public function users()
// { {
// return $this->belongsToMany(User::class, 'id'); return $this->belongsToMany(User::class, 'id');
// } }
// public function permissions() public function permissions()
// { {
// return $this->belongsToMany(Permission::class, 'id'); return $this->belongsToMany(Permission::class, 'id');
// } }
} }
...@@ -28,9 +28,9 @@ class User extends Authenticatable ...@@ -28,9 +28,9 @@ class User extends Authenticatable
'password', 'remember_token', 'password', 'remember_token',
]; ];
// public function roles() public function roles()
// { {
// return $this->belongsToMany(Role::class, 'id'); return $this->belongsToMany(Role::class, 'id');
// } }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment