|
|
@@ -3,6 +3,7 @@ |
|
|
|
namespace App\Http\Controllers; |
|
|
|
|
|
|
|
use App\Model\Form; |
|
|
|
use App\Model\Product; |
|
|
|
use App\Model\Subscriber; |
|
|
|
use App\Model\WorkOrder; |
|
|
|
use Illuminate\Foundation\Bus\DispatchesJobs; |
|
|
@@ -50,4 +51,37 @@ class Controller extends BaseController |
|
|
|
return 'data inserted '; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function updatePromoPrice() |
|
|
|
{ |
|
|
|
$product = Product::where('formT', 'R')->where('speed', '50')->first(); |
|
|
|
$product->promotion_price = "69"; |
|
|
|
$product->save(); |
|
|
|
|
|
|
|
$product1 = Product::where('formT','R')->where('speed','100')->first(); |
|
|
|
$product1->promotion_price = "89"; |
|
|
|
$product1->save(); |
|
|
|
|
|
|
|
$product2 = Product::where('formT', 'R')->where('speed', '500')->first(); |
|
|
|
$product2->promotion_price = "129"; |
|
|
|
$product2->save(); |
|
|
|
|
|
|
|
$product3 = Product::where('formT', 'B')->where('speed', '50')->first(); |
|
|
|
$product3->promotion_price = "89"; |
|
|
|
$product3->save(); |
|
|
|
|
|
|
|
$product4 = Product::where('formT', 'B')->where('speed', '100')->first(); |
|
|
|
$product4->promotion_price = "119"; |
|
|
|
$product4->save(); |
|
|
|
|
|
|
|
$product5 = Product::where('formT', 'B')->where('speed', '300')->first(); |
|
|
|
$product5->promotion_price = "179"; |
|
|
|
$product5->save(); |
|
|
|
|
|
|
|
$product6 = Product::where('formT', 'B')->where('speed', '500')->first(); |
|
|
|
$product6->promotion_price = "249"; |
|
|
|
$product6->save(); |
|
|
|
|
|
|
|
return 'promo price update'; |
|
|
|
} |
|
|
|
} |