承接 jdion84/lucid 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jdion84/lucid

最新稳定版本:1.0.0

Composer 安装命令:

composer require jdion84/lucid

包简介

Declare database schemas inside Laravel models.

README 文档

README

Declare database schemas inside Laravel models.

Installation

Require this package via composer:

composer require jdion84/lucid

Usage

Create a new model class with a schema method:

php artisan make:schema Post

Or, add a schema method to an existing model:

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Jdion84\Lucid\Table;

class Post extends Model
{
    use HasFactory;

    public function schema(Table $table)
    {
        $table->id();
        $table->string('title')->index();
        $table->text('body');
        $table->timestamp('created_at');
        $table->timestamp('updated_at');
    }
}

Migrate & sync model schema methods with the database:

php artisan migrate:schemas

Commands

Create a new model class with a schema method:

php artisan make:schema {name} {--p|pivot} {--force}

Migrate & sync model schema methods with the database:

migrate:schemas {--f|fresh} {--s|seed} {--force}

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-16