id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('permission'); // ключ: 'cars.edit', 'pages.view' и т.д. $table->enum('action', ['allow', 'deny'])->default('allow'); $table->timestamps(); $table->unique(['user_id', 'permission']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('user_permissions'); } };