How to start a Laravel project in eclipse

12,049

I found the solution. Just include these two file in laravel installed folder to index.php, then I can debug it. I found it after I read the documentation in Laravel website carefully again.

require __DIR__.'/../bootstrap/autoload.php';

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

then the app can run.

$app->run();

Thanks so much

Share:
12,049

Related videos on Youtube

Peter Hon
Author by

Peter Hon

Updated on September 14, 2022

Comments

  • Peter Hon
    Peter Hon over 1 year

    I have installed Laravel in windows 7 apache 2.4. I installed it with the following steps:

    1. Create folder named new_project under apache24/htdocs (which is also eclipse workspace folder);

    2. Then I insalled Laravel by command : composer create-project laravel/laravel --prefer-dist

    3. The laravel is installed in C:\apache24\htdocs\new_project\laravel\

    4. I have also download a laravel_helper_function.php and include it in Eclipse PHP include path. It make the Laravel namespace visible.

    Then I tried a simple program, and tried to debug it.

    <?php
    
      App::isLocal();
      phpinfo();
      echo("hello");
      echo("hello");
    
    ?>
    

    I set a breakpoint in

     App::isLocal();
    

    However, the line does not executed and stop responding. I doubt that although I have the helper function that makes me to use laravel namespace. However, eclipse seems do not know where to call the Laravel function? What step do I missed? I am new to Laravel. And I have search the internet. Seems no answer.

    Please help. Thanks.