Files
cleaning-company/database/migrations/0001_01_01_000000_create_users_table.php
Владимир ae5ab2554b commit 12.01
2026-01-12 14:25:15 +00:00

26 lines
682 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->enum('role', ['client', 'employee', 'admin'])->default('client');
$table->string('phone')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('users');
}
};