run composer and laravel (artisan) commands without ssh access

前端 未结 1 587
抹茶落季
抹茶落季 2021-01-11 19:11

I want to test some Laravel applications on my basic shared host.

Currently I just upload my complete application including the vendor files, however this takes quit

相关标签:
1条回答
  • 2021-01-11 19:22

    Check if your shared hosting provider has console feature in their CP which allows to run shell commands. Maybe you'll be able to run commands from there.

    As alternative, you could right your own artisan runner and call artisan commands from the code:

    Artisan::call('migrate');
    

    To run composer command from PHP code, use shell_exec:

    shell_exec('composer update');
    
    0 讨论(0)
提交回复
热议问题