Laravel Factory States: Create Model “Sub-Types“

If you want to seed some data for a model but add some conditions, you can define those conditions as separate so-called “states“. Docs: #factory-states - - - - - Support the channel by checking out our products: - Enroll in my Laravel courses: - Try our Laravel QuickAdminPanel: - Purchase my Livewire Kit: - View Laravel Code Examples: - Subscribe to my weekly newsletter:
Back to Top