Viewing file: UserPlanSeeder.php (3.21 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Database\Seeders;
use App\Models\UserPlan; use Illuminate\Database\Seeder; use Illuminate\Support\Carbon; use DB;
class UserPlanSeeder extends Seeder { public function run() { $data = [ [ 'user_id' => 2, 'plan_id' => 2, 'start_date' => Carbon::now(), 'expired_date' => Carbon::now()->addMonth(), 'is_current' => 'yes', 'payment_method' => 'Credit Card', 'other_info' => 'Initial subscription via Stripe', 'transaction_id' => 'TXN123456789', 'cost' => 5, 'recurring_type' => 'monthly', 'table_limit' => 5, 'restaurant_limit' => 1, 'item_limit' => 10, 'status' => 'approved', 'item_unlimited' => 'no', 'restaurant_unlimited' => 'no', 'table_unlimited' => 'no', 'subscription_id' => 'sub_001_stripe', 'payment_type' => 'stripe', 'pos_system' => 'no', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ], [ 'user_id' => 3, 'plan_id' => 2, 'start_date' => Carbon::now(), 'expired_date' => Carbon::now()->addMonth(), 'is_current' => 'yes', 'payment_method' => 'Credit Card', 'other_info' => 'Initial subscription via Stripe', 'transaction_id' => 'TXN123456789', 'cost' => 5, 'recurring_type' => 'monthly', 'table_limit' => 5, 'restaurant_limit' => 1, 'item_limit' => 10, 'status' => 'approved', 'item_unlimited' => 'no', 'restaurant_unlimited' => 'no', 'table_unlimited' => 'no', 'subscription_id' => 'sub_001_stripe', 'payment_type' => 'stripe', 'pos_system' => 'no', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ], [ 'user_id' => 4, 'plan_id' => 2, 'start_date' => Carbon::now(), 'expired_date' => Carbon::now()->addMonth(), 'is_current' => 'yes', 'payment_method' => 'Credit Card', 'other_info' => 'Initial subscription via Stripe', 'transaction_id' => 'TXN123456789', 'cost' => 5, 'recurring_type' => 'monthly', 'table_limit' => 5, 'restaurant_limit' => 1, 'item_limit' => 10, 'status' => 'approved', 'item_unlimited' => 'no', 'restaurant_unlimited' => 'no', 'table_unlimited' => 'no', 'subscription_id' => 'sub_001_stripe', 'payment_type' => 'stripe', 'pos_system' => 'no', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ], ]; UserPlan::insert($data); } }
|