vendredi 26 juin 2020

Laravel how to pass null value in route parameter in front end

I have a form and I'm trying to pass null value into the $dev-id parameter but it doesnt work, instead ti will replace the dev id parameter with the $id as shown in my code at the bottom,

The reason i needed it to be null because I'm using this function for 2 different page but one of the page doesn't have $dev_id. any help is appreciated

HTML:

<form method="post"
    action="" autocomplete="off" novalidate>

web.php :

Route::post('developers/{dev_id?}/admins/{id}/edit', 'Admin\DeveloperAdminController@postEditDeveloperAdmin')->name('admin.developers.admins.edit.post')->where(['dev_id' => '[0-9]+', 'id' => '[0-9]+']);


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire