Version 2.0.0 is released #89
Replies: 2 comments 2 replies
-
Hi guy! **Problem 1 thanks for your attention |
Beta Was this translation helpful? Give feedback.
-
Does this fix the issue where: php artisan krlove:generate:model Models/First/Second/Third --table-name=first_second_third Generates: <?php
namespace App;
class Models/First/Second/Third extends Model { instead of <?php
namespace App\Models\First\Second;
class Third extends Model { and/or also fails if the folder |
Beta Was this translation helpful? Give feedback.
-
Dear all,
Version 2.0.0 is released. It contains several improvements, new features and breaking changes, which I'd like to guide you through.
Minimum supported versions - Laravel 9 and PHP 8.0.
One of the most requested features was generating models from all tables. Now it is possible with
krlove:generate:models
command. This command lists all tables, transforms their names into class names (e.g.users
->User
) and generates Eloquent models for them. See more details in the README.backup
option is removed,no-backup
which defaults tofalse
has been added instead. That means backup is enabled by default for both commands. If you want to disable it, pass--no-backup
as a command option, or override it globally in yourconfig/eloquent_model_generator.php
file:The structure on config file has been flattened.
Before:
After:
enum
type cast has been included out of the box. It casts tostring
. You can always override it in your config file:Generic code improvements and simplifications have been done:
protected
toprivate
Last but not least, (finally!) added tests covering key functionality.
If you have troubles upgrading from version 1x to 2x, feel free to create an issue or drop a comment under this discussion.
Best of luck!
Beta Was this translation helpful? Give feedback.
All reactions