Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save CodeWithDennis/42fe943c432a5578e73b0c003b36c58e to your computer and use it in GitHub Desktop.

Select an option

Save CodeWithDennis/42fe943c432a5578e73b0c003b36c58e to your computer and use it in GitHub Desktop.
Generate test records with a simple command
function factory() {
php artisan tinker --execute="$1::factory(${2:-1})->create();"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment