install multiple Laravel 4 projects to sub directories

前端 未结 2 1747
南方客
南方客 2021-02-06 13:55

I\'m trying to upload multiple Laravel 4 projects to my web server, not my development server. Each laravel 4 app is housed in their own subdirectory. How should my file structu

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 14:41

    move all content include index.php in each public directory to Store, Blog and Newspaper respectively. and change the following line:

    require __DIR__.'/../bootstrap/autoload.php';
    
    $app = require_once __DIR__.'/../bootstrap/start.php';
    

    to

    require __DIR__.'/bootstrap/autoload.php';
    
    $app = require_once __DIR__.'/bootstrap/start.php';
    

    good luck.

    EDIT: Sorry. You have to edit /bootstrap/paths.php as well, change

     'public' => __DIR__.'/../public',
    

    to

    'public' => __DIR__.'/../',
    

提交回复
热议问题