企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` php artisan make:model Models/Admin -m ``` ![](https://img.kancloud.cn/81/84/81849c5c94e74b9e98e399759b89c147_944x193.png) ![](https://img.kancloud.cn/d7/76/d776ff0536cf3efaaaf4ac26531a9af4_1662x586.png) ### 执行 迁移 php artisan migrate ~~~ $table->id(); $table->string('username',20)->comment('账号'); $table->string('password',255)->comment('密码'); $table->string('truefome',20)->default('') ->comment('真实名字'); $table->string('email',50)->default('') ->comment('邮箱'); $table->string('phone',15)->default('') ->comment('手机号'); $table->char('login_ip',15)->default('') ->comment('登录iip'); $table->timestamps(); $table->softDeletes(); ~~~ ~~~ CREATE TABLE `admins` ( `id` BIGINT ( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT, `username` VARCHAR ( 20 ) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '账号', `password` VARCHAR ( 255 ) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密码', `truefome` VARCHAR ( 20 ) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '真实名字', `email` VARCHAR ( 50 ) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '邮箱', `phone` VARCHAR ( 15 ) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '手机号', `login_ip` CHAR ( 15 ) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '登录iip', `created_at` TIMESTAMP NULL DEFAULT NULL, `updated_at` TIMESTAMP NULL DEFAULT NULL, `deleted_at` TIMESTAMP NULL DEFAULT NULL, PRIMARY KEY ( `id` ) ) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; ~~~