How to avoid using php composer dump-autoload with laravel 4?

后端 未结 3 1918
刺人心
刺人心 2020-12-08 16:39

I have uploaded my project on a web host and I use ftp to edit my code. The problem is that I added models using eloquent for my database and to get it work I have to downlo

相关标签:
3条回答
  • 2020-12-08 17:02

    I'm not sure, sometimes it works, sometimes not...

    But I upload:

    • bootstrap/autoload.php
    • vendor/autoload.php
    • vendor/composer/*

    And I don't have a bootstrap/compiled.php

    0 讨论(0)
  • 2020-12-08 17:14

    In your case, you should add your needed autoload directory to the ClassLoader::addDirectories array under /app/start/global.php. Laravel gives multiple ways to accomplish the same thing depending on your personal needs.

    0 讨论(0)
  • 2020-12-08 17:22

    You can remove or not upload the bootstrap/compiled.php file. I'm not sure if this completely fixes your problem, because I'm not sure if dump-autoload generates multiple files.

    [edit]An other approach is to work on your local machine and upload after you are finished.

    0 讨论(0)
提交回复
热议问题