вы объявили @csrf в форме.
use App\User;
use Auth;
use Illuminate\Http\Request;
public function update(Request $r,$id)
{
//$id=$_POST['id'];
$user = User::find($id); // if auth is necessary $user = Auth::id();
$user->update([
'email' => $r->email,
'name' => $r->name,
'password' => Hash::make($r['password']),
'user_level' => $r->user_level,
'location'=> $r->location,
'gender' => $r->gender
]);
}
в вашей web.php
Route::post('/user/update/{id}', [
'uses' => 'UsersController@update',
'as' => 'user.store'
]);
в вашей форме
<form class="" action="{{route('user.store')}}" method="post">
@csrf