我已经尝试了一些东西,但出于某种原因,在我安装 Laravel 6.17 的 Homestead 时,我有一条 /search 路由给出了 404。如果用户没有在搜索字段中输入任何内容,我希望它能够重定向。
我确实运行了 route:list 命令并得到了这个
vagrant@homestead:~/www/nettubenew$ php artisan route:list
+--------+----------+------------------------+------------------+------------------------------------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+------------------------+------------------+------------------------------------------------------------------------+------------+
| | GET|HEAD | / | home | App\Http\Controllers\GuestController@index | web |
| | GET|HEAD | channel/{channel} | | App\Http\Controllers\ChannelController@index | web |
| | PUT | channel/{channel}/edit | | App\Http\Controllers\ChannelSettingsController@update | web,auth |
| | GET|HEAD | channel/{channel}/edit | | App\Http\Controllers\ChannelSettingsController@edit | web,auth |
| | POST | login | | App\Http\Controllers\Auth\LoginController@login | web,guest |
| | GET|HEAD | login | login | App\Http\Controllers\Auth\LoginController@showLoginForm | web,guest |
| | POST | logout | logout | App\Http\Controllers\Auth\LoginController@logout | web |
| | GET|HEAD | password/confirm | password.confirm | App\Http\Controllers\Auth\ConfirmPasswordController@showConfirmForm | web,auth |
qq_遁去的一_1
MM们