Deploy Laravel 5 using only FTP in a shared hosting

前端 未结 4 500
孤城傲影
孤城傲影 2020-12-09 09:19

I need to deploy a laravel 5 project to a client host.

The plan of my client is basic hosting: Linux + MySql without cpanel or similar (i.e. no admin panel).

4条回答
  •  无人及你
    2020-12-09 09:54

    1. I create a new folder named "protected"
    2. Move all except "public" folder into "protected" folder
    3. Move all inside "public" folder to root
    4. Edit index.php in root folder(from public folder),

    edit require __DIR__.'/../bootstrap/autoload.php'; into require __DIR__.'/protected/bootstrap/autoload.php';

    also edit $app = require_once __DIR__.'/../bootstrap/app.php'; into $app = require_once __DIR__.'/protected/bootstrap/app.php';

提交回复
热议问题