hcweb

743 经验值

奇怪了 我看视频都可以呢 我只做的时候就报错!

好的 Provider 配置 Overtrue\LaravelWechat\ServiceProvider::class, alias 配置'EasyWeChat' => Overtrue\LaravelWechat\Facade::class, composer.json
{

"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.6.4",
    "laravel/framework": "5.3.*",
    "tcg/voyager": "^0.10.5",
    "barryvdh/laravel-ide-helper": "^2.2",
    "laravelcollective/html": "^5.3.0",
    "overtrue/laravel-wechat": "~3.0"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.0",
    "symfony/css-selector": "3.1.*",
    "symfony/dom-crawler": "3.1.*"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-root-package-install": [
        "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan ide-helper:generate",
        "php artisan ide-helper:meta",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
}

}

ReflectionException in Container.php line 749:
Class wechat does not exist
上面写错了!

大神 您好 $wechat = app('wechat'); 然后ReflectionException in Container.php line 749:
Class easywechat does not exist这个是怎么回事?

大神 请教个问题 再做内容管理系统的时候 比如导航的URL http://laravel.com/cate/1 我想让他显示成http://laravel.com/about http://laravel.com/cate/2 我想让他显示成http://laravel.com/case 这个要怎么实现?