PHP code example of mathieutu / laravel-json-syncer
1. Go to this page and download the library: Download mathieutu/laravel-json-syncer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mathieutu / laravel-json-syncer example snippets
namespace App\Models;
//...
use MathieuTu\JsonSyncer\Contracts\JsonExportable;
use MathieuTu\JsonSyncer\Traits\JsonExporter;
// or/and
use MathieuTu\JsonSyncer\Contracts\JsonImportable;
use MathieuTu\JsonSyncer\Traits\JsonImporter;
class User extends Model implements JsonExportable, JsonImportable
{
use JsonExporter;
use JsonImporter;
// ...
}