(1/1) ErrorException ReflectionFunction::__construct() ex

(1/1) ErrorException ReflectionFunction::__construct() ex

问题

(1/1) 错误异常 ReflectionFunction::__construct() 期望参数 1 为字符串,数组给定

code

****Route****
-------
   <?PHP
   use Illuminate\Support\Facades\Route;
  use App\Http\Controllers\usercontroller;
   Route::get('/register', [usercontroller::class, 'register']);

****controller****
--------
    <?php

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;


   class usercontroller extends Controller{

    public function register(){
        return View('register');
    }}

尝试路由声明的旧表示法 Route::get('/register', 'App\Http\Controllers\usercontroller@register');