Route::controller(DeviceApiController::class) ->prefix('/devices') ->as('devices.') ->group(function () { Route::get('/index', 'index')->name('index'); Route::get('/{serialNumber}/show', 'show')->name('show'); });