I Developed One Laravel Project. In local System Its working Fine. When i move the Project to the Server. Its Return Following Error.
PHP Fatal error: Interface 'JsonSerializable' not found in /home/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 18
My PHP Version is 7.0.17. How to Fix this Issue.
Collection.php
use Countable;
use Exception;
use ArrayAccess;
use Traversable;
use ArrayIterator;
use CachingIterator;
use JsonSerializable;
use IteratorAggregate;
use InvalidArgumentException;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;
class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable
{
use Macroable;
.....................
......................
}
It would appear that the setup between local and server is different.
Ensure that the resources you are referencing are available to the server in the same location as the local.
Check your Php info Settings, Json is Enabled.