unsignedInteger($column); $table->foreign($column)->references('id')->on('business')->cascadeOnDelete(); } public static function user( Blueprint $table, string $column, bool $nullable = true, string $onDelete = 'null' ): void { if ($nullable) { $table->unsignedInteger($column)->nullable(); } else { $table->unsignedInteger($column); } $foreign = $table->foreign($column)->references('id')->on('users'); $onDelete === 'cascade' ? $foreign->cascadeOnDelete() : $foreign->nullOnDelete(); } public static function product(Blueprint $table, string $column = 'product_id', bool $nullable = true): void { if ($nullable) { $table->unsignedInteger($column)->nullable(); } else { $table->unsignedInteger($column); } $table->foreign($column)->references('id')->on('products')->nullOnDelete(); } public static function project(Blueprint $table, string $column = 'project_id'): void { $table->unsignedInteger($column)->nullable(); $table->foreign($column)->references('id')->on('pjt_projects')->nullOnDelete(); } public static function contact(Blueprint $table, string $column = 'customer_id'): void { $table->unsignedInteger($column)->nullable(); $table->foreign($column)->references('id')->on('contacts')->nullOnDelete(); } }