You should be able to use .user.ini files to do per directory changes to php.ini
upload_max_filesize and post_max_size are both PHP_INI_PERDIR, so it should work. I think you'd need a real directory path in public/ though, which is kind of gross.
I have installed laravel, but I want to change the php.ini settings for a certain route, because I need this route to be able to handle large file uploads. For example, I need to adjust the post_max_size to something like 2G. How can I do this in Laravel or nginx for one laravel install. Is this even possible?
So for example, the route /upload must have a large post_max_size etc but the other routes should just have the normal post_max_size.
You wouldn't need a whole new app, just make a new directory public/big_uploads, copy public/index.php into it and adjust paths as necessary (which would just be adding another ../ to the two required). There could be a little more to it than that, maybe something to do with routes and the base path.
There's no law against having multiple loaders in public paths, it's just kind of weird and normally unnecessary. It's also something to remember when a new dot version of Laravel comes around (you'll have two index.php files that might need updating).
Personally, I'd probably do what @ctroms suggested and just up the file upload size site wide, unless you would have reason to believe you'd get huge file uploads when you don't want to allow them.
Edit: public/.htaccess will definitely need to be edited
Another edit: I just tested this and it's totally viable. Copying both .htaccess and index.php to a subdirectory within public works just fine. No base path issues either (surprised by this a little). You would need to adjust links to prepend the big upload path, and unless you want that path accessible to the entire laravel app, you'll need to account for that somewhere too (the entire app works from the second index.php).
Please or to participate in this conversation.