PHP code example of rasel9w9 / data-generator

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/ */

    

rasel9w9 / data-generator example snippets


'providers' => [
    // ...
    rasel9w9\DataGenerator\DataGeneratorServiceProvider::class,
]

	//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.
    }

}