Local Laravel environments on Windows like Vagrant/Homestead, Laravel Sail or Laragon can be really slow or resource intensive. Let's create a more native setup, which performs very very well! We managed to reduce execution time on complex operations from 13s down to 1,5s, which is an increase of about 800%!
When you filter and query eloquent models by given dates, you may often use similar ranges, especially in statistics or analysis. Here our package Laravel Date Scopes comes in to play. It lets you conveniently filter by date, with common statistical ranges.
Since all Laravel tests are transaction-based and are getting rolledback after the test is finished, there is really no need to migrate the whole table structure from scratch every time you do a test. Here RefreshDatabaseFast comes into play, which only migrates:fresh if your migration files have been changed.