From d9670cd325b8fd0d208ca2d56edc27ce048b4fb0 Mon Sep 17 00:00:00 2001 From: Askar Allagulov Date: Thu, 31 Aug 2017 09:23:05 +0500 Subject: [PATCH 1/9] laravel55 extra autoload --- composer.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ff46d4c..373e48b 100644 --- a/composer.json +++ b/composer.json @@ -32,5 +32,12 @@ "Orangehill\\Iseed\\Tests\\": "tests" } }, - "minimum-stability": "dev" + "minimum-stability": "dev", + "extra": { + "laravel": { + "providers": [ + "Orangehill\\Iseed\\IseedServiceProvider" + ] + } + } } From ec4ff38675d4d1a4ea4750d759713fb2a58c5f12 Mon Sep 17 00:00:00 2001 From: Askar Allagulov Date: Thu, 31 Aug 2017 11:07:59 +0500 Subject: [PATCH 2/9] fire -> handle --- src/Orangehill/Iseed/IseedCommand.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Orangehill/Iseed/IseedCommand.php b/src/Orangehill/Iseed/IseedCommand.php index 34f9df6..40768be 100755 --- a/src/Orangehill/Iseed/IseedCommand.php +++ b/src/Orangehill/Iseed/IseedCommand.php @@ -32,6 +32,16 @@ public function __construct() parent::__construct(); } + /** + * Execute the console command. + * + * @return void + */ + public function handle() + { + return $this->fire(); + } + /** * Execute the console command. * From 3aa0dc8f2a1eff0909b1c7a17ab6dab1cc9668c3 Mon Sep 17 00:00:00 2001 From: Askar Allagulov Date: Thu, 31 Aug 2017 11:07:59 +0500 Subject: [PATCH 3/9] fire -> handle --- src/Orangehill/Iseed/IseedCommand.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Orangehill/Iseed/IseedCommand.php b/src/Orangehill/Iseed/IseedCommand.php index 34f9df6..4864ee5 100755 --- a/src/Orangehill/Iseed/IseedCommand.php +++ b/src/Orangehill/Iseed/IseedCommand.php @@ -37,6 +37,16 @@ public function __construct() * * @return void */ + public function handle() + { + return $this->fire(); + } + + /** + * Execute the console command (for <= 5.4). + * + * @return void + */ public function fire() { // if clean option is checked empty iSeed template in DatabaseSeeder.php From 2cad6b56f3d988bdd3d10ba02f2cafb3ae2cd4a3 Mon Sep 17 00:00:00 2001 From: Askar Allagulov Date: Thu, 31 Aug 2017 11:14:09 +0500 Subject: [PATCH 4/9] update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cec746c..dd83986 100755 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ If you wish to install it on Laravel 4 you should require `1.1` version: composer update +#### Laravel 5 versions less than 5.5 3) Add the service provider by opening a `app/config/app.php` file, and adding a new item to the `providers` array. Orangehill\Iseed\IseedServiceProvider::class From 0f0eb61b065f5669284d95b389666d47875a6552 Mon Sep 17 00:00:00 2001 From: Maras0830 Date: Fri, 4 May 2018 12:43:17 +0800 Subject: [PATCH 5/9] hotfix README readable. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dd83986..e636e22 100755 --- a/README.md +++ b/README.md @@ -30,14 +30,14 @@ If you wish to install it on Laravel 4 you should require `1.1` version: } 2) Update Composer from the CLI: - +``` composer update - +``` #### Laravel 5 versions less than 5.5 3) Add the service provider by opening a `app/config/app.php` file, and adding a new item to the `providers` array. - +``` Orangehill\Iseed\IseedServiceProvider::class - +``` ## Artisan command options ### [table_name] From 736408b755a432d3d5249b2293d6abc11e89ac02 Mon Sep 17 00:00:00 2001 From: Matt Rabe Date: Thu, 23 Aug 2018 16:13:55 -1000 Subject: [PATCH 6/9] Add classnameprefix and classnamesuffix parameters --- README.md | 46 +++++++++++++++++++++------ src/Orangehill/Iseed/Iseed.php | 12 ++++--- src/Orangehill/Iseed/IseedCommand.php | 14 ++++++-- tests/IseedTest.php | 4 +-- 4 files changed, 57 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index e636e22..d078552 100755 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ For Laravel 5 installation edit your project's `composer.json` file to require ` "require": { "orangehill/iseed": "dev-master" } - + #### Laravel 5 versions less than 5.3.8 For Laravel 5 versions that are less than 5.3.8 edit your project's `composer.json` file to require `2.2` version: "require": { "orangehill/iseed": "2.2" } - + #### Laravel 4 If you wish to install it on Laravel 4 you should require `1.1` version: @@ -52,6 +52,32 @@ php artisan iseed my_table php artisan iseed my_table,another_table ``` +### classnameprefix & classnamesuffix +Optionally specify a prefix or suffix for the Seeder class name and file name. +This is useful if you want to create an additional seed for a table that has an existing seed without overwriting the existing. + +Examples: + +``` +php artisan iseed my_table --classnameprefix=Customized +``` +outputs CustomizedMyTableSeeder.php + +``` +php artisan iseed my_table,another_table --classnameprefix=Customized +``` +outputs CustomizedMyTableSeeder.php and CustomizedAnotherTableSeeder.php + +``` +php artisan iseed my_table --classnamesuffix=Customizations +``` +outputs MyTableCustomizationsSeeder.php + +``` +php artisan iseed my_table,another_table --classnamesuffix=Customizations +``` +outputs MyTableCustomizationsSeeder.php and AnotherTableCustomizationsSeeder.php + ### force Optional parameter which is used to automatically overwrite any existing seeds for desired tables @@ -149,7 +175,7 @@ artisan iseed users --noindex ## Usage -To generate a seed file for your users table simply call: `\Iseed::generateSeed('users', 'connectionName', 'numOfRows');`. `connectionName` and `numOfRows` are not required arguments. +To generate a seed file for your users table simply call: `\Iseed::generateSeed('users', 'connectionName', 'numOfRows');`. `connectionName` and `numOfRows` are not required arguments. This will create a file inside a `/database/seeds` (`/app/database/seeds` for Laravel 4), with the contents similar to following example: @@ -207,9 +233,9 @@ This will create a file inside a `/database/seeds` (`/app/database/seeds` for La } -This command will also update `/database/seeds/DatabaseSeeder.php` (`/app/database/seeds/DatabaseSeeder.php` for Laravel 4) to include a call to this newly generated seed class. +This command will also update `/database/seeds/DatabaseSeeder.php` (`/app/database/seeds/DatabaseSeeder.php` for Laravel 4) to include a call to this newly generated seed class. -If you wish you can define custom iSeed template in which all the calls will be placed. You can do this by using `#iseed_start` and `#iseed_end` templates anywhere within `/database/seeds/DatabaseSeeder.php` (`/app/database/seeds/DatabaseSeeder.php` for Laravel 4), for example: +If you wish you can define custom iSeed template in which all the calls will be placed. You can do this by using `#iseed_start` and `#iseed_end` templates anywhere within `/database/seeds/DatabaseSeeder.php` (`/app/database/seeds/DatabaseSeeder.php` for Laravel 4), for example: repackSeedData($data); // Generate class name - $className = $this->generateClassName($table); + $className = $this->generateClassName($table, $prefix, $suffix); // Get template for a seed file contents $stub = $this->readStubFile($this->getStubPath() . '/seed.stub'); @@ -184,16 +186,18 @@ public function hasTable($table) /** * Generates a seed class name (also used as a filename) * @param string $table + * @param string $prefix + * @param string $suffix * @return string */ - public function generateClassName($table) + public function generateClassName($table, $prefix=null, $suffix=null) { $tableString = ''; $tableName = explode('_', $table); foreach ($tableName as $tableNameExploded) { $tableString .= ucfirst($tableNameExploded); } - return ucfirst($tableString) . 'TableSeeder'; + return ($prefix ? $prefix : '') . ucfirst($tableString) . 'Table' . ($suffix ? $suffix : '') . 'Seeder'; } /** diff --git a/src/Orangehill/Iseed/IseedCommand.php b/src/Orangehill/Iseed/IseedCommand.php index 4864ee5..e635e05 100755 --- a/src/Orangehill/Iseed/IseedCommand.php +++ b/src/Orangehill/Iseed/IseedCommand.php @@ -63,6 +63,8 @@ public function fire() $indexed = !$this->option('noindex'); $orderBy = $this->option('orderby'); $direction = $this->option('direction'); + $prefix = $this->option('classnameprefix'); + $suffix = $this->option('classnamesuffix'); if ($chunkSize < 1) { $chunkSize = null; @@ -82,13 +84,15 @@ public function fire() $tableIncrement++; // generate file and class name based on name of the table - list($fileName, $className) = $this->generateFileName($table); + list($fileName, $className) = $this->generateFileName($table, $prefix, $suffix); // if file does not exist or force option is turned on generate seeder if (!\File::exists($fileName) || $this->option('force')) { $this->printResult( app('iseed')->generateSeed( $table, + $prefix, + $suffix, $this->option('database'), $chunkSize, $exclude, @@ -109,6 +113,8 @@ public function fire() $this->printResult( app('iseed')->generateSeed( $table, + $prefix, + $suffix, $this->option('database'), $chunkSize, $exclude, @@ -156,6 +162,8 @@ protected function getOptions() array('noindex', null, InputOption::VALUE_NONE, 'no indexing in the seed', null), array('orderby', null, InputOption::VALUE_OPTIONAL, 'orderby desc by column', null), array('direction', null, InputOption::VALUE_OPTIONAL, 'orderby direction', null), + array('classnameprefix', null, InputOption::VALUE_OPTIONAL, 'prefix for class and file name', null), + array('classnamesuffix', null, InputOption::VALUE_OPTIONAL, 'suffix for class and file name', null), ); } @@ -182,14 +190,14 @@ protected function printResult($successful, $table) * @param string $table * @return string */ - protected function generateFileName($table) + protected function generateFileName($table, $prefix=null, $suffix=null) { if (!\Schema::connection($this->option('database') ? $this->option('database') : config('database.default'))->hasTable($table)) { throw new TableNotFoundException("Table $table was not found."); } // Generate class name and file name - $className = app('iseed')->generateClassName($table); + $className = app('iseed')->generateClassName($table, $prefix, $suffix); $seedPath = base_path() . config('iseed::config.path'); return [$seedPath . '/' . $className . '.php', $className . '.php']; } diff --git a/tests/IseedTest.php b/tests/IseedTest.php index 90674cf..6cf017b 100644 --- a/tests/IseedTest.php +++ b/tests/IseedTest.php @@ -2102,7 +2102,7 @@ public function testTableNotFoundException() { $hasTable = m::mock('Orangehill\Iseed\Iseed[hasTable]')->makePartial(); $hasTable->shouldReceive('hasTable')->once()->andReturn(false); - $hasTable->generateSeed('nonexisting', 'database', 'numOfRows'); + $hasTable->generateSeed('nonexisting', null, null, 'database', 'numOfRows'); } public function testRepacksSeedData() @@ -2150,6 +2150,6 @@ public function testCanGenerateSeed() $mocked->shouldReceive('populateStub')->once()->andReturn('populatedStub'); $mocked->shouldReceive('updateDatabaseSeederRunMethod')->once()->with('ClassName')->andReturn(true); $composer->shouldReceive('dumpAutoloads')->once(); - $mocked->generateSeed('tablename', 'database', 'numOfRows'); + $mocked->generateSeed('tablename', null, null, 'database', 'numOfRows'); } } From b166c1c12118b7e553222e374715f60d0f87f604 Mon Sep 17 00:00:00 2001 From: Tihomir Opacic Date: Mon, 1 Oct 2018 09:59:18 +0200 Subject: [PATCH 7/9] Corrected the wording. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d078552..19dbb50 100755 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ php artisan iseed my_table,another_table ### classnameprefix & classnamesuffix Optionally specify a prefix or suffix for the Seeder class name and file name. -This is useful if you want to create an additional seed for a table that has an existing seed without overwriting the existing. +This is useful if you want to create an additional seed for a table that has an existing seed without overwriting the existing one. Examples: From 540baadac692ed54049a8472c6ede45cde9a0e4e Mon Sep 17 00:00:00 2001 From: Patrik Sadaic Date: Thu, 6 Dec 2018 15:02:16 +0100 Subject: [PATCH 8/9] add chunksize option --- README.md | 8 ++++++++ src/Orangehill/Iseed/Iseed.php | 5 +++-- src/Orangehill/Iseed/IseedCommand.php | 10 +++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 19dbb50..8d9b4fe 100755 --- a/README.md +++ b/README.md @@ -119,6 +119,14 @@ Example: artisan iseed users --max=10 ``` +### chunksize +Optional parameter which defines the size of data chunks for each insert query. + +Example: +``` +artisan iseed users --chunksize=100 +``` + ### exclude Optional parameter which accepts comma separated list of columns that you'd like to exclude from tables that are being exported. In case of multiple tables, exclusion will be applied to all of them. diff --git a/src/Orangehill/Iseed/Iseed.php b/src/Orangehill/Iseed/Iseed.php index 4ac8f7c..26eb5c9 100644 --- a/src/Orangehill/Iseed/Iseed.php +++ b/src/Orangehill/Iseed/Iseed.php @@ -61,7 +61,7 @@ public function readStubFile($file) * @return bool * @throws Orangehill\Iseed\TableNotFoundException */ - public function generateSeed($table, $prefix=null, $suffix=null, $database = null, $max = 0, $exclude = null, $prerunEvent = null, $postrunEvent = null, $dumpAuto = true, $indexed = true, $orderBy = null, $direction = 'ASC') + public function generateSeed($table, $prefix=null, $suffix=null, $database = null, $max = 0, $chunkSize = 0, $exclude = null, $prerunEvent = null, $postrunEvent = null, $dumpAuto = true, $indexed = true, $orderBy = null, $direction = 'ASC') { if (!$database) { $database = config('database.default'); @@ -98,7 +98,7 @@ public function generateSeed($table, $prefix=null, $suffix=null, $database = nul $stub, $table, $dataArray, - null, + $chunkSize, $prerunEvent, $postrunEvent, $indexed @@ -223,6 +223,7 @@ public function getStubPath() public function populateStub($class, $stub, $table, $data, $chunkSize = null, $prerunEvent = null, $postrunEvent = null, $indexed = true) { $chunkSize = $chunkSize ?: config('iseed::config.chunk_size'); + $inserts = ''; $chunks = array_chunk($data, $chunkSize); foreach ($chunks as $chunk) { diff --git a/src/Orangehill/Iseed/IseedCommand.php b/src/Orangehill/Iseed/IseedCommand.php index e635e05..58517ec 100755 --- a/src/Orangehill/Iseed/IseedCommand.php +++ b/src/Orangehill/Iseed/IseedCommand.php @@ -55,7 +55,8 @@ public function fire() } $tables = explode(",", $this->argument('tables')); - $chunkSize = intval($this->option('max')); + $max = intval($this->option('max')); + $chunkSize = intval($this->option('chunksize')); $exclude = explode(",", $this->option('exclude')); $prerunEvents = explode(",", $this->option('prerun')); $postrunEvents = explode(",", $this->option('postrun')); @@ -66,6 +67,10 @@ public function fire() $prefix = $this->option('classnameprefix'); $suffix = $this->option('classnamesuffix'); + if ($max < 1) { + $max = null; + } + if ($chunkSize < 1) { $chunkSize = null; } @@ -94,6 +99,7 @@ public function fire() $prefix, $suffix, $this->option('database'), + $max, $chunkSize, $exclude, $prerunEvent, @@ -116,6 +122,7 @@ public function fire() $prefix, $suffix, $this->option('database'), + $max, $chunkSize, $exclude, $prerunEvent, @@ -155,6 +162,7 @@ protected function getOptions() array('force', null, InputOption::VALUE_NONE, 'force overwrite of all existing seed classes', null), array('database', null, InputOption::VALUE_OPTIONAL, 'database connection', \Config::get('database.default')), array('max', null, InputOption::VALUE_OPTIONAL, 'max number of rows', null), + array('chunksize', null, InputOption::VALUE_OPTIONAL, 'size of data chunks for each insert query', null), array('exclude', null, InputOption::VALUE_OPTIONAL, 'exclude columns', null), array('prerun', null, InputOption::VALUE_OPTIONAL, 'prerun event name', null), array('postrun', null, InputOption::VALUE_OPTIONAL, 'postrun event name', null), From 6cba6fb9719d20c0c4fcfccb14fc9e45d1112e7c Mon Sep 17 00:00:00 2001 From: Giovanni Pires da Silva Date: Thu, 7 Feb 2019 15:00:15 -0200 Subject: [PATCH 9/9] Update README.md - Shorten installation instructions - Prefer composer require instead of composer update - Prefer not require from dev-master (it'll use the releases) - Prettier php scripts (colors) - Fix missing php word at artisan scripts --- README.md | 214 ++++++++++++++++++++++++++---------------------------- 1 file changed, 103 insertions(+), 111 deletions(-) diff --git a/README.md b/README.md index 8d9b4fe..9ed0e60 100755 --- a/README.md +++ b/README.md @@ -6,38 +6,27 @@ ## Installation -1) Add `orangehill/iseed` to your composer file. - -#### Laravel 5 -For Laravel 5 installation edit your project's `composer.json` file to require `orangehill/iseed`. - - "require": { - "orangehill/iseed": "dev-master" - } +### 1. Require with [Composer](https://getcomposer.org/) +```sh +composer require orangehill/iseed +``` -#### Laravel 5 versions less than 5.3.8 -For Laravel 5 versions that are less than 5.3.8 edit your project's `composer.json` file to require `2.2` version: +**Laravel 5.3.7 and below** or **Laravel 4** need specific version - "require": { - "orangehill/iseed": "2.2" - } +```sh +composer require orangehill/iseed:2.2 # Laravel 5.3.7 and below +composer require orangehill/iseed:1.1 # Laravel 4 +``` -#### Laravel 4 -If you wish to install it on Laravel 4 you should require `1.1` version: +### 2. Add Service Provider (Laravel 5.4 and below) - "require": { - "orangehill/iseed": "1.1" - } +Latest Laravel versions have auto dicovery and automatically add service provider - if you're using 5.4.x and below, remember to add it to `providers` array at `/app/config/app.php`: -2) Update Composer from the CLI: -``` - composer update -``` -#### Laravel 5 versions less than 5.5 -3) Add the service provider by opening a `app/config/app.php` file, and adding a new item to the `providers` array. -``` - Orangehill\Iseed\IseedServiceProvider::class +```php +// ... +Orangehill\Iseed\IseedServiceProvider::class, ``` + ## Artisan command options ### [table_name] @@ -116,7 +105,7 @@ Optional parameter which defines the maximum number of entries seeded from a spe Example: ``` -artisan iseed users --max=10 +php artisan iseed users --max=10 ``` ### chunksize @@ -124,7 +113,7 @@ Optional parameter which defines the size of data chunks for each insert query. Example: ``` -artisan iseed users --chunksize=100 +php artisan iseed users --chunksize=100 ``` ### exclude @@ -132,8 +121,8 @@ Optional parameter which accepts comma separated list of columns that you'd like Example: ``` -artisan iseed users --exclude=id -artisan iseed users --exclude=id,created_at,updated_at +php artisan iseed users --exclude=id +php artisan iseed users --exclude=id,created_at,updated_at ``` ### prerun @@ -143,15 +132,15 @@ You can assign multiple preruns for multiple table names by passing an array of Example: The following command will make a seed file which will fire an event named 'someEvent' before seeding takes place. ``` -artisan iseed users --prerun=someEvent +php artisan iseed users --prerun=someEvent ``` The following example will assign `someUserEvent` to `users` table seed, and `someGroupEvent` to `groups` table seed, to be executed before seeding. ``` -artisan iseed users,groups --prerun=someUserEvent,someGroupEvent +php artisan iseed users,groups --prerun=someUserEvent,someGroupEvent ``` The following example will only assign a `someGroupEvent` to `groups` table seed, to be executed before seeding. Value for the users table prerun was omitted here, so `users` table seed will have no prerun event assigned. ``` -artisan iseed users,groups --prerun=,someGroupEvent +php artisan iseed users,groups --prerun=,someGroupEvent ``` ### postrun @@ -161,15 +150,15 @@ You can assign multiple postruns for multiple table names by passing an array of Example: The following command will make a seed file which will fire an event named 'someEvent' after seeding was completed. ``` -artisan iseed users --postrun=someEvent +php artisan iseed users --postrun=someEvent ``` The following example will assign `someUserEvent` to `users` table seed, and `someGroupEvent` to `groups` table seed, to be executed after seeding. ``` -artisan iseed users,groups --postrun=someUserEvent,someGroupEvent +php artisan iseed users,groups --postrun=someUserEvent,someGroupEvent ``` The following example will only assign a `someGroupEvent` to `groups` table seed, to be executed after seeding. Value for the users table postrun was omitted here, so `users` table seed will have no postrun event assigned. ``` -artisan iseed users,groups --postrun=,someGroupEvent +php artisan iseed users,groups --postrun=,someGroupEvent ``` ### noindex @@ -178,7 +167,7 @@ The use case for this feature is when you need to merge two seed files. Example: ``` -artisan iseed users --noindex +php artisan iseed users --noindex ``` ## Usage @@ -187,91 +176,95 @@ To generate a seed file for your users table simply call: `\Iseed::generateSeed( This will create a file inside a `/database/seeds` (`/app/database/seeds` for Laravel 4), with the contents similar to following example: - truncate(); - \DB::table('users')->insert(array ( - 0 => - array ( - 'id' => '1', - 'email' => 'admin@admin.com', - 'password' => '$2y$10$tUGCkQf/0NY3w1l9sobGsudt6UngnoVXx/lUoh9ElcSOD0ERRkK9C', - 'permissions' => NULL, - 'activated' => '1', - 'activation_code' => NULL, - 'activated_at' => NULL, - 'last_login' => NULL, - 'persist_code' => NULL, - 'reset_password_code' => NULL, - 'first_name' => NULL, - 'last_name' => NULL, - 'created_at' => '2013-06-11 07:47:40', - 'updated_at' => '2013-06-11 07:47:40', - ), - 1 => - array ( - 'id' => '2', - 'email' => 'user@user.com', - 'password' => '$2y$10$ImNvsMzK/BOgNSYgpjs/3OjMKMHeA9BH/hjl43EiuBuLkZGPMuZ2W', - 'permissions' => NULL, - 'activated' => '1', - 'activation_code' => NULL, - 'activated_at' => NULL, - 'last_login' => '2013-06-11 07:54:57', - 'persist_code' => '$2y$10$C0la8WuyqC6AU2TpUwj0I.E3Mrva8A3tuVFWxXN5u7jswRKzsYYHK', - 'reset_password_code' => NULL, - 'first_name' => NULL, - 'last_name' => NULL, - 'created_at' => '2013-06-11 07:47:40', - 'updated_at' => '2013-06-11 07:54:57', - ), - )); - } - - } +```php +truncate(); + \DB::table('users')->insert(array ( + 0 => + array ( + 'id' => '1', + 'email' => 'admin@admin.com', + 'password' => '$2y$10$tUGCkQf/0NY3w1l9sobGsudt6UngnoVXx/lUoh9ElcSOD0ERRkK9C', + 'permissions' => NULL, + 'activated' => '1', + 'activation_code' => NULL, + 'activated_at' => NULL, + 'last_login' => NULL, + 'persist_code' => NULL, + 'reset_password_code' => NULL, + 'first_name' => NULL, + 'last_name' => NULL, + 'created_at' => '2013-06-11 07:47:40', + 'updated_at' => '2013-06-11 07:47:40', + ), + 1 => + array ( + 'id' => '2', + 'email' => 'user@user.com', + 'password' => '$2y$10$ImNvsMzK/BOgNSYgpjs/3OjMKMHeA9BH/hjl43EiuBuLkZGPMuZ2W', + 'permissions' => NULL, + 'activated' => '1', + 'activation_code' => NULL, + 'activated_at' => NULL, + 'last_login' => '2013-06-11 07:54:57', + 'persist_code' => '$2y$10$C0la8WuyqC6AU2TpUwj0I.E3Mrva8A3tuVFWxXN5u7jswRKzsYYHK', + 'reset_password_code' => NULL, + 'first_name' => NULL, + 'last_name' => NULL, + 'created_at' => '2013-06-11 07:47:40', + 'updated_at' => '2013-06-11 07:54:57', + ), + )); + } + +} +``` This command will also update `/database/seeds/DatabaseSeeder.php` (`/app/database/seeds/DatabaseSeeder.php` for Laravel 4) to include a call to this newly generated seed class. If you wish you can define custom iSeed template in which all the calls will be placed. You can do this by using `#iseed_start` and `#iseed_end` templates anywhere within `/database/seeds/DatabaseSeeder.php` (`/app/database/seeds/DatabaseSeeder.php` for Laravel 4), for example: - 500 // Maximum number of rows per insert statement -