hao1990518

1263 经验值

在代码中实现获取全部路由信息,和route:list差不多

最近用composer安装5.1版本报错怎么解决呢

PS E:\www> composer create-project laravel/laravel=5.1.* laravel_5.1 --prefer-dist
Installing laravel/laravel (v5.1.11)
  - Installing laravel/laravel (v5.1.11)
    Loading from cache

Created project in laravel_5.1
> php -r "copy('.env.example', '.env');"
> php artisan clear-compiled

Warning: require(E:\www\laravel_5.1\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in E:\www\laravel_5.1\bootstrap\autoload.php on line 17

Fatal error: require(): Failed opening required 'E:\www\laravel_5.1\bootstrap/../vendor/autoload.php' (include_path='.;E:\xampp\php\PEAR') in E:\www\laravel_5.1\bootstrap\autoload.php on line 17
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error


  [RuntimeException]
  Error Output:


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

照着视频上面敲的代码,这个问题是出在哪里呢

public function setPublishedAtAttribute($date)
{    $this->attributes['published_at']=Carbon::createFromFormat('Y-m-d',$date);
}

error:
InvalidArgumentException in Carbon.php line 425: Trailing data