protected function seed() { Article::unguard(); $this->article = Article::create(['title' => 'Test']); Author::unguard(); $this->article->authors()->attach(Author::create(['name' => 'Steve'])); $this->disk->write('test.jpg', 'contents'); Photo::unguard(); $this->article->photos()->save(new Photo(['uid' => 1, 'image' => '/uploads/test.jpg', 'source' => true])); }