alex-claimer / generator
description: alex-claimer/generator library
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Requires (Dev)
- doctrine/dbal: ^2.9
This package is not auto-updated.
Last update: 2025-01-27 19:24:26 UTC
README
Not stable yet. Generate classes: Models, Controllers(empty yet), Repositories, Requests, Observers and views(not yet) from DB tables.
Usage
composer require --dev alex-claimer/generator
php artisan vendor:publish --tag=alex-claimer-generator-config
set in config/alex-claimer-generator/config.php
url: Your_project/generator_create_migration
or
php artisan generate:migration {{parameters}} - generate migration
{{parameters}} - { posts - create migration for 'posts' table;
posts_comments - create migrations for 'posts' and 'comments' tables;
posts__comments - create migrations for 'posts' , 'comments' and pivot 'pivot_post_comments' tables;
posts___comments - create migration only for pivot 'pivot_post_comments' table;
posts_prefix_test - create migration for 'test_posts' table;
posts__comments_prefix_test - create migrations for 'test_posts' , 'test_comments' and pivot 'test_pivot_post_comments' tables;
pivot with columns:
'post_id' on 'test_posts'
'comment_id' on 'test_comments'`
}
php artisan migrate
php artisan generate:classes - generate classes from DB
or
url: Your_project/generator_menu
Generated classes is in config/alex-claimer-generator/already_made.php
If you need to generate class again, remove it from config/alex-claimer-generator/already_made.php