
The POST method is not supported for this route. Supported methods: PUT.
Error: The POST method is not supported for this route. Supported methods: PUT occurs when you try to use another method in HTML form and created route with another method. You have created the route with PUT method in route file and try to submit the form with post method in Laravel. Method should be same in route and HTML form.
Answers 1
-
HTML Form with put method using @method in Laravel blade
@method('PUT') //Example <form action="{{ route('user.update') }}" method="POST"> @csrf @method('PUT') //routes\web.php Route::put('/update-profile', '[email protected]')->name('user.update');
1
Random Code Snippet Queries: Laravel
- How to create belongstomany relation using custom name on custom pivot table
- How to get IP address in laravel
- Cannot end a section without first starting one
- How to disable timestamps in laravel
- How to change default timestamp fields name in Laravel
- Delete records with relationship in laravel
- How to start websocket server in laravel
- How to return error message from controller to view in laravel
- JQuery each loop on json response after ajax in laravel
- Laravel order by date not working
- Argument 1 passed to App\Http\Controllers\Auth\LoginController::authenticated() must be an instance of App\Http\Controllers\Auth\Request
- How to use or operator in laravel
- Calculate age from date of birth in Laravel
- Laravel 9 pagination with search filter
- Return view from route Laravel
- How to fetch single row data from database in laravel
- How to print form data in laravel
- Get products with number of orders in Laravel
- How to implement toggleLike() method in Overtrue\LaravelLike laravel package
- On delete set foreign id column value null using migration in laravel 8
- How to get route name on visit URL in laravel
- Method Illuminate\Events\Dispatcher::fire does not exist
- How to restore multiple records after soft-deletes in Laravel
- Get content from web URL in laravel
- Get the post details if it has at least one comment in comments table