当前位置: 首页 > 软件库 > Web应用开发 > Web框架 >

laravel-schematics

授权协议 MIT License
开发语言 PHP
所属分类 Web应用开发、 Web框架
软件类型 开源软件
地区 不详
投 递 者 西门凯康
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Laravel Schematics

This package allows you to make multiple diagrams of your Eloquent models and their relations.It will help building them providing drag and drop relations, forms to create and edit your models and many options likeadding resource controllers, form requests and running migrations by the click of a button or (configurable) automatically.It also will give you insights in the migrations you ran and the ones specified in your migrations folder.

Its aim is to help you (and your team) get more grip on the models from a code perspective,the status of your migrations and build / edit them faster.


Installation

You can install the package via composer:

composer require mtolhuys/laravel-schematics --dev

Run php artisan schematics:install which will do the route caching, create vendor assets in your public folder andsetup the configuration file.

Or...

php artisan vendor:publish --provider="Mtolhuys\LaravelSchematics\LaravelSchematicsServiceProvider"

and visit {your-app}/schematics


Usage

Starting out / Searching

If you already have a lot of models I recommend you use the search bar to narrow down the diagrams intospecific sections f.e:

These searches are saved across your diagrams.

Relations

When you drag and drop the arrow to another model you'll get a form to specify the relation you want to build f.e:

Clicking on them will show something like:

Building / Editing Models

To specify the types of your columns I've chosen the form request rule syntax.To see what's available you can click the little help icon below the fields in the model form:

The package is flexible enough to differentiate between renaming and changing column types.It will create migrations according the need to change or create a table and setup your $fillables.I do strongly suggest you check the migrations before running them if the stakes are high.

You don't have to worry about existing migrations though, the package will only look for migrations it created itselfby checking the value of the @tag in the comment it adds. It looks like this:

/**
 * Laravel Schematics
 *
 * WARNING: removing @tag value will disable automated removal
 *
 * @package Laravel-schematics
 * @author  Maarten Tolhuijs <mtolhuys@protonmail.com>
 * @url     https://github.com/mtolhuys/laravel-schematics
 * @tag     laravel-schematics-foobar-model
 */

Changing Diagram Style

There are 4 diagram styles. Bezier, Straight, Flowchart and State Machine:

Importing / Exporting Diagrams

To save and / or share the diagrams you created you can use the export and import settings feature:


Testing

You can run the tests with:

composer test

Or, optionally, with coverage information:

composer test-coverage

Changelog

Please see CHANGELOG for more information what has changed recently.

Credits

This package is possible because of the effort and time of these people!


Maarten Tolhuijs

Creator️

Deisi Tolhuijs

Design

Dennis Mwea

Contributor

Robbin Schepers

Contributor

Bram van Rijswijk

Support

Lucas Snel

Contributor

Contributing

Since I'm getting some questions about this I want these things to be perfectly clear:

  • This is a safe haven for contributions, every (positive) contributon matters!
  • You are free (and encouraged) to use anything of this package for your own ideas.
  • You can always ask for help or email me directly for any questions.

Please see CONTRIBUTING for further details.

Security

If you discover any security related issues, please email mtolhuys@protonmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

 相关资料
  • Laravel 是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。 功能特点 1、语法更富有表现力 你知道下面这行代码里 “true” 代表什么意思么? $uri = Uri::create(‘some/uri’, array(), array(), tr

  • 我需要空间/Laravel权限的帮助。当我试图分配它给我错误哎呀,看起来像出了问题。 错误 Connection.php第761行中的QueryExcema:SQLSTATE[23000]:完整性约束冲突:1048列role_id不能为空(SQL:插入到(,)值(9,))

  • Laravel 作为现在最流行的 PHP 框架,其中的知识较多,所以单独拿出来写一篇。 简述 Laravel 的生命周期 Laravel 采用了单一入口模式,应用的所有请求入口都是 public/index.php 文件。 注册类文件自动加载器 : Laravel通过 composer 进行依赖管理,无需开发者手动导入各种类文件,而由自动加载器自行导入。 创建服务容器:从 bootstrap/ap

  • 简介 Laravel Scout 为 Eloquent 模型 全文搜索提供了简单的,基于驱动的解决方案。通过使用模型观察者,Scout 会自动同步 Eloquent 记录的搜索索引。 目前,Scout 自带一个 Algolia 驱动;不过,编写自定义驱动很简单, 你可以轻松的通过自己的搜索实现来扩展 Scout。 安装 首先,通过 Composer 包管理器来安装 Scout: composer

  • 简介 Laravel 致力于让整个 PHP 开发体验变得愉快, 包括你的本地开发环境。 Vagrant 提供了一种简单,优雅的方式来管理和配置虚拟机。 Laravel Homestead 是一个官方预封装的 Vagrant box,它为你提供了一个完美的开发环境,而无需在本地机器安装 PHP 、Web 服务器和其他服务器软件。不用担心会搞乱你的操作系统!Vagrant boxes 是一次性的。如果

  • WebStack-Laravel 一个开源的网址导航网站项目,具备完整的前后台,您可以拿来制作自己的网址导航。 部署 克隆代码: git clone https://github.com/hui-ho/WebStack-Laravel.git 安装依赖: composer installphp artisan key:generate 编辑配置: cp .env.example .env ...D