php - 此路由不支持 GET 方法。支持的方法:HEAD。- 拉拉维尔 8
问题描述
我刚刚用 jetstream 安装了 laravel 8,一切正常。我调用了登录和注册路由,它们也工作正常,但是当我访问根 url 时,它给了我这个错误。IE
The GET method is not supported for this route. Supported methods: HEAD.
不知道有什么问题我运行了很多命令
php artisan cache:clear
php artisan route:cache
php artisan view:cache
php artisan config:cache
我的路线有这个代码
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Artist\AlbumController;
use App\Http\Controllers\Artist\TrackController;
use App\Http\Controllers\Artist\DashboardController;
use App\Http\Controllers\Artist\ArtistController;
Route::get('/', function () { return view('login'); });
Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
return view('dashboard');
})->name('dashboard');
不知道为什么我会收到此错误
解决方案
推荐阅读
- reactjs - 尝试渲染坐标时出现react-leaflet typeError
- erlang - Erlang 中的堆栈跟踪中缺少条目
- entity - Sulu:如何使自定义实体可翻译?
- ios - Flutter path_provider pod安装问题
- django - 以电子邮件友好的方式使用超链接和图像
- python - 如何将不和谐反应保存为变量
- javascript - airbnb/react-dates DayPickerRangeController 在某些函数调用上设置可见月份
- java - 即使arrayList中有数据,ListView也是空的
- c - 计算信用卡号码位数的程序?前导数字从 0 开始时输入错误
- python - 不可散列的类型:'TensorShape'