Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 7dc79ae

Browse files
committed
Add Field Method Directive @ Octopy Templating
1 parent 72465c9 commit 7dc79ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

system/View/Compiler/HelperDirective.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public function parse(Stream $stream)
2626
{
2727
if ($stream->next('csrf')) {
2828
return '<input type="hidden" name="__TOKEN__" value="<?php echo csrf(); ?>">';
29+
} elseif ($stream->next('method')) {
30+
return '<input type="hidden" name="__method" value=' . mb_strtoupper($stream->expression()) . '>';
2931
} elseif ($stream->next('dd') || $stream->next('d') || $stream->next('dump')) {
3032
return $this->php('%s(%s)', $stream->code(), $stream->expression());
3133
} elseif ($stream->next('session')) {

0 commit comments

Comments
 (0)