Controller File:
$validatedData = $request->validate([
'type' => 'required|string|max:255',
]);
$type_data = new Type();
$type_detial = $type_data->add_type($request);
session()->flash('type_create', 'Type Created Successfully!');
return redirect('types/list');
Blade File:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<h1>List</h1>
</body>
</html>
Web.php:
Route::resource('types', 'TypeController');
Insert data in Database than not redirect in list page. Error given is
Sorry, the page you are looking for could not be found.
I create a list.blade.php
file.