[英]Laravel 8 Quilljs save data to database
I have a Form with three Quilljs Editors.我有一个带有三个 Quilljs 编辑器的表单。 now if I try to save it to my database, I will get nothing.现在,如果我尝试将其保存到我的数据库中,我将一无所获。 So is there any way to save quilljs Content to DB and how can I load the data from the db to die quilljs editor?那么有什么方法可以将 quilljs 内容保存到数据库中,我如何将数据库中的数据加载到 quilljs 编辑器中?
here is a small snippet from my blade File:这是我的刀片文件中的一个小片段:
<div class="card-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="test">Information</label>
<div id="test"> </div>
</div>
</div>
...
</div>
</div>
My Controller我的 Controller
public function store(Request $request)
{
$request-validate([
...
'test' => 'nullable',
...
$input = $request->all();
...
Testtable::create($input);
return redirect()->route('home')->with('success', 'You successfully add a new Product!');
}
I hope anyone can help me我希望有人能帮助我
you can't create table like that你不能像那样创建表
please follow laravel docs https://laravel.com/docs/5.0/eloquent#insert-update-delete请关注 laravel 文档https://laravel.com/docs/5.0/eloquent#insert-update-delete
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.