Project Table
Schema::create('projects', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->uuid('service_id')->nullable();
$table->string('name');
$table->string('slug')->unique();
$table->string('image')->nullable();
$table->string('description');
$table->timestamps();
});
Schema::table('projects', function (Blueprint $table) {
$table->foreign('service_id')
->references('id')
->on('services');
});
Project Table
Schema::create('projects', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->uuid('service_id')->nullable();
$table->string('name');
$table->string('slug')->unique();
$table->string('image')->nullable();
$table->string('description');
$table->timestamps();
});
Schema::table('projects', function (Blueprint $table) {
$table->foreign('service_id')
->references('id')
->on('services');
});