How to execute “php artisan migrate” and other Laravel commands in remote server?

PHP
ssh [email protected] << EOF
cd /var/www/app/;
php artisan migrate --force; // force prevents artisan from asking for a yes/no on production
exit;
EOF
Source

Also in PHP: