PHP code example of a7 / seeder

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

    

a7 / seeder example snippets


\A7\Seeder\add_seed( [
	'name'        => 'User Roles',
	'description' => 'Build user roles',
	'callback'    => 'Dev\user_roles',
] );

\A7\Seeder\add_seed( [
	'name'        => 'User Roles',
	'description' => 'Build user roles',
	'callback'    => function() {
		// .. do some logic ..
		
		echo 'Status of logic';
	},
] );


namespace Dev;

function user_roles() {
    // .. do some logic ..
    
    echo 'Status of the logic...';
}