I would like to execute the following command : composer update
in my controller in laravel, however this one does not work.
On the other hand the command composer info
works perfectly.
When I execute composer update
in a command prompt all my dependencies are correctly updated in the laravel vendor file but when I try to execute composer update
in my controller nothing happens.
here is my code :
$data['output'] = shell_exec( 'cd '. base_path() .' && composer update' );
dd($data);
and here is the result :
array:1 [▼
"output" => null
]
Could you help me to understand why composer update
does not work in a controller ?
I would like to update my dependencies in a controller without the command prompt.
Thank you.