Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

increment laravel

$customer = Customer::find($customer_id);
$loyalty_points = $customer->loyalty_points + 1;
$customer->update(['loyalty_points' => $loyalty_points]);

or

Customer::find($customer_id)->increment('loyalty_points');
Source by laraveldaily.com #
 
PREVIOUS NEXT
Tagged: #increment #laravel
ADD COMMENT
Topic
Name
2+1 =