28 lines
		
	
	
	
		
			591 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			591 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| use Illuminate\Database\Seeder;
 | |
| use Illuminate\Support\Facades\DB;
 | |
| 
 | |
| class DatabaseSeeder extends Seeder
 | |
| {
 | |
| 	const CHUNK_SIZE = 100;
 | |
| 
 | |
|     static function addTimestamps($object) {
 | |
|         $now = DB::raw('CURRENT_TIMESTAMP');
 | |
|         $object['created_at'] = $now;
 | |
|         $object['updated_at'] = $now;
 | |
|         return $object;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Seed the application's database.
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     public function run()
 | |
|     {
 | |
|         $this->call(CanastaSeeder::class);
 | |
|         $this->call(GrupoDeCompraSeeder::class);
 | |
|         $this->call(UserSeeder::class);
 | |
|     }
 | |
| }
 |