Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 队列不会启动laravel 8_Php_Laravel - Fatal编程技术网

Php 队列不会启动laravel 8

Php 队列不会启动laravel 8,php,laravel,Php,Laravel,php artisan队列:工作-不工作。 ErrorException:尝试访问null类型值的数组偏移量 vendor/laravel/framework/src/illumb/Queue/QueueManager.php:156 protected function resolve($name) { $config = $this->getConfig($name); return $this->getConnector($config['

php artisan队列:工作-不工作。 ErrorException:尝试访问null类型值的数组偏移量

vendor/laravel/framework/src/illumb/Queue/QueueManager.php:156

protected function resolve($name)
     {
       $config = $this->getConfig($name);

      return $this->getConnector($config['driver'])
                         ->connect($config)
                       ->setConnectionName($name);
    }
config/queue.php

<?php

return [


    'default' => env('QUEUE_CONNECTION', 'sync'),


    'connections' => [

        'sync' => [
            'driver' => 'sync',
        ],

        'database' => [
            'driver' => 'database',
            'table' => 'jobs',
            'queue' => 'default',
            'retry_after' => 90,
        ],


        'redis' => [
            'driver' => 'redis',
            'connection' => 'default',
            'queue' => env('REDIS_QUEUE', 'default'),
            'retry_after' => 90,
            'block_for' => null,
        ],

    ]
];

.env
文件中,您的
队列连接是什么。如果使用自定义连接,则必须在
config/queue.php
中定义
driver
键。我显示了代码队列。我不太明白我需要修复什么?您的
config/queue.php
是正确的。
.env
上的
QUEUE\u CONNECTION
值错误。它应该是
数据库
而不是
数据库