如何避免使用php composer dump-autoload与laravel 4? [英] How to avoid using php composer dump-autoload with laravel 4?

查看:231
本文介绍了如何避免使用php composer dump-autoload与laravel 4?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的项目上传到网络主机,我使用ftp编辑我的代码。
问题是,我添加模型使用eloquent为我的数据库,并得到它的工作我必须下载我的项目dans运行php composer dump-autoload然后重新上传。否则它的说类没有找到...这一直都是重的。
有没有其他解决方案?
我的webhost没有ssh或任何东西连接到服务器。我也不能使用rsync喜欢的东西。
也许我应该使用除laravel4之外的其他框架来避免使用composer?

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 download my project dans run php composer dump-autoload then re-upload. Otherwise its say class not found ... Doing this all the time is just heavy. Is there any other solution? My webhost does not have ssh or any thing to connect to the server. Neither I can use rsync like stuff. Maybe I should use an other framework than laravel4 to avoid using composer?

推荐答案

您需要的自动加载目录到/app/start/global.php下的ClassLoader :: addDirectories数组。 Laravel根据你的个人需要提供多种方法来完成同样的事情。

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.

这篇关于如何避免使用php composer dump-autoload与laravel 4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆