D:\Apache2.2\htdocs\laravel>php artisan db:seed
PHP Fatal error: Class 'Fzaninotto\Faker\FakerServiceprovider' n
Apache2.2\htdocs\laravel\bootstrap\compiled.php on line 4481
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErro
ssage":"Class 'Fzaninotto\\Faker\\FakerServiceprovider' not found
pache2.2\\htdocs\\laravel\\bootstrap\\compiled.php","line":4481}}
D:\Apache2.2\htdocs\laravel>
老师:如上所示错误该怎么处理,拜谢
baren
2015-02-26 19:16
@baren:明明安装了Faker却还是不行
果大王
2015-02-14 23:24
惭愧惭愧 望上个评论不要通过审核了 感谢你的教程 祝愿新年技术更上一层楼
wusp
2015-02-11 10:42
老师你好,在使用您推荐的composer全量中国镜像的composer.json文件,并执行install之后,我碰到了这个问题:
wuspdeMacBook-Air:laravel-master wusp$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
[Composer\Downloader\TransportException]
The "
" file could not be downloaded: php_network_getaddresses: getaddrinfo faile
d: nodename nor servname provided, or not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: nodena
me nor servname provided, or not known
同时在命令行使用 php artisan serve命令时出现以下反馈:
wuspdeMacBook-Air:laravel-master wusp$ php artisan
Warning: require(/Applications/Web/laravel-master/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /Applications/Web/laravel-master/bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required '/Applications/Web/laravel-master/bootstrap/../vendor/autoload.php' (include_path='.:') in /Applications/Web/laravel-master/bootstrap/autoload.php on line 17
请问这个问题是如何引发的,该如何解决呢?
谢谢!
JohnLui
2015-02-11 12:55
@wusp:中国镜像会暂时抽疯。稳妥的解决办法是开 VPN 直连国外服务器。
后面一个问题是因为没有 composer update 安装依赖包导致的,在这个状态下,网站跑不起来。
ok
2015-02-10 15:15
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException 这是为啥·?
JohnLui
2015-02-10 15:38
@ok:路由匹配失败,404 的意思。
沐风待雨
2015-02-10 10:36
Generating autoload files
exception "BadMethodCallException" with message "Call to undefined method [package]" in D:\wamp\www\laravel\storage\framework\compiled.php 4346
在composer update 或者 php artisan 后会提示这个错误。我用的是laravel 5
composer.json 文件如下
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "5.0.*",
"cartalyst/sentry": "2.1.4"
},
"require-dev": {
"way/generators": "~3.0",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php -r \"copy('.env.example', '.env');\"",
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
JohnLui
2015-02-10 11:41
@沐风待雨:sentry 2 不支持 Laravel 5。
沐风待雨
2015-02-10 21:59
@JohnLui:那怎么整呢,"cartalyst/sentry": "2.1.4" ,你sh4o的sentry 2 是指的这个吗?那这里应该用sentry 那个版本?
JohnLui
2015-02-11 12:56