Comments (7)
This looks nice to me! It's late here, but if I'm not missing anything,
this looks very clean to me. I really like the ability to throw a migration
into the make command already, and I think it's only natural that a seeder
should be available as well.
On Tue, Mar 15, 2016, 10:10 PM J Cobb [email protected] wrote:
When creating a model you can add also create a migration using using artisan
make:model Kitten -m. I am proposing adding a --seeder option to
additionally create a Seeder class to match that model.I also think you should be able to add a Seeder class when creating a
migration:
artisan make:migration create_kittens_table --create --seeder.I've worked up my suggested code for these two options at
laravel/[email protected]:make-seeder-with-model
laravel/framework@5.2...jwcobb:make-seeder-with-modelIs this something other people want? If so, are there any comments on the
suggested code?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#13
from ideas.
Any other thoughts here?
from ideas.
It would create the factor as well?
from ideas.
@gocanto I'm not sure I understand your question.
from ideas.
These: https://laravel.com/docs/master/testing#model-factories
from ideas.
Currently it only adds the Seeder.
from ideas.
I submitted this to laravel/framework as PR 16177 and the documentation to laravel/docs PR 2790.
from ideas.
Related Issues (20)
- [Proposal] Easy way to cancel notifications at time of sending
- Rendering Blade Components Outside of Views HOT 1
- Assert that a component has rendered on a page
- Service Container | Contextual Binding of the Methods
- [REQUEST] Enable flush method from dynamoDB cache HOT 3
- [Feature] Enable flush method from dynamoDB
- [Proposal] Support AOP with php8 Attribute
- laravel join select max of joined column
- Ability to get event name which fires in Eloquent booted method HOT 1
- Make `php artisan migrate:reset` work with *-schema.dump
- Size File Validation only deals with Kilobytes
- Suggesting that ".env.testing" file be added to .gitignore HOT 2
- add native support for dev containers HOT 3
- [9.x] Rename firstOrNew() to firstOrMake()
- Set property to a config value via an Attribute HOT 1
- Add support to get more information on the job class
- Allow pausing batches
- afterCommit on Queueable Anonymous Event Listeners
- Upsert for related models
- Command option to run scheduler in a particular timezone
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ideas.