这个Faker\Factory或者fzaninotto/faker怎么安装?这个问题搞了我一个星期了,很急,很重要,我们就要用laravel做项目的
我是在github下载了 faker 的安装包解压到 vendor 目录下,然后又在 app\config\app.php 文件的 'providers' 数组中添加了 'Fzaninotto\Faker\FakerServiceProvider'。就是不行,一直报错“ymfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
Class 'Fzaninotto\Faker\FakerServiceProvider' not found ” ;求详细安装教程!
JohnLui
2015-04-28 15:21
@长青:Faker 可能需要老版本才支持 Laravel 4 了,推荐直接用 5。
cstabor
2015-04-20 23:23
Installing laravel/laravel (v4.2.11)
- Installing laravel/laravel (v4.2.11)
Downloading: 100%
Failed to download laravel/laravel from dist: RecursiveDirectoryIterator::__construct(learnlaravel/): failed to open dir: No such file or directory
Now trying to download from source
安装总是提示这个错误。
JohnLui
2015-04-28 15:21
@cstabor:建议用 5 。
徒步远行
2015-04-10 18:16
Warning: require(/webserver/program/laravel/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /webserver/program/laravel/bootstrap/autoload.php on line 16
Fatal error: require(): Failed opening required '/webserver/program/laravel/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /webserver/program/laravel/bootstrap/autoload.php on line 16
安装了没有vendor 目录
JohnLui
2015-04-10 18:43
@徒步远行:这是因为没有执行 composer dump-autoload 的原因
TIM
2015-03-27 14:24
laravel 5
执行了php artisan mak:console FindUser
然后也写好了
<?php namespace Yoyo\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class UserFind extends Command {
protected $name = 'user:find';
protected $description = 'user:find';
public function __construct()
{
parent::__construct();
}
public function fire()
{
$this->line('hello world');
}
protected function getArguments()
{
return [
//['example', InputArgument::REQUIRED, 'An example argument.'],
];
}
protected function getOptions()
{
return [
//['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],
];
}
}
怎么将他添加到php artisan user:find来执行,
JohnLui
2015-03-27 15:24