stefan7
289
2
Laravel

Route Parameter delivers locale instead of ID

Posted 6 months ago by stefan7

Hi, I pass an ID in a route, but the function in the controller is reading the false part of the url.

http://127.0.0.1/testsystem/public/de/importer/startImportProcess/2

The right function in ImporterController is called, but: My variable $id return "de" (=locale of the url) instead of "2".

web.php

Route::get('startImportProcess/{id}', '[email protected]')->name('importer.start');

[email protected]

   public function startImportProcess($id) {
        $importer = Importer::find($id);

What could be the reason?

Please sign in or create an account to participate in this conversation.