Laravel 在使用 Form::open() 时添加多个类
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31690937/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 12:04:34 来源:igfitidea点击:
Laravel add multiple classes when using Form::open()
提问by jhamPac
Currently I have a form that looks like this:
目前我有一个看起来像这样的表格:
{!! Form::open(['route' => 'lists.store', 'class' => 'form1']) !!}
I was wondering how can I add multiple classes something like the following
我想知道如何添加多个类,如下所示
{!! Form::open(['route' => 'lists.store', 'class' => 'form', 'blah', 'blah2']) !!}
I am expecting the result to be:
我期待的结果是:
<form class="form blah blah2" ...
but instead i just get an error.
但相反,我只是收到一个错误。
回答by Abdulla Nilam
Just Try this
试试这个
{!! Form::open(['route' => 'lists.store', 'class' => 'form blah blah2']) !!}