I have been working on a project where the data from the form page will be displayed in the admin page for the admin approval. After submitting data, it will return the user to the same form page with success message. I got the value in the admin page but the system returns the user to the admin page instead of the form page. Here is my code on the controller.
class RehomeController extends Controller
{
public function rehome(Request $show){
$breed = $show->input('breed');
$gender = $show->input('gender');
$age = $show->input('age');
$color = $show ->color;
$height = $show ->height;
$description = $show ->description;
$health = $show ->health;
return view('admin.posts')->with('breed',$breed);
}
}
Aucun commentaire:
Enregistrer un commentaire