小编Sid*_*art的帖子

在laravel中将图像上传到ckeditor服务器响应不正确

我正在尝试通过 ckeditor 4 上传图片 在此处输入图片说明

当我按下发送时,服务器收到此错误 Incorrect Server Response

这是我的控制器

public function mediauploadpost(Request $request){
    $CKEditor = $request->input('CKEditor');
    $funcNum  = $request->input('CKEditorFuncNum');
    $message  = $url = '';
    if (Input::hasFile('upload')) {
        $file = Input::file('upload');
        if ($file->isValid()) {
            $filename =rand(1000,9999).$file->getClientOriginalName();
            $file->move(public_path().'/wysiwyg/', $filename);
            $url = url('wysiwyg/' . $filename);
        } else {
            $message = 'An error occurred while uploading the file.';
        }
    } else {
        $message = 'No file uploaded.';
    }
    return '<script>window.parent.CKEDITOR.tools.callFunction('.$funcNum.', "'.$url.'", "'.$message.'")</script>';
}
Run Code Online (Sandbox Code Playgroud)

ckeditor laravel-5.6

9
推荐指数
2
解决办法
7131
查看次数

Laravel collectivehtml安全路线或网址

在我的视图页面中,我有这条路线:

{!! Form::open(['url' => 'forumcomment/' . $forum->slug, 'files'=>false, 'id' => 'qw-commentform' ,'class' => 'qt-clearfix'])   !!}

        <hr class="qt-spacer-s"><div class="input-field">
        {!! Form::textarea('comment', null, ['class'=>'materialize-textarea', 'id'=>'my-editor', 'required'=>'required','aria-required'=>true]) !!}
        <label for="comment" class="">Comment*</label></div>
        <hr class="qt-spacer-s">
      {!! Form::submit('Post Comment', array( 'class'=>'qt-btn qt-btn-primary qt-btn-xl' )) !!}
    {!! Form::close() !!}
Run Code Online (Sandbox Code Playgroud)

混合内容错误如何获得安全路线?

php laravel-5 laravelcollective

8
推荐指数
1
解决办法
312
查看次数

SQLSTATE[42000]:语法错误或访问冲突:1055

我正在使用 Laravel 5.5 我添加了这个依赖项来制作简单的搜索引擎

https://github.com/nicolaslopezj/searchable

但是当我尝试搜索任何东西时遇到问题

SQLSTATE[42000]: Syntax error or access violation: 1055 'myreview.movies.name' isn't in GROUP BY (SQL: select count() as aggregate from (select movies., max((case when LOWER(movies.name) LIKE car then 150 else 0 end) + (case when LOWER(movies.name) LIKE car% then 50 else 0 end) + (case when LOWER(movies.name) LIKE %car% then 10 else 0 end) + (case when LOWER(movies.description) LIKE car then 150 else 0 end) + (case when LOWER(movies.description) LIKE car% then 50 else 0 end) …

php mysql laravel laravel-5.5

3
推荐指数
1
解决办法
4642
查看次数

如何完成安装 php 交易者扩展

嗨,我正在使用 Virtual box 在这个项目中使用 ubuntu 16.04

https://medium.com/@joeldg/an-advanced-tutorial-a-new-crypto-currency-trading-bot-boilerplate-framework-e777733607ae

当我键入 composer update 并按 Enter 时,我已成功完成安装到 composer update 我收到错误 在此处输入图片说明

比我添加extension=trader.so到 php.ini 并检查 phpinfo() 显示我 在此处输入图片说明

它显示我已安装但仍然面临同样的错误帮助我为我的英语不好而感到抱歉

php laravel ubuntu-16.04

2
推荐指数
2
解决办法
7541
查看次数

如何在 Laravel 中播种外键

我正在使用 spatie/laravel-permission 包来获取角色和权限

但这里的种子永久角色和权限出现问题是数据库列表链接

https://github.com/spatie/laravel-permission/blob/master/database/migrations/create_permission_tables.php.stub

我制作这些数据播种机用于播种

 $this->call(UsersTableSeeder::class);
 $this->call(PermissionsTableSeeder::class);
 $this->call(RolesTableSeeder::class);
 $this->call(RolehaspermissionTableSeeder::class);
 $this->call(ModelhasrolesTableSeeder::class);
Run Code Online (Sandbox Code Playgroud)

许可表播种者

DB::table('roles')->insert([
'name' => 'Administrator',
'guard_name' => 'web',
]);
Run Code Online (Sandbox Code Playgroud)

角色表播种者

DB::table('roles')->insert([
'name' => 'Admin',
'guard_name' => 'web',
]);
Run Code Online (Sandbox Code Playgroud)

RolehaspermissionTableSeeder

DB::table('role_has_permissions')->insert([
'permission_id' => '1',
'role_id' => '1',
]);
Run Code Online (Sandbox Code Playgroud)

模型hasrolesTableSeeder

DB::table('model_has_roles')->insert([
'role_id' => '1',
'model_id' => '1',
'model_type' => 'App\User',
]);
Run Code Online (Sandbox Code Playgroud)

这是错误的屏幕截图

http://prntscr.com/h83ttx

帮我找种子谢谢

laravel laravel-5 laravel-migrations laravel-5.5

1
推荐指数
1
解决办法
7401
查看次数

如何将ckeditor html输出转换为普通字符串和限制字符串

我正在使用 laravel 5.5 试图限制 ckeditor 字符串,但它的输出是这样的

我的数据库

<p> something something something something something </p>
Run Code Online (Sandbox Code Playgroud)

我正在尝试这样

{!! substr($content,0, 20) !!}
Run Code Online (Sandbox Code Playgroud)

输出

<p> something ...
Run Code Online (Sandbox Code Playgroud)

而不是关闭段落,这就是为什么我的页面崩溃并且无法正常工作

我如何将 ckeditor 字符串转换为普通字符串并限制它

谢谢

javascript php ckeditor laravel

1
推荐指数
1
解决办法
609
查看次数