Welcome Guest, Not a member yet? Register   Sign In
route cannot be found while reverse-routing.
#1

Hi.. i get the error mentioned in the title when i try to update a row in db. And the validation failes.
Routes.php In a group admin
Code:
//Kategorier
    $routes->get('cat/list', 'CatController::index');
    $routes->get('cat/create', 'CatController::create');
    $routes->post('cat/store', 'CatController::store');
    $routes->get('cat/edit/(:num)', 'CatController::edit/$1');
    $routes->post('cat/update/(:num)', 'CatController::update/$1');
    $routes->get('cat/delete/(:num)', 'CatController::delete/$1');

in the controller
Code:
## Validation
          $input = $this->validate([
            'kategori' => 'required|min_length[3]',
          ]);

          if (!$input) {
             return redirect()->route('admin/cat/edit/'.$id)->withInput()->with('validation',$this->validator);
          } else {

error message from debug bar
Code:
          ## Validation
83           $input = $this->validate([
84             'kategori' => 'required|min_length[3]',
85           ]);
86   
87           if (!$input) {
88              return redirect()->route('admin/cat/edit/'.$id)->withInput()->with('validation',$this->validator);
89           } else {

With line 88 marked.
Is there enough info to answer?
Rgrds Bengt
Reply


Messages In This Thread
route cannot be found while reverse-routing. - by bengtdg - 05-19-2021, 02:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB