source: app/Models/RolesPermissions.php@ fb32aad

develop
Last change on this file since fb32aad was fb32aad, checked in by beratkjufliju <kufliju@…>, 3 years ago

edited permissions

  • Property mode set to 100644
File size: 464 bytes
Line 
1<?php
2
3namespace App\Models;
4
5use Illuminate\Database\Eloquent\Factories\HasFactory;
6use Illuminate\Database\Eloquent\Model;
7
8class RolesPermissions extends Model
9{
10 protected $table = "roles_permissions";
11
12 protected $fillable = ["role_id", "permission_id"];
13
14 public function permission() {
15 return $this->hasMany(Permission::class, "permissions");
16 }
17
18 public function role() {
19 return $this->hasMany(Role::class, "roles");
20 }
21}
Note: See TracBrowser for help on using the repository browser.