我会尝试更改我的路径文件位置,但是它的ganerate错误,所以我重置所有项目代码,当它的compalet重置但在其生成后这个错误。所以如何解决这个错误。
RouteServicveProvider.php
let mixedArray: [Any] = [1, "2", 3, "4"]
// you need to pass the `type` parameter
mixedArray.filterByType(Int.self) // [1, 3]
// you don't need to pass the `type` parameter as the compiler
// can infer T by looking at the sorounding context
let strings: [String] = mixedArray.filterByType() // ["2", "4"]
C:\ wamp64 \ WWW \示例\厂商\ laravel \框架\ SRC \照亮\路由\ Router.php
答案 0 :(得分:0)
文件C:\wamp64\www\example\vendor\laravel\framework\src\Illuminate\Routing\Router.php
第3行出错。并且还删除了' F'之前
答案 1 :(得分:0)
要更改路线文件的位置,您可以在RouteServiceProvider
:
public function boot(): void
{
$this->loadRoutes();
}
/**
* Register the application routes.
*/
public function loadRoutes(): void
{
Route::group([
'namespace' => 'App\Http\Controllers'
], function () {
$this->loadRoutesFrom(__DIR__ . '/path/to/routes.php');
});
}
答案 2 :(得分:0)