How to run install Laravel on hosting/server/LAN?

Good morning!
I want to make on your site was, for example, the button "Install Laravel", clicking on which you will install Laravel itself in another folder. This folder I will then remove from the finished project and use the new. Tell me, please, what commands it can be implemented? I know that can be installed via Composer, but how to run this command on website, but not in the console?
---
Or another question: how to run server/console commands using php?
July 8th 19 at 12:00
3 answers
July 8th 19 at 12:02
Solution
That's helped me www.php.su/learnphp/operators/?shell
Created a file with this php code:
<?php

$output[] = `php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"`;
$output[] = `php -r "if (hash_file('SHA384', 'composer-setup.php') === 'bf16ac69bd8b807bc6e4499b28968ee87456e29a3894767b60c2d4dafa3d10d045ffef2aeb2e78827fa5f024fbe93ca2') { echo 'Installer verified'; } else { echo 'corrupt Installer'; unlink('composer-setup.php'); } echo PHP_EOL;"`;
$output[] = `php composer-setup.php`;
$output[] = `php -r "unlink('composer-setup.php');"`;

foreach ($output as $o) {
 echo $o;
}</property-->
br><br> In the current folder established composer. In the same way you can install and Laravel.
July 8th 19 at 12:04
make a bash script and run it using exec() php function.
Don't know how. - Arthur_McCullough70 commented on July 8th 19 at 12:07
: you are a programmer, you Google right under your nose, in your dictionary should not be such words. - chandler commented on July 8th 19 at 12:10
: here in Google and found a simple solution. - Arthur_McCullough70 commented on July 8th 19 at 12:13
July 8th 19 at 12:06
Discussed here. It should fit.
How in php to install composer in a folder?) - Arthur_McCullough70 commented on July 8th 19 at 12:09

Find more questions by tags LaravelOpen ServerComposerPHP