laravel8 路由方法異常(不確定是不是框架BUG)

channel發表於2021-05-08

程式碼

Route::get('user8/{name}',function ($name){
    return $name;
})->whereAlphaNumeric('name');  //可以為數字和字母  //有問題
//  報錯資訊BadMethodCallException
//Method Illuminate\Routing\Route::whereAlphaNumeric does not exist.

laravel8 路由方法異常(不確定是不是框架BUG)
框架版本
“require”: {
“php”: “^7.3|^8.0”,
“barryvdh/laravel-ide-helper”: “^2.9”,
“fideloper/proxy”: “^4.4”,
“fruitcake/laravel-cors”: “^2.0”,
“guzzlehttp/guzzle”: “^7.0.1”,
“laravel/framework”: “^8.5.8”,
“laravel/jetstream”: “^1.6”,
“laravel/sanctum”: “^2.6”,
“laravel/tinker”: “^2.5”,
“livewire/livewire”: “^2.0”,
“spatie/laravel-permission”: “^3.18”
},

本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章