| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function run() |
||
| 14 | { |
||
| 15 | $taxRate = TaxRate::where('title', '=', '21%')->first(); |
||
| 16 | $paymentMethod = new PaymentMethod; |
||
| 17 | |||
| 18 | DB::table($paymentMethod->getTable())->delete(); |
||
| 19 | $shop = Shop::where('title', '=', 'hideyo')->first(); |
||
| 20 | |||
| 21 | $paymentMethod->active = 1; |
||
| 22 | $paymentMethod->title = 'Bank transfer'; |
||
| 23 | $paymentMethod->tax_rate_id = $taxRate->id; |
||
| 24 | $paymentMethod->price = '0'; |
||
| 25 | $paymentMethod->shop_id = $shop->id; |
||
| 26 | $paymentMethod->save(); |
||
| 27 | |||
| 28 | $sendingMethod = SendingMethod::where('title', '=', 'China')->first(); |
||
| 29 | $sendingMethod->relatedPaymentMethods()->sync(array($paymentMethod->id)); |
||
| 30 | |||
| 31 | |||
| 32 | $sendingMethod = SendingMethod::where('title', '=', 'Netherlands')->first(); |
||
| 33 | $sendingMethod->relatedPaymentMethods()->sync(array($paymentMethod->id)); |
||
| 34 | |||
| 39 |