Files
hatame.andarza09/app/Models/RolePermission.php
T
hatame 687681744a git add .
git commit "Implement user registration"
2026-08-16 08:52:04 +03:30

44 lines
703 B
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class RolePermission
*
* @property int $role_id
* @property int $permission_id
*
* @property Permission $permission
* @property Role $role
*
* @package App\Models
*/
class RolePermission extends Model
{
protected $table = 'role_permissions';
public $incrementing = false;
public $timestamps = false;
public static $snakeAttributes = false;
protected $casts = [
'role_id' => 'int',
'permission_id' => 'int'
];
public function permission()
{
return $this->belongsTo(Permission::class);
}
public function role()
{
return $this->belongsTo(Role::class);
}
}