Symfony アプリケーションに次のルート構成があります。
label:
url: /label
param: { module: label, action: configure }
requirements: { sf_method: get }
label_create:
url: /label
param: { module: label, action: create }
requirements: { sf_method: post }
アクションにリンクされていexecuteConfigure
ます。executeCreate
次に、このように構成されたフォームがあります。
<form action="<?php echo url_for('@label_create') ?>" method="POST">
<?php echo $form->renderHiddenFields() ?>
<input type="hidden" name="sf_method" value="post" />
<!-- more stuff here -->
</form>
フォームが送信されるたびにexecuteConfigure
実行されますが、私が知る限り、POST
メソッドで構成されたルートはそれを避けて実行する必要がありexecuteCreate
ます。
同じ URL を保持するこれら 2 つのアクションを区別するにはどうすればよいですか?
ありがとう!