ParseError syntax error, unexpected '|', expecting variable (T_VARIABLE) (View: D:\PHPts\data\wwwroot\blog\resources\vie
ParseError
syntax error, unexpected '|', expecting variable (T_VARIABLE) (View: D:\PHPts\data\wwwroot\blog\resources\views\welcome.blade.php)
Laravel 使用livewire后出现的问题,使用两个开发环境都碰到同样的问题:
出错的代码:
D:\phpts\data\wwwroot\blog\vendor\mediconesystems\livewire-datatables\src\Column.php:118
出错代码具体内容(红色的两行):
public static function callback(
array|string $columns,
Closure|string $callback,
array $params = [],
?string $callbackName = null
) {
$column = new static;
$column->name = 'callback_' . ($callbackName ?? crc32(JSON_encode(func_get_args())));
$column->callback = $callback;
$column->additionalSelects = is_array($columns) ? $columns : array_map('trim', explode(',', $columns));
$column->params = $params;
return $column;
}
环境1. phpts PHP Version 7.4.6
环境2. LaraGon PHP Version 8.1.9
环境2. Laragon PHP Version 7.4.19
来源地址:https://blog.csdn.net/qq_23295825/article/details/126583732
--结束END--
本文标题: Laravel语法错误: syntax error, unexpected ‘|‘, expecting variable
本文链接: https://www.lsjlt.com/news/388459.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0