目标 [Illuminate\Contracts\Broadcasting\Factory] 不可实例化
Target [Illuminate\Contracts\Broadcasting\Factory] is not instantiable
我不断得到
Target [Illuminate\Contracts\Broadcasting\Factory] is not instantiable.
我一加就
App\Providers\BroadcastServiceProvider::class,
进入我的 app.php,有人可以帮忙吗?
已更新
'providers' => [
/*
* Laravel Framework Service Providers...
*/
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider',
'Illuminate\Filesystem\FilesystemServiceProvider',
'Illuminate\Foundation\Providers\FoundationServiceProvider',
'Illuminate\Hashing\HashServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Pipeline\PipelineServiceProvider',
'Illuminate\Queue\QueueServiceProvider',
'Illuminate\Redis\RedisServiceProvider',
'Illuminate\Auth\Passwords\PasswordResetServiceProvider',
'Illuminate\Session\SessionServiceProvider',
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
Collective\Html\HtmlServiceProvider::class,
/*
* Application Service Providers...
*/
'App\Providers\AppServiceProvider',
'App\Providers\ConfigServiceProvider',
'App\Providers\EventServiceProvider',
'App\Providers\RouteServiceProvider',
Intervention\Image\ImageServiceProvider::class,
Collective\Remote\RemoteServiceProvider::class,
HTMLMin\HTMLMin\HTMLMinServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
App\Providers\BroadcastServiceProvider::class,
],
app/Providers/BroadcastServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes();
require base_path('routes/channels.php');
}
}
您的 providers
列表中缺少 Illuminate\Broadcasting\BroadcastServiceProvider
。
我相信这是 5.1 升级指南的一部分。
我不断得到
Target [Illuminate\Contracts\Broadcasting\Factory] is not instantiable.
我一加就
App\Providers\BroadcastServiceProvider::class,
进入我的 app.php,有人可以帮忙吗?
已更新
'providers' => [
/*
* Laravel Framework Service Providers...
*/
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider',
'Illuminate\Filesystem\FilesystemServiceProvider',
'Illuminate\Foundation\Providers\FoundationServiceProvider',
'Illuminate\Hashing\HashServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Pipeline\PipelineServiceProvider',
'Illuminate\Queue\QueueServiceProvider',
'Illuminate\Redis\RedisServiceProvider',
'Illuminate\Auth\Passwords\PasswordResetServiceProvider',
'Illuminate\Session\SessionServiceProvider',
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
Collective\Html\HtmlServiceProvider::class,
/*
* Application Service Providers...
*/
'App\Providers\AppServiceProvider',
'App\Providers\ConfigServiceProvider',
'App\Providers\EventServiceProvider',
'App\Providers\RouteServiceProvider',
Intervention\Image\ImageServiceProvider::class,
Collective\Remote\RemoteServiceProvider::class,
HTMLMin\HTMLMin\HTMLMinServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
App\Providers\BroadcastServiceProvider::class,
],
app/Providers/BroadcastServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes();
require base_path('routes/channels.php');
}
}
您的 providers
列表中缺少 Illuminate\Broadcasting\BroadcastServiceProvider
。
我相信这是 5.1 升级指南的一部分。