小编raf*_*aff的帖子

如何在Laravel Voyager中创建自定义控制器

我在旅行者号很新。

TCG\\Voyager\\Http\\Controllers安装Voyager时,我已将所有控制器都放在里面,但是没有找到我使用BREAD创建的其他控制器。

除此之外,我想在Voyager管理面板中创建自定义控制器App\\Http\\Controllers\\Voyager。我还按照YouTube中Voyager教程的步骤制作了自定义控制器,但是无法创建。

有人帮忙吗?

php laravel laravel-5 voyager

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

htmlspecialchars()期望参数1是字符串,在Laravel中给出的数组

我的Laravel刀片模板中出现此错误

htmlspecialchars()期望参数1为str​​ing,给定数组

我试图将数组转换为刀片模板中的字符串.

这是代码

<script>
    var value = {{ $sliderImageDataArray }}.toString()
    window.MedicPressSliderCaptions = value;
</script>
Run Code Online (Sandbox Code Playgroud)

这里$silderImageDataArray存储的变量和值在哪里.

这是$silderImageDataArray价值

[{"title":"First title","text":"<p><span id=\"hs_cos_wrapper_module_1498510869515998\" class=\"hs_cos_wrapper hs_cos_wrapper_widget_container hs_cos_wrapper_type_widget_container\" data-hs-cos-general-type=\"widget_container\" data-hs-cos-type=\"widget_container\">First title<\\\/span><\\\/p>\n<p><a class=\"btn  btn-secondary\" href=\"http:\\\/\\\/localhost\\\/sencare\\\/book-appoinment\\\/\" target=\"_self\">  Make An Appointment <\\\/a>\\u00a0<a class=\"btn  btn-light\" href=\"http:\\\/\\\/localhost\\\/sencare\\\/our-doctors\\\/\" target=\"_self\"> Our Doctors<\\\/a><\\\/p>\n","is_video":false},{"title":"Second","text":"<p><span id=\"hs_cos_wrapper_module_1498510869515998\" class=\"hs_cos_wrapper hs_cos_wrapper_widget_container hs_cos_wrapper_type_widget_container\" data-hs-cos-general-type=\"widget_container\" data-hs-cos-type=\"widget_container\">Second<\\\/span><\\\/p>\n<p><a class=\"btn  btn-secondary\" href=\"http:\\\/\\\/localhost\\\/sencare\\\/book-appoinment\\\/\" target=\"_self\">  Make An Appointment <\\\/a>\\u00a0<a class=\"btn  btn-light\" href=\"http:\\\/\\\/localhost\\\/sencare\\\/our-doctors\\\/\" target=\"_self\"> Our Doctors<\\\/a><\\\/p>\n","is_video":false}]
Run Code Online (Sandbox Code Playgroud)

php html5 laravel laravel-blade laravel-5.3

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

ErrorException:PHP 中的数组到字符串转换

我想在 Laravel 中将数组转换为字符串。我已经搜索并实现了implode()转换此函数的功能,但出现了此错误

ErrorException (E_NOTICE) Array to string conversion
Run Code Online (Sandbox Code Playgroud)

这是我在控制器中的代码

$sliderImageDataArray[] =array(
                "title"=> $value->title,
                "text"=> "<p><span id=\"hs_cos_wrapper_module_1498510869515998\" class=\"hs_cos_wrapper hs_cos_wrapper_widget_container hs_cos_wrapper_type_widget_container\" data-hs-cos-general-type=\"widget_container\" data-hs-cos-type=\"widget_container\">".$value->text."<\/span><\/p>\n<p><a class=\"btn  btn-secondary\" href=\"http://localhost/sencare/book-appoinment/\" target=\"_self\">  Make An Appointment <\/a>\u00a0<a class=\"btn  btn-light\" href=\"http://localhost/sencare/our-doctors/\" target=\"_self\"> Our Doctors<\/a><\/p>\n",
                "is_video"=> false,
            );

$sliderImageDataArray = implode(" ",$sliderImageDataArray);

return $sliderImageDataArray;
Run Code Online (Sandbox Code Playgroud)

请有人帮忙

html php arrays string

2
推荐指数
1
解决办法
6万
查看次数

cPanel中的voyager管理面板错误`缺少存储符号链接'

我已经在cPanel中上载了航海家管理面板。它给出了错误Missing storage symlink,并且未显示新添加项目的图像。

假设我要添加一个新用户。所有信息均显示为新用户接受用户头像。

在本地,可以通过运行cmd轻松修复错误php artisan storage:link

但是在实时服务器中如何解决此错误?

我已经改变了storage driverin 的路径config/filesystems.php。将路径从更改storage_path()public_path()

'public' => [
    'driver' => 'local',
    'root' => public_path('app/public'),
    'url' => env('APP_URL').'/storage',
    'visibility' => 'public',
],
Run Code Online (Sandbox Code Playgroud)

cpanel laravel voyager

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

标签 统计

laravel ×3

php ×3

voyager ×2

arrays ×1

cpanel ×1

html ×1

html5 ×1

laravel-5 ×1

laravel-5.3 ×1

laravel-blade ×1

string ×1