Laravel - Page Not Found Even That the Route Exists

404 Not Found but Route is defined Laravel

You have to get your id parameter in controller function(confirmar_pedido_mentoria).
Edit your code :

public function confirmar_pedido_mentoria(Request $request,$id){

....
}

404 NOT FOUND in Laravel 8

I think you got error here

Route::get('Aboutus', 'App\Http\Controllers\SmsController@aboutus');
Route::get('Contactus', 'App\Http\Controllers\SmsController@contactus');

instead

Route::get('/aboutus', 'App\Http\Controllers\SmsController@aboutus');
Route::get('/contactus', 'App\Http\Controllers\SmsController@contactus');

laravel- 404 not found but route exist

add / before your url like this

<form action="/dashboard/panel/update-order-information/{{$customerOrder->id}}" method="POST" > 

Edit:

 /**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$panel = Order::findOrFail($id)
$panel->column_in_your_database = $request->input('delivery_date');
$panel->save();
}

How to solve this 404 Not Found error even though my route exist

Use the function in your router like this:

Route::get('orderview/{id}', '[ClassNameSpace]\UserController@vieworder')->name('orderview');

Update: [ClassNameSpace] should be changed to your customer/global target class's namespace :)

I use url in action and get 404 not found but route is exist and when I use route I get error route is not defined in Laravel

The Routes you defined is not proper the URL should not be same

OLD Routes

Route::get('/speaker/book', function() { return view('speaker/book'); }); 

Route::get('/speaker/book', ' App\Http\Controllers\ProductController@create')
->name('speaker.book-create');

Route::post('/speaker/book', 'App\Http\Controllers\ProductController@store')
->name('speaker.book-store');

New Routes - Try this routes

Route::get('/speaker/book/view', function() { return view('speaker/book'); });

Route::get('/speaker/book/create',
'App\Http\Controllers\ProductController@create')->name('speaker.book-create');

Route::post('/speaker/book/store',
'App\Http\Controllers\ProductController@store')->name('speaker.book-store');

In Action for book.blade.php

 {{ route('speaker.book-store') }}

Understand One thing even if providing a route to the form-action , while posting the form it gets converted to URL because of your same URL define it's getting conflicted



Related Topics



Leave a reply



Submit