vanchao0519/voyager-data-transport

A command line to generate voyager Controller and View files to import and export data with excel and database

v5.4 2023-02-18 15:04 UTC

This package is auto-updated.

Last update: 2024-04-18 17:39:39 UTC


README

A command line tools to generate the Controller and the View files which can import data to database and export data to the file which extension included excel, csv and pdf.
Notice that the package is based on Voyager.

Before install

You must confirm that laravel project created and the voyager package installed before.
Run the command below to install basic test data

php artisan voyager:install --with-dummy

Move the test data csv to 'public' folder
Suppose your current directory is path/to/VoyagerDataTransport

mv posts_data.csv public/data.csv

How to install the VoyagerDataTransport

composer require vanchao0519/voyager-data-transport

How to use

The fastest way:

php artisan voyager:data:transport <data-tabel-name>

You can also used the single command which you want:

  • Create import permission record to database
php artisan voyager:data:transport:import:permission <data-tabel-name>
  • Create export permission record to database
php artisan voyager:data:transport:export:permission <data-tabel-name>
  • Create import controller file
php artisan voyager:data:import:controller <data-tabel-name>
  • Create export controller file
php artisan voyager:data:export:controller <data-tabel-name>
  • Create browse view file
php artisan voyager:data:transport:browse:view <data-tabel-name>
  • Create import data view file
php artisan voyager:data:transport:import-data:view <data-tabel-name>
  • Create export data view file
php artisan voyager:data:transport:export-data:view <data-tabel-name>
  • Create voyager data transport permission detail config file
php artisan voyager:data:transport:permission:detail:config <data-tabel-name>
  • Create voyager data transport route detail config file
php artisan voyager:data:transport:route:detail:config <data-tabel-name>
  • Publish config files to app/VoyagerDataTransport/config/permissions and app/VoyagerDataTransport/config/route folder
php artisan voyager:data:transport:publish:config

More

Here is a demonstrate more details after you execute the command line of this project