id(); $table->foreignId('project_id')->constrained()->onDelete('cascade'); $table->foreignId('phase_id')->nullable()->constrained()->onDelete('set null'); $table->string('name'); $table->json('geojson_data'); // GeoJSON geometry collection $table->string('original_file')->nullable(); // path to original uploaded file $table->foreignId('uploaded_by')->constrained('users'); $table->timestamps(); }); } public function down() { Schema::dropIfExists('layers'); } };