小编use*_*863的帖子

Laravel 4处理404错误

我是Laravel的新手,我正在尝试捕获任何与现有路线不匹配的请求.目前我正在......

Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException

我已经按照文档页面App::missing()中的app/start/global.php描述创建了一个处理程序,但这没有帮助.我也试过创建一个处理程序,但这也没有帮助.App::error(function(NotFoundHttpException $exception, $code)

任何帮助,将不胜感激.

laravel laravel-4

8
推荐指数
2
解决办法
1万
查看次数

无法编写Composer TransportException转换文件

我正在安装laravel 4并运行"composer install"命令.它能够成功安装13个软件包,但是当安装symfony/translation时,它会100%下载它,然后抛出一个错误:

[Composer\Downloader\TransportException]" https://api.github.com/repos/symfony/Translation/zipball/6bc4b753c1ae5640c0eacdbe27c04a69cde3d10d "出现故障,并返回空200响应

可能是因为原来是0字节?有没有安装这个包的工作?

laravel composer-php laravel-4

7
推荐指数
1
解决办法
3306
查看次数

unittest laravel caching issue

I am using laravel 4 and created a class under its own namespace. Within this class there's a method that retrieves data and caches it. I also wrote a very small unit test to check if caching works. For some reason, caching does not work when unit testing, but does work when accessing through browser. I even modified app/config/testing/cache.php driver to use apc instead of array and it still doesn't work.

Here's the code:

<?php namespace site;
use Cache;

class …
Run Code Online (Sandbox Code Playgroud)

phpunit caching laravel-4

5
推荐指数
1
解决办法
3099
查看次数

MySQL将一个表中的值连接到另一个表中的记录

我有三个表(多对多的关系)itemsitems_to_tagstags。在itemstags表有一个唯一的ID列,items_to_tags表中的列item_idtag_id。有没有办法从itemstags表中选择所有结果,但将所有结果合并到同一记录中?

例如,如果我有此数据:

查询结果应为:

item_id   item_name   tags
1         'item1'     'tag1,tag2,tag3'
Run Code Online (Sandbox Code Playgroud)

mysql

3
推荐指数
1
解决办法
1464
查看次数

标签 统计

laravel-4 ×3

laravel ×2

caching ×1

composer-php ×1

mysql ×1

phpunit ×1