أُنشئ من Tokal/Test
Initial backend upload
هذا الالتزام موجود في:
20
app/Models/Role.php
Normal file
20
app/Models/Role.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class Role extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
];
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'user_roles');
|
||||
}
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم