Tanner's local community (100 miles):
View more posts on the website
Yesterday, we talked about how Factories can be used to generate test objects. Going a step further, any time you need to populate your database with test records, Seeders use factories to produces realistic values that match your expected schema. You wire your seeders into database/seeders/DatabaseSeeder.php, and from there a single php artisan db:seed gives […]
When developing an application with Laravel, having consistent test data is important. Whenever you create a new model with a factory via Artisan (php artisan make:model), you have the option of creating a factory alongside it by passing the -f option. Factories are where you define the shape of a model (which fields get which […]
If you’ve ever had to create custom tables in WordPress, you probably know how frustrating it can be to get the syntax exactly right. It’s much easier now with AI, but it’s still difficult to review. You’re probably looking at something like this: Even when you get this figured out and your tables are created […]