Я получаю эту ошибку в Zend3 для маршрута, который определен в моем файле module.config.php, где определены мои маршруты.
Вот ссылка на мой файл представления, который вызывает ошибку:
<p>
<a href="<?= $this->url('property/imageAdd', ['p_id' => $property->p_id]) ?>">Add Image</a>
</p>
Вот мой маршрутизатор:
'router' => [
'routes' => [
'property' => [
'type' => Segment::class,
'options' => [
'route' => '/property',
'defaults' => [
'controller' => Controller\ListController::class,
'action' => 'forsale',
],
'constraints' => [
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
],
],
'may_terminate' => true,
'child_routes' => [
'detail' => [
'type' => Segment::class,
'options' => [
'route' => '/detail[/:p_id]',
'defaults' => [
'action' => 'detail',
],
'constraints' => [
'p_id' => '[1-9]\d*',
],
],
],
'add' => [
'type' => Literal::class,
'options' => [
'route' => '/add',
'defaults' => [
'controller' => Controller\WriteController::class,
'action' => 'add',
],
],
],
'imageAdd' => [
'type' => Segment::class,
'options' => [
'route' => '/imageAdd[/:p_id]',
'defaults' => [
'controller' => Controller\WriteController::class,
'action' => 'imageAdd',
],
'constraints' => [
'p_id' => '[1-9]\d*',
],
],
],
],
],
],
],
Буду признателен за любую помощь, которую вы можете предоставить, я с нетерпением жду вашего ответа.