добавляю модель работы с ролями по приложенями magic 2.0 и таблицы БД, где хранятся роли по приложеням magic 2.0. Сейчас роли распределятся по логинам, необходимо переписать под выдачу ролей по группам доступа. Я не успел переделать логику

This commit is contained in:
vasya
2026-03-21 20:37:16 +03:00
parent 52920040a1
commit 738c4535dc
3 changed files with 34 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\MagicApps;
class AppRoles extends Model
{
protected $table = 'app_roles';
use HasFactory;
public function magicApp()
{
return $this->belongsTo(MagicApps::class, 'app_id', 'id');
}
}