If we're using tools like TestDummy to populate our database tables with records for our tests, then we need a way to clean things up after each test completes. This is where database transactions come into play. Luckily, this is an easy one. Import a trait from the Integrated package, and you're done!
Published on Nov 11th, 2015.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.