user roles, bug fixes
This commit is contained in:
17
app/Models/ErpSystemRole.php
Normal file
17
app/Models/ErpSystemRole.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
use App\Models\StaffMember;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ErpSystemRole extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
public $table = "system_roles";
|
||||
|
||||
|
||||
public function staffmembers(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(StaffMember::class, 'user_roles', 'system_role_id', 'staff_member_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user