| 
									
										
										
										
											2022-03-06 02:02:12 +11:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Database\Seeders; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | use Carbon\Carbon; | 
					
						
							|  |  |  | use Illuminate\Database\Seeder; | 
					
						
							|  |  |  | use Illuminate\Support\Facades\DB; | 
					
						
							|  |  |  | use Illuminate\Support\Str; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class DomainsSeeder extends Seeder | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     public function run() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $id1 = Str::random(8); | 
					
						
							|  |  |  |         $id2 = Str::random(8); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $domains = [ | 
					
						
							|  |  |  |             [ | 
					
						
							|  |  |  |                 "id" => $id1, | 
					
						
							|  |  |  |                 "domain" => "node", | 
					
						
							|  |  |  |                 "extension" => "ai", | 
					
						
							|  |  |  |                 "provider_id" => 59, | 
					
						
							|  |  |  |                 "owned_since" => '2013-01-12', | 
					
						
							| 
									
										
										
										
											2022-03-06 02:58:25 +11:00
										 |  |  |                 "created_at" => Carbon::now() | 
					
						
							| 
									
										
										
										
											2022-03-06 02:02:12 +11:00
										 |  |  |             ], | 
					
						
							|  |  |  |             [ | 
					
						
							|  |  |  |                 "id" => $id2, | 
					
						
							|  |  |  |                 "domain" => "cpu", | 
					
						
							|  |  |  |                 "extension" => "club", | 
					
						
							|  |  |  |                 "provider_id" => 59, | 
					
						
							|  |  |  |                 "owned_since" => '2016-04-25', | 
					
						
							| 
									
										
										
										
											2022-03-06 02:58:25 +11:00
										 |  |  |                 "created_at" => Carbon::now() | 
					
						
							| 
									
										
										
										
											2022-03-06 02:02:12 +11:00
										 |  |  |             ] | 
					
						
							|  |  |  |         ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         DB::table('domains')->insert($domains); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $pricing = [ | 
					
						
							|  |  |  |             [ | 
					
						
							|  |  |  |                 "service_id" => $id1, | 
					
						
							|  |  |  |                 "service_type" => 4, | 
					
						
							|  |  |  |                 "currency" => "USD", | 
					
						
							|  |  |  |                 "price" => 9.99, | 
					
						
							|  |  |  |                 "term" => 4, | 
					
						
							|  |  |  |                 "as_usd" => 9.99, | 
					
						
							|  |  |  |                 "usd_per_month" => 0.83, | 
					
						
							|  |  |  |                 "next_due_date" => Carbon::now()->addDays(30)->format('Y-m-d'), | 
					
						
							|  |  |  |                 "created_at" => Carbon::now() | 
					
						
							|  |  |  |             ], | 
					
						
							|  |  |  |             [ | 
					
						
							|  |  |  |                 "service_id" => $id2, | 
					
						
							|  |  |  |                 "service_type" => 4, | 
					
						
							|  |  |  |                 "currency" => "USD", | 
					
						
							|  |  |  |                 "price" => 9.99, | 
					
						
							|  |  |  |                 "term" => 4, | 
					
						
							|  |  |  |                 "as_usd" => 9.99, | 
					
						
							|  |  |  |                 "usd_per_month" => 0.83, | 
					
						
							|  |  |  |                 "next_due_date" => Carbon::now()->addDays(30)->format('Y-m-d'), | 
					
						
							|  |  |  |                 "created_at" => Carbon::now() | 
					
						
							|  |  |  |             ], | 
					
						
							|  |  |  |         ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         DB::table('pricings')->insert($pricing); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |