I first needed this information while working on a large projects with no tests/factories, and so many migrations, so it was distracting to look for each required fields in manual approach.
I created a simple trait to fetch required fields. It was easy in Laravel 11 and 10. Then I realize that the most programmers who face this problem are usually in older versions, so I added support for laravel 9,8,7,6 and make extract the logic into package.
I tested the code for each laravel verions supported and each SQL databases: SQLite, MySQL, MariaDB, PostgreSQL, and Microsoft SQL SERVER. I needed to add support for each SQL database because I used DB Facade with raw SQL query and in every time there were a slice deffent.
The package is fully tested with PHPUnit and GitHub Action for every laravel verison and for each database.
I hope you like this package and I welcome any contribution or comment.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community