PHP code example of aimme / laravel-dynamo

1. Go to this page and download the library: Download aimme/laravel-dynamo 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/ */

    

aimme / laravel-dynamo example snippets


"aimme/laravel-dynamo": "1.0.0"

php artisan vendor:publish --provider="Aimme\Dynamo\DynamoServiceProvider"

$generator = App::make('dynamo');

	'migrations' => [
	     //path to the source erd sql export file
		'source' => [
			'raw' => 'mysql.sql', //source export file by default app will look for the file project root folder.
			'formatted' => 'formatted_source.txt' //to store the formatted source, by default the file will be created in project root
			],
		//make: this array is loaded to the MakeMigraions as making migrations configs
		//order: tells the order of making migrations
		//id_as_auto_increment:  true means if id is set in a table it would be set as increments()
		//or bigIncrements() depending on the field type declared.
		//timestamps_for_all: adds timestamps()->useCurrent() to all migrations even if its not declared in dump
		//output_path: to where all the migrations to be created. Changing it from here wouldn't bring any changes while running through artisan. Just use --path option to define path other than app defined path (database/migrations).
		//clean_folder: removes all the previous file in the path, if any
		'make' => [
			'order' => [
				// 'users',
	            'items_features',
	            // 'listings',
	            'sellers',
	            // 'features',
	            // 'items'
			],
			'id_as_auto_increment' => true,
			'timestamps_for_all' => true,
			'

php artisan generate:migrations

php artisan generate:migrations mysqlfile.sql

php artisan generate:migrations mysqlfile.sql --path=another/migrations