singleloginsystem/database/migrations/2026_05_18_113635_app_roles.php
= c680c1ae6e Feat: implement role and app management
- Added services (`RoleService`, `AppRoleService`, `AppsPermissionService`) to handle role creation, app assignments, and permissions.
- Introduced new Livewire forms for creating roles and assigning apps (`CreateRoleForm`, `AssignAppToRoleForm`).
- Built dynamic Blade views for role and app management, including modals and reusable components.
- Removed outdated `fluxui-development` skill documentation.
2026-05-19 11:13:35 +00:00

34 lines
827 B
PHP

<?php
declare(strict_types=1);
use App\Models\ConnectedApp;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class() extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('app_roles', function (Blueprint $table): void {
$table->id();
$table->foreignIdFor(ConnectedApp::class, 'app_id');
$table->foreignId('role_id')->comment('role_id from spatie roles table');
$table->integer('duration')->comment('in days');
$table->unique(['app_id', 'role_id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('app_roles');
}
};