{"repo":"laracraft-tech/laravel-schema-rules","free":true,"listed":false,"github":"https://github.com/laracraft-tech/laravel-schema-rules","clone":"git clone https://github.com/laracraft-tech/laravel-schema-rules.git","description":"Automatically generate Laravel validation rules based on your database table schema!","language":"PHP","stars":363,"topics":["laravel","php","rules","validation-rules"],"license":"MIT","category":"databases-storage","readme_excerpt":"Laravel Schema Rules Automatically generate basic Laravel validation rules based on your database table schema! Use these as a starting point to fine-tune and optimize your validation rules as needed. Here you can use the web version, if you like: https://validationforlaravel.com Installation You can install the package via composer: Then publish the config file with: ToC - Laravel Schema Rules - Installation - ToC - Usage - Generate rules for a whole table - Generate rules for specific columns - Generate Form Request Class - Always skip columns - Supported Drivers - Testing - Changelog - Contributing - Security Vulnerabilities - Credits - License Usage Let's say you've migrated this fictional table: Generate rules for a whole table Now if you run: php artisan schema:generate-rules persons You'll get: As you may have noticed the float-column body size , just gets generated to ['required', 'numeric'] . Proper rules for float , decimal and double , are not yet implemented! Generate rules for specific columns You can also explicitly specify the columns: php artisan schema:generate-rules persons --columns first name,last name,email Which gives you: Generate Form Request Class Optionally, you can add a --create-request or -c flag, which will create a form request class with the generated rules for you! Always skip columns To always skip columns add it in the config file, under skip columns parameter. Supported Drivers Currently, the supported database drivers are MySQL , PostgreSQ","default_branch":null,"files":null,"tree":[],"storefront":"/r/laracraft-tech","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/laracraft-tech/laravel-schema-rules/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}