So, this is my first post on stack overflow, if I missed something please let me know.
So I have some sort of a weird problem that I can't figure out. I have a laravel 8 application, worked on it on my machine and things seemed ok, after uploading it on a cpanel I got stuck with this weird problem.
I have a form:
<form action="{{ route('articles.store') }}" method="POST" class="form-horizontal" role="form" enctype="multipart/form-data">
@csrf
...
<input type="submit" value="Post" class="btn btn-primary">
</form>
The form has some inputs, a textarea and a file input. Those are my routes:
Route::prefix('articles')->middleware(['auth:sanctum', 'verified'])->group(function(){
Route::get('/create', [\App\Http\Controllers\ArticleController::class, 'create'])->name('articles.create');
Route::post('/store', [\App\Http\Controllers\ArticleController::class, 'store'])->name('articles.store');
});
When I submit the form I get the The GET method is not supported for this route. Supported methods: POST. error.
I opened the Network console in chrome, checked the preserve logs checkbox and did the request again and in the list it looks like this did the POST request, but received a 405
I checked in my cpanel Select PHP Version page the post_max_size and upload_max_size options and they are at 1G.
Also, tried to change the route to PUT and use @method('PUT') but I got the same result.
Also, a weird part is that if I submit the form with no content it works, I get the validations back as intended, but as soon as I fill even one of the fields I get the method not allowed error.
Maybe you guys have any idea what is happening here and point me in the right direction.
Thanks!
