I don't exactly see how this is a Laravel specific issue, and not sure if I understand the problem correctly. Are you trying to modify an actual php source file, or just any plain text file? Are you trying to insert into the fifth line?
If that is the case then reading the file into arrays and inserting into the fourth index, and dumping the content back may work (though with large files it'll soon be a bad idea). Is that what you meant?
I don't exactly see how this is a Laravel specific issue, and not sure if I understand the problem correctly. Are you trying to modify an actual php source file, or just any plain text file? Are you trying to insert into the fifth line?
If that is the case then reading the file into arrays and inserting into the fourth index, and dumping the content back may work (though with large files it'll soon be a bad idea). Is that what you meant?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community