2024_12_19_161249_create_clients_table.php 686 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. /**
  6. * Клиенты
  7. */
  8. return new class extends Migration {
  9. public function up(): void
  10. {
  11. Schema::create('clients', function (Blueprint $table) {
  12. $table->id();
  13. $table->string('name');
  14. $table->string('phone')->nullable();
  15. $table->string('email')->nullable();
  16. $table->text('comment')->nullable();
  17. $table->softDeletes();
  18. $table->timestamps();
  19. });
  20. }
  21. public function down(): void
  22. {
  23. Schema::dropIfExists('clients');
  24. }
  25. };