voyager: Missing required parameters for [Route: voyager.bread.delete] [URI: admin/bread/{id}]

Version information

  • Laravel: v6.6.0
  • Voyager: v1.3.0
  • PHP: 7.2
  • Database: [PgSql] [9.6] (e.g. MySQL 8.0)

Description

I just installed fresh voyager and it installed successfully, everything is openable but when i clicked on Database menu from admin panel it display’s error as following.

image

Steps To Reproduce

Steps to reproduce the behavior:

  1. install voyager version 1.3
  2. login to admin panel with admin user
  3. open database menu from left side menu bar
  4. See error

Expected behavior

image

Screenshots

all screen shots attached.

Additional context

I solved this error by following these steps. each of these steps solved my problem but i don’t know which one is best.

  1. open following file projectfolder\vendor\tcg\voyager\routes\voyager.php

Add ? infornt of {id} as {id?} at following line

Route::delete('{id}', ['uses' => $namespacePrefix.'VoyagerBreadController@destroy', 'as' => 'delete']); OR

  1. open following file

projectfolder\vendor\tcg\voyager\resources\views\tools\database\index.blade.php

replace ['id' => null] text with '' in following line

<form action="{{ route('voyager.bread.delete', ['id' => null]) }}" id="delete_bread_form" method="POST">

These steps solved my problem but which one is right one i don’t know and why it exist in latest version but not in old also don’t know

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 17
  • Comments: 29 (1 by maintainers)

Commits related to this issue

Most upvoted comments

#4587 it’s already merged and will be part of next release.

on voyager v1.3.2 these trick works for me here

@doubleprincez please read previous comments or search in issues #4623

Missing required parameters for [Route: voyager.menus.item.destroy] [URI: admin/menus/{menu}/item/{id}].

This is what i’m receiving from a fresh voyager installation with dummy data, installed 22nd Dec 2019

the error seems to be connected with tcg/voyager/resources/views/menus/builder

    <form action="{{ route('voyager.menus.item.destroy', ['menu' => $menu->id, 'id' => '__id']) }}"
                          id="delete_form"
                          method="POST">

The proposed fix does’n fix for me : same eror message

pakistanimoon solution seems ok

I have the same problem