Download the PHP package actcmsvn/data-synchronize without Composer
On this page you can find all versions of the php package actcmsvn/data-synchronize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package data-synchronize
Data Synchronize
Usage
Exporter
There are two ways to create an exporter.
Create an exporter using the command
You can use the php artisan data-synchronize:make:exporter
command to create an exporter.
Manually create an exporter
This is how an exporter should look like, below is an example of a PostExporter
class.
This is how to use the exporter in a controller.
And then register the route in your routes file.
Each exporter route should have a permission to access it. You can use the permission
key in the route group to define
the permission.
In above route definition, the permission is posts.export
key and it parent is tools.data-synchronize
. You can
define the permission in the permissions.php
of your plugin.
Now you can navigate to http://your-domain/tools/data-synchronize/export/posts
to export posts.
Add exporter to Export/Import Data panel section
To add the exporter to the Export/Import Data panel section, you can use the beforeRendering
method of
the PanelSectionManager
class to register the exporter into the panel section.
You can see the exporter in the Export/Import Data panel section.
Importer
There are two ways to create an importer.
Create an importer using the command
You can use the php artisan data-synchronize:make:importer
command to create an importer.
Manually create an importer
This is how an importer should look like, below is an example of a PostImporter
class.
This is how to use the importer in a controller.
And then register the route in your routes file.
Each importer route should have a permission to access it. You can use the permission
key in the route group to define the permission.
In above route definition, the permission is posts.import
key and it parent is tools.data-synchronize
. You can define the permission in the permissions.php
of your plugin.
Now you can navigate to http://your-domain/tools/data-synchronize/import/posts
to import posts.
Add importer to Export/Import Data panel section
To add the importer to the Export/Import Data panel section, you can use the beforeRendering
method of the PanelSectionManager
class to register the importer into the panel section.
You can see the importer in the Export/Import Data panel section.
Import/Export data from command line
All versions of data-synchronize with dependencies
maatwebsite/excel Version ^3.1
spatie/simple-excel Version ^3.6