包没有安装,类不存在错误,Laravel 5.2

时间:2016-06-07 23:29:10

标签: php laravel laravel-5.2

该软件包是一种电子邮件注册功能。这是我的composer.json文件

  "require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    "cviebrock/eloquent-sluggable": "^3.1",
    "jrean/laravel-user-verification": "^2.0"
},

故障包是底部的用户验证。

以下是app.php中的提供商

'providers' => [

    /*
     * Laravel Framework Service Providers...
     */
    Illuminate\Auth\AuthServiceProvider::class,
    Illuminate\Broadcasting\BroadcastServiceProvider::class,
    Illuminate\Bus\BusServiceProvider::class,
    Illuminate\Cache\CacheServiceProvider::class,
    Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
    Illuminate\Cookie\CookieServiceProvider::class,
    Illuminate\Database\DatabaseServiceProvider::class,
    Illuminate\Encryption\EncryptionServiceProvider::class,
    Illuminate\Filesystem\FilesystemServiceProvider::class,
    Illuminate\Foundation\Providers\FoundationServiceProvider::class,
    Illuminate\Hashing\HashServiceProvider::class,
    Illuminate\Mail\MailServiceProvider::class,
    Illuminate\Pagination\PaginationServiceProvider::class,
    Illuminate\Pipeline\PipelineServiceProvider::class,
    Illuminate\Queue\QueueServiceProvider::class,
    Illuminate\Redis\RedisServiceProvider::class,
    Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
    Illuminate\Session\SessionServiceProvider::class,
    Illuminate\Translation\TranslationServiceProvider::class,
    Illuminate\Validation\ValidationServiceProvider::class,
    Illuminate\View\ViewServiceProvider::class,
    Cviebrock\EloquentSluggable\SluggableServiceProvider::class,
    Jrean\UserVerification\UserVerificationServiceProvider::class,
    /*
     * Application Service Providers...
     */
    App\Providers\AppServiceProvider::class,
    App\Providers\AuthServiceProvider::class,
    App\Providers\EventServiceProvider::class,
    App\Providers\RouteServiceProvider::class,

],

该软件包位于服务提供商之前的第一个块的底部。

这是我在同一档案中的别名。

 'aliases' => [

    'App' => Illuminate\Support\Facades\App::class,
    'Artisan' => Illuminate\Support\Facades\Artisan::class,
    'Auth' => Illuminate\Support\Facades\Auth::class,
    'Blade' => Illuminate\Support\Facades\Blade::class,
    'Cache' => Illuminate\Support\Facades\Cache::class,
    'Config' => Illuminate\Support\Facades\Config::class,
    'Cookie' => Illuminate\Support\Facades\Cookie::class,
    'Crypt' => Illuminate\Support\Facades\Crypt::class,
    'DB' => Illuminate\Support\Facades\DB::class,
    'Eloquent' => Illuminate\Database\Eloquent\Model::class,
    'Event' => Illuminate\Support\Facades\Event::class,
    'File' => Illuminate\Support\Facades\File::class,
    'Gate' => Illuminate\Support\Facades\Gate::class,
    'Hash' => Illuminate\Support\Facades\Hash::class,
    'Lang' => Illuminate\Support\Facades\Lang::class,
    'Log' => Illuminate\Support\Facades\Log::class,
    'Mail' => Illuminate\Support\Facades\Mail::class,
    'Password' => Illuminate\Support\Facades\Password::class,
    'Queue' => Illuminate\Support\Facades\Queue::class,
    'Redirect' => Illuminate\Support\Facades\Redirect::class,
    'Redis' => Illuminate\Support\Facades\Redis::class,
    'Request' => Illuminate\Support\Facades\Request::class,
    'Response' => Illuminate\Support\Facades\Response::class,
    'Route' => Illuminate\Support\Facades\Route::class,
    'Schema' => Illuminate\Support\Facades\Schema::class,
    'Session' => Illuminate\Support\Facades\Session::class,
    'Storage' => Illuminate\Support\Facades\Storage::class,
    'URL' => Illuminate\Support\Facades\URL::class,
    'Validator' => Illuminate\Support\Facades\Validator::class,
    'View' => Illuminate\Support\Facades\View::class,
    'UserVerification' => Jrean\UserVerification\Facades\UserVerification::class

],

我在命令行中收到了未找到该类的投诉。

3 个答案:

答案 0 :(得分:1)

看起来你的Eloquent-Slugabble课程存在问题。

你有这个你的提供者名单:

Cviebrock\EloquentSluggable\SluggableServiceProvider::class,

但是根据包文档,你应该有这个:

Cviebrock\EloquentSluggable\ServiceProvider::class,

https://github.com/cviebrock/eloquent-sluggable

只需更正此内容并再次运行作曲家。

答案 1 :(得分:0)

尝试评论此行:

Jrean\UserVerification\UserVerificationServiceProvider::class,

然后运行composer update,然后将行恢复到

只有在已安装服务提供商后,才应将其添加到配置中。您也可以尝试composer update --no-scripts,以便不运行Laravel安装后脚本。

答案 2 :(得分:0)

注释服务提供者和别名然后在CLI(命令行界面)中运行[userprofile]\AppData\Local\Android\Sdk\platforms\android-21\data\res\values\ids.xml命令