alexmilde/laravel-database-scaffolder

v0.1 2020-12-29 22:01 UTC

This package is auto-updated.

Last update: 2024-09-29 05:56:16 UTC


README

Total Downloads Latest Stable Version License

关于

你是否想过“也许有人需要和我一样的数据库表结构?”

这个包可能对你有帮助。

安装

composer require "alexmilde/laravel-database-scaffolder"

Artisan命令

// Copy templates and configurations
php artisan vendor:publish --tag=scaffolder

// Create opengraphs table based on config
php artisan scaffold:migration opengraphs

将生成迁移文件

...

public function up()
{
    Schema::create('opengraphs', function (Blueprint $table) {
        $table->id();

        $table->string('title', 255);
        $table->string('description', 512);
        $table->string('type', 100);
        $table->string('url', 255);
        $table->string('image', 255);
        $table->string('image-secure_url', 255);

        $table->timestamps();
    });
}

...

开箱即用的脚手架

我很乐意添加你的脚手架配置请求。