mysql - 如何在共享主机上的laravel中保存textarea内容?

标签 mysql laravel

我正在工作这个laravel项目"mealscorner.co.ke"。我在此页面“mealscorner.co.ke/quotations/create”中添加报价,并在此处"mealscorner.co.ke/home"进行查看。
在本地主机上工作时,我将复制订单项并将其粘贴到CKEditor中,然后以HTML格式完美地保存到数据库中。当我托管项目时,CKEditor中的内容(包括图像)不会保存-当我输入一些文本时,它会保存。

这是商店功能

public function store(Request $request)
{
    $quotation = new Quotation;
    $quotation->quotation_details = $request->quotation_details;
    $quotation->quotation_address = $request->quotation_address;
    $quotation->save();
}

这是数据库迁移
public function up()
{
    Schema::create('quotations', function (Blueprint $table) {
        $table->bigIncrements('id');
        $table->longText('quotation_details', 4000000000);
        $table->string('quotation_address');
        $table->timestamps();
});
}

这是我要保存的内容(在文本区域内)的图像。 enter image description here

这是格式的HTML代码
                <div class="card-body">
                <form method="POST" action="{{ route('quotations.store') }}" enctype="multipart/form-data">
                        @csrf
                    <label for="">Order Items</label><br>
                    <textarea class="form-control ckeditor_form" id="quotations" name="quotation_details" ></textarea>

                    <label for="">Address</label><br>
                    <textarea class="form-control" id="quote" name="quotation_address" ></textarea>
                    <br>
                    <input type="submit"  id="submit" value="Save">
                </form>
            </div>

最佳答案

在我自己的盒子上,我可能仍会通过SSH设置权限。

sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache

但是,对于共享主机,您可能必须通过控制面板来完成。

那可能是您的问题之一。您可以检查日志吗?

关于mysql - 如何在共享主机上的laravel中保存textarea内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59099687/

相关文章:

MySQL 服务器无法在 Raspberry Pi 上启动

git - 我是否应该将 Laravel 供应商目录添加到 .gitignore 中?

laravel - 如何使用 Fargate 在 AWS ECS 上配置基于 Laravel 的应用程序?

jquery - 我如何使用ajax将多个数据从 Controller 发送到页面html

javascript - 使用 Restangular 时出现“Access-Control-Allow-Origin” header 问题

mysql - 存储大量数据的更好方法?

php - 使用 laravel 按纬度和经度搜索

php - Laravel 5 - PHP Storm - 希伯来语播种机

mysql-workbench - MySql Workbench 6 导出失败,变量未知 '-internal-schemas=FALSE'

php - 从具有相同名称的多行中获取结果