database/seeds/UserGroupSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        if (UserGroup::count() == 0) {
    		$data = [
		    			[
				        'name' 			=> 'Super User',
				        'slug' 			=> 'Super-User',
				        'description' 	=> 'Super Admin Access Configuration'
				    	],
				    	[
				        'name' 			=> 'Tenderer',
				        'slug' 			=> 'Tenderer',
				        'description' 	=> 'Tenderer description'
				    	],
				    	[
				        'name' 			=> 'Bidder',
				        'slug' 			=> 'Bidder',
				        'description' 	=> 'Bidder description'
				    	],
    				];
		    UserGroup::insert($data);
		}else{
			echo '*user_groups* Table Already has Data\n';
		}
    }
public function run ( ) { if ( UserGroup :: count ( ) == 0 ) { $ data = [ [ 'name' => 'Super User' , 'slug' => 'Super-User' , 'description' => 'Super Admin Access Configuration' ] , [ 'name' => 'Tenderer' , 'slug' => 'Tenderer' , 'description' => 'Tenderer description' ] , [ 'name' => 'Bidder' , 'slug' => 'Bidder' , 'description' => 'Bidder description' ] , ] ; UserGroup :: insert ( $ data ) ; } else { echo '*user_groups* Table Already has Data\n' ; } }
Run the database seeds.
Run the database seeds .