mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 23:13:59 +00:00
Send welcome email with voucher to user upon successful verification of customer email adddress
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class UserRewardResource extends JsonResource
|
||||
@@ -14,6 +15,13 @@ class UserRewardResource extends JsonResource
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
$emailReminder = null;
|
||||
if ($request->has('isAdmin')) {
|
||||
$keyValuePairs = $this->user->attributes()->get();
|
||||
$emailReminder = KeyValueBasicResource::collection($keyValuePairs);
|
||||
$this->voucher->email = $emailReminder;
|
||||
}
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'user_id' => $this->user_id,
|
||||
|
||||
Reference in New Issue
Block a user