juddos545/muster

There is no license information available for the latest version (dev-master) of this package.

dev-master 2017-05-14 20:38 UTC

This package is not auto-updated.

Last update: 2024-11-15 20:52:38 UTC


README

This package inspects the columns of a MySQL database table and generates Laravel validations rules based on the column data types and foreign keys.

Installation

composer require juddos545/muster

Be sure to include our service provider in your app.php:

\Juddos545\Muster\MusterServiceProvider::class

Example

muster|master⚡ ⇒ php artisan muster:validation domains

Generated validation for domains:

['domain_name' => 'required', 'blogger_name' => 'required', 'email' => 'required|email', 'niche_id' => 'required|exists:niches', 'notes' => 'required|string', 'accepts_gifts' => 'required|boolean', 'writes_content' => 'required|boolean', 'da_rating' => 'required|integer', 'tf_rating' => 'required|integer', 'cf_rating' => 'required|integer', 'currency_id' => 'required|exists:currencies', 'archived_at' => 'required|date', 'disabled_at' => 'required|date']