for($this->tenant)->create([ 'slug' => 'moderation-event', ]); $photo = Photo::factory()->for($event)->create([ 'status' => 'pending', ]); $response = $this->authenticatedRequest('PATCH', "/api/v1/tenant/events/{$event->slug}/photos/{$photo->id}", [ 'status' => 'approved', ]); $response->assertOk(); $this->assertSame('approved', $photo->refresh()->status); } }