/**
* After new record created
* @param array $record // newly created record
*/
private function afterAdd($record){
//enter statement here
$pupdate = $record['points'];
$userwlpoints = DB::table('users')->where('id', $record['uid'])->pluck('wlpoints');
$totalpoints = $userwlpoints + $pupdate;
DB::table('users')->where('id', $record['uid'])->update(['wlpoints' => $totalpoints]);
}
Hi… Thank you for the awesome tool…
please help me to do onething…
in the Add Page… i want to check user have enough wallet credits to add one record to his list. if he has 0 or lessthan 100 i want to redirect to “wallet update page”(“userwallet.add”), how can i achive this… can you please help me…
Once again thank you.