我想在我的laravel形式中使用占位符。但它不能正常工作。请你提供一些富有成效的解决方案吗?TIA
<div class="col-md-10">
{!! Form::select('asign_list[]', $employees, null,
['class' => 'form-control select2', 'required'=>'required','multiple'])!!}
</div>
答案 0 :(得分:1)
您可以在选项数组中传递占位符,如下所示:
12:24:15,899 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."foo_war_exploded.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."foo_war_exploded.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "foo_war_exploded.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0160: Failed to mount deployment content
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:95)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
Caused by: java.io.FileNotFoundException: /.../foo_war_exploded (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.jboss.vfs.spi.RootFileSystem.openInputStream(RootFileSystem.java:51)
at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:318)
at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:533)
at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:108)
at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:91)
... 6 more
...
[2017-04-23 12:24:18,957] Artifact bar:war exploded: Artifact is deployed successfully
答案 1 :(得分:0)
按照这个 -
{{ Form::select('age', [
'young' => 'Under 18',
'adult' => '19 to 30',
'adult2' => 'Over 30'], 1
) }}
它将生成此html -
<select name="age">
<option value="young">Under 18</option>
<option value="adult" selected="selected">19 to 30</option>
<option value="adult2">Over 30</option>
</select>