Closed elviskc091 closed 3 years ago
https://github.com/alijumaan/Laravel-Ecommerce/blob/4b88d4b63f121e0dc837a8518f39df93f86d22d1/app/Http/Controllers/Backend/CouponsController.php#L52
Try to maintain consistency through out your controller and everything in general.
Here you are using $coupon->save() While in other controllers like PageController update method you are using $page->update($request->all());
By the way avoid using $request->all() for security reasons. :)
So in the end have something like $coupon->update($request->only('foo', 'bar'));
Done
https://github.com/alijumaan/Laravel-Ecommerce/blob/4b88d4b63f121e0dc837a8518f39df93f86d22d1/app/Http/Controllers/Backend/CouponsController.php#L52
Try to maintain consistency through out your controller and everything in general.
Here you are using $coupon->save() While in other controllers like PageController update method you are using $page->update($request->all());
By the way avoid using $request->all() for security reasons. :)
So in the end have something like $coupon->update($request->only('foo', 'bar'));