Can you perhaps explain why you need to do this? Perhaps we can suggest a better solution then.
Reverse migrations file
Hello. I have a problem for which I am looking for a solution. I keep looking for a method on my own but I also post here in case someone has an interesting idea. I'm trying to be able to "read" the migration files of a Laravel project. My goal is to be able to create a JSON file containing all the definitions of tables and fields (name, type, keys, ect.) created with the migrations to then be able to regenerate the migration files myself from my JSON. I can use Reflection to read the definitions of the classes contained in the migrations but at the moment I have no idea how to interpret the contents of the "up" methods so that I can build an array containing the list of tables and fields. I know it's a bit special as a request. In fact I don't know if it's really possible. But it's an interesting little challenge. So if anyone has any idea how to do it, that would be great :) Thank you
Please or to participate in this conversation.