2022_07_20_094754_create_companies_table.php 778B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create("companies", function (Blueprint $table) {
  14. $table->id();
  15. $table->string("name");
  16. $table->string("address");
  17. $table->string("telephone");
  18. $table->string("email")->nullable();
  19. $table->string("npwp");
  20. $table->timestamps();
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::dropIfExists("companies");
  31. }
  32. };