laravel 找不到接口“JsonSerializable”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48465990/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Interface 'JsonSerializable' not found
提问by user33333
I am getting Interface 'JsonSerializable' not found error
in my site.
我正在进入Interface 'JsonSerializable' not found error
我的网站。
I am using Laravel 5.4
and PHP 7.1.13
.
我正在使用Laravel 5.4
和PHP 7.1.13
。
JSON module
is also enabled in Cpanel
.
JSON module
在Cpanel
.
But still i am getting following error:
但我仍然收到以下错误:
PHP Fatal error: Interface 'JsonSerializable' not found in /******/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php on line 22
PHP Fatal error: Interface 'JsonSerializable' not found in /******/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 17
PHP 致命错误:在第 22 行的 /******/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php 中找不到接口“JsonSerializable”
PHP 致命错误:在第 17 行的 /******/vendor/laravel/framework/src/Illuminate/Support/Collection.php 中找不到接口“JsonSerializable”
Thanks in advance!
提前致谢!
回答by Ehtasham Nasir
Check your Php info Settings, Json is Enabled.
检查您的 PHP 信息设置,Json 已启用。
PHP Fatal error: Interface 'JsonSerializable' not found - My Php Version is 7.0.17