skip to Main Content

Limit to at most 3 result laravel

I try to make referral query limit to 3 level of users referral system. The original codes give unlimited level of referrals. public function referralUsers($id, $currentLevel = 1) { $users = $this->getUsers($id); if ($users['status']) { $this->allusers[$currentLevel] = $users['user']; $currentLevel++; $this->referralUsers($users['ids'],…

VIEW QUESTION

event and event listener laravel 11

I can't add constructor in my event listener.Laravel 11 there is no EventService provider also. I need an example for this public function handle(NewUserEvent $event): void { Mail::send('3_Emails.1_CommonMailTemplate', $mailData, function ($message) use ($Name, $Email) { $message->to($Email) ->subject("Contact | $Name") ->cc('[email protected]')…

VIEW QUESTION
Back To Top
Search