2022-12-03 06:05:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
2023-01-10 14:27:03 +00:00
|
|
|
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
|
2022-12-03 06:05:37 +00:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
class ModuleAllow extends Model
|
|
|
|
{
|
2023-01-10 14:27:03 +00:00
|
|
|
use Cachable;
|
2022-12-03 06:05:37 +00:00
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
'module_id',
|
|
|
|
'allowed_module_id',
|
|
|
|
];
|
|
|
|
|
|
|
|
public function module(): BelongsTo
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Module::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function allowed_module(): BelongsTo
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Module::class, 'allowed_module_id');
|
|
|
|
}
|
|
|
|
}
|