I hosted my laravel project on cpanel and some of my post requests keeps returning 405 error.
I have tried clearing app cache
Route::post('subscribe/{package}', [UserSubscribeController::class, subscribe'])->name('subscribe');
<form method="post" action="{{ route('subscribe', $package->id) }}">
@csrf
<button type="submit" id="submit" class="btn my-2 btn-primary btn-lg px-4 btn-style">Subscribe</button>
</form>
The issue was from the hosting provider, I had to change hosting and it works fine.