Route::get('/updateapp', function()
{
exec('composer dump-autoload');
echo 'composer dump-autoload complete';
});
Or
exec('composer dump-autoload'); // if you're not planning to access it through a route.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want to be able to run composer dump-autoload but in php not command line. Is this possible?
Thanks
use exec() system() or passthrough()
Please or to participate in this conversation.