1. Go to this page and download the library: Download rasel9w9/data-generator 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/ */
//to export specific table data
php artisan alauddin:generate-table-data --table=youreTableName
//To export All Tables Of the database
php artisan alauddin:generate-data
//....
use rasel9w9\DataGenerator\GenerateData;
class DataController extends Controller
{
public function data()
{
//To Generate data Of specific table
$object = new GenerateData();
$object->generateTableData("yourTableName");
//To Generate data Of All The tables
$object->generateData();
//The Data is saved to /database/seeders/data directory with separate table name as file name.The file(s) has no extension just open the file in a editor and you can see your table data as php array.
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.