Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Create post factory with relationships fields
//create 15 posts with 3 comments and 3 tags each
$posts = factory('App\Post', 15)
->each(function($post) {
foreach(range(1,3) as $v){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment