【发布时间】:2020-11-06 23:45:09
【问题描述】:
我想在全局范围内使用表单中的变量,但我不知道如何使用 Laravel 8
例如,我想在“Alfabeto”中写一个这样的字符串:“a,b,c,d”,当按下“Confirmar”时,我可以将此变量与字符串“a,b,c,d”一起使用任何刀片视图。
<div class="form-group" style="margin-top: 2%;">
<label for="alfabetoAutomata">Alfabeto</label>
<input type="text" class="form-control" name="alfabetoAutomata" id="alfabetoAutomata" title="Debe ingresar el alfabeto como el siguiente ejemplo: a,b,c" pattern="^[a-zA-Z0-9]+(,[a-zA-Z0-9]+)*$" placeholder="Ingrese el alfabeto para los autómatas separados por comas. (Ej: a,b,c)" autocomplete="off" value="<?php echo htmlspecialchars($_GET['alfabetoAutomata'] ?? '', ENT_QUOTES); ?>" required>
</div>
我想全局使用 var $_GET['alfabetoAutomata'],我该怎么做?
希望我已经让自己明白了,非常感谢!
【问题讨论】:
标签: php laravel forms laravel-8