cineflex/app/Models/Permission.php

26 lines
475 B
PHP
Raw Normal View History

2022-11-23 09:32:34 +01:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Permission extends Model
{
protected $table = 'permissions';
protected $primaryKey = 'permission_id';
protected $fillable = [
'permission_name',
];
protected $hidden = [
'created_at',
'updated_at',
];
public function users()
{
return $this->belongsToMany('App\Models\User', 'user_permissions', 'permission_id', 'user_id');
2022-11-23 09:32:34 +01:00
}
}