-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Database support #277
✨ Database support #277
Conversation
803f446
to
c447c5e
Compare
c447c5e
to
c69049d
Compare
This introduces breaking changes in the console. Someone can't update Acorn without running into issues in their console that are pretty difficult to recover. Since the console kernel crashes before fully booting, it's not possible run commands like The way to fix this is to conditionally load the command(s) added here. I will look into a solution that can be reused so we can more easily add support for other Laravel components without running into this problem. |
Any progress with conditional loading? I'd really like the factory and seeding from laravel. Opens up a lot of automated testing opportunities that are pretty time consuming right now. |
oh sry btw will this enable factories and models? TablePlus has support for exporting a table as Laravel migration |
even better
composer require kitloong/laravel-migrations-generator --dev
wp acorn package:discover
wp acorn migrate:generate composer require krlove/eloquent-model-generator --dev
wp acorn package:discover
wp acorn krlove:generate:models composer require thedoctor0/laravel-factory-generator --dev
wp acorn package:discover
wp acorn generate:factory --recursive or to just generate seeders from current db state composer require orangehill/iseed --dev
wp acorn package:discover
wp acorn iseed <table_name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
i noticed corcel already had models for WP https://github.com/corcel/corcel/tree/7.0/src/Model |
This PR adds
illuminate/database
as a dependency and enables migration commands:Seed command requires https://github.com/laravel/laravel/blob/9.x/database/seeders/DatabaseSeeder.php (and loading it)
Closes #119