home.blade.php 文件 '''
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">{{ __('Dashboard') }}</div>
<div class="card-body">
@if (session('status'))
<div class="alert alert-success" role="alert">
{{ session('status') }}
</div>
@endif
{{ __('You are logged in!') }}
</div>
<div class="card-body">
@csrf
<form action="/upload" method="post">
<input type="file" name="image">
<input type="submit" name="upload">
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
'''
我的路线'''
Route::post('/upload',function (){
return('Halu');
});
我不知道错误在哪里,因为我是 laravel 8 的初学者。路线是用函数定义的,我不知道 get 或 post 出错的地方