elison / talos
Generate Laravel Requests related to the columns type of a table
dev-main
2021-10-30 14:53 UTC
Requires
- doctrine/dbal: ^3.1
This package is auto-updated.
Last update: 2025-05-29 01:46:54 UTC
README
A package that generates requests based on the columns types of a table.
Install on laravel project
composer require elison/talos
Add the provider in the app.php
config/app.php
\Elison\Talos\TalosProvider::class,
Requirements
laravel project
composer v2
doctrine/dbal
Usage
php artisan migrate
-> create a table that comes by default with the package
php artisan talos:generate-request table_name request_name
-> command to generate request
Command example
php artisan talos:generate-request examples TestRequest
Example request that will be generated by the package
public function rules()
{
return [
'created_at' => ['date','nullable'],
'description' => ['string','nullable'],
'title' => ['string','required'],
'updated_at' => ['date','nullable'],
'value' => ['integer','required'],
];
}