while running PHPUnit test in PHPStorm, just check CLI Interpreter version. Latest version of PHPUnit require "php": "^7.2"
id
, а в javascript уже вызывать их.<?php foreach ($items as $item): ?>
<button class="ui icon button show-modal" data-modal="#item-modal-<?= $item['id'] ?>">
<i class="pencil icon"></i>
</button>
<div class="ui modal" id="item-modal-<?= $item['id'] ?>">
...
</div>
<?php endforeach; ?>
$('.show-modal').click(function (e) {
e.preventDefault();
var modal_id = $(this).attr('data-modal');
$(modal_id).modal('show');
});
'urlManager' => [
'enablePrettyUrl' => true,
'enableStrictParsing' => true,
'showScriptName' => false,
'rules' => [
[
'class' => 'yii\rest\UrlRule',
'pluralize' => false,
'controller' => [
'v1/product',
'v1/user',
],
],
],
],