Deekshith

Deekshith

Member Since 6 Months Ago

Experience Points 1,380
Experience Level 1

3,620 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 2
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

02 Jul
2 weeks ago

Deekshith started a new conversation Auth Attempt With Or Condition

Hello, I have a login system where admin can login to his account and now i have created agent account who can login using same login route so i want to add or condition in my Auth attempt function which shows below,

Here role_id = 1 is admin and role_id = 4 is Agent, so i want to make this login for both admin and agent

$credentials=[ 'email' => $request->email, 'password' => $request->password, 'role_id' => 1, ];

i tried to change $credentials like below,

$credentials=[ 'email' => $request->email, 'password' => $request->password, 'role_id' => [1,2], ];

and

$credentials=[ 'email' => $request->email, 'password' => $request->password, 'role_id' => collect([1,2]), ];

if(Auth::attempt($credentials)){

  if (Auth::check() && Auth::user()->role == 1) {
    return redirect('/home');
}
else if (Auth::check() && Auth::user()->role == 4) {
    return redirect('/create-vendors');
}
else {
    return redirect('/home');
}

But no use. How can I allow both Agent and admin to get a login to account using the above code?

25 Jun
3 weeks ago

Deekshith left a reply on Regarding Video Integration

how about using JSONP Which dont show XMLHttpRequest?

24 Jun
4 weeks ago

Deekshith left a reply on Regarding Video Integration

@martinbean I did this. my question is suppose my logged in user URL is: https://www.example.com/embed-video/1010 then it is fine. but what if users copy the frame and paste it in website home page: https://www.example.com. it will work becuase vimeo trucate the paramter in url. I have used ajax and used post method to fetch iframe to not displaying in view page source. but they can find iframe code in the netwrok tab.

Deekshith left a reply on Regarding Video Integration

I have domain validation activated. but what if someone changes paste the iframe code in the same domain with nonrestricted URL in the same domain?

Deekshith left a reply on Regarding Video Integration

I am using vimeo pro account is there any option to do that?

Deekshith started a new conversation Regarding Video Integration

Hi guys, I have Vimeo pro account and did all privacy settings to make the video available only for logged in users. what I am doing is when every user logged in to account I am loading the iframe which has domain privacy that means except my domain it will not run anywhere. but still, user can copy that iframe and paste it in the home page of the same domain and can easily watch that video. to prevent this I am trying to ajax post and appending response to id. but still, anyone can view in Network tab in inspect element. I want to hide this iframe response or encrypt. is there any way to do that in ajax jquery? Please reply

Deekshith started a new conversation Regarding Video Iframe Security

Hi guys, I have Vimeo pro account and did all privacy settings to make the video available only for logged in users. what I am doing is when every user logged in to account I am loading the iframe which has domain privacy that means except my domain it will not run anywhere. but still, user can copy that iframe and paste it in the home page of the same domain and can easily watch that video. to prevent this I am trying to ajax post and appending response to id. but still, anyone can view in Network tab in inspect element. I want to hide this iframe response or encrypt. is there any way to do that in ajax jquery? Please reply

17 May
2 months ago

Deekshith left a reply on Undefined Variable: _ENV Error

@MUNAZZIL - This worked. Thank you

Deekshith left a reply on Undefined Variable: _ENV Error

I did but still the same error.

Deekshith left a reply on Undefined Variable: _ENV Error

@munazzil I have some error in controller code and earlier error was displaying in my screen but now for any type of 500 error, it is showing like above.

Deekshith started a new conversation Undefined Variable: _ENV Error

Hi Guys, Whenever there is a syntax error, the error is not displaying in the website instead it is showing like below,

Whoops, looks like something went wrong. (1/1) ErrorException Undefined variable: _ENV

in PrettyPageHandler.php line 231 at HandleExceptions->handleError(8, 'Undefined variable: _ENV', '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php', 231, array('templateFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/views/layout.html.php', 'cssFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/css/whoops.base.css', 'zeptoFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/js/zepto.min.js', 'prettifyFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/js/prettify.min.js', 'clipboard' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/js/clipboard.min.js', 'jsFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/js/whoops.base.js', 'inspector' => object(Inspector), 'frames' => object(FrameCollection), 'code' => 'E_ERROR')) in PrettyPageHandler.php line 231

Any solution? please help me out.

Deekshith started a new conversation Undefined Variable: _ENV Error

Hi Guys, Whenever there is a syntax error, the error is not displaying in the website instead it is showing like below,

Whoops, looks like something went wrong. (1/1) ErrorException Undefined variable: _ENV

in PrettyPageHandler.php line 231 at HandleExceptions->handleError(8, 'Undefined variable: _ENV', '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php', 231, array('templateFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/views/layout.html.php', 'cssFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/css/whoops.base.css', 'zeptoFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/js/zepto.min.js', 'prettifyFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/js/prettify.min.js', 'clipboard' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/js/clipboard.min.js', 'jsFile' => '/home/insig179/public_html/insightsallindia/vendor/filp/whoops/src/Whoops/Handler/../Resources/js/whoops.base.js', 'inspector' => object(Inspector), 'frames' => object(FrameCollection), 'code' => 'E_ERROR')) in PrettyPageHandler.php line 231

Any solution? please help me out.

04 Apr
3 months ago

Deekshith started a new conversation How To Fetch Dynamic Textfield Name Field In Laravel

Hi Guys, I have a form with dynamic input fields like below,

{{ csrf_field() }} @foreach($get_contest_detail->questions as $que)
                    <p>{!! $que->question !!}</p>
                    <textarea rows="4" cols="50" id="question{{$que->id}}" name="question{{$que->id}}" class="form-control" required></textarea>

                

                    @endforeach

                    <input type="submit" class="btn btn-primary btn-sm" value="Submit" />

                </form>

I can submit the form in post controller function I can see all posted form fields like below,

{"_token":"sOryMBs3rQEKpcjgRFQ8eNbDFfrkPVaHaGjDKvBu","question2":"sdfsdfsdf","question3":"sdsdfsdf"}

So now I am trying to fetch above the field in laravel in know how to do that in normal forms like below, $request->question. But how can i fetch dynamic form fields like above? I tried below code but it is not working.

foreach($get_contest_detail->questions as $que) {

        if(is_null($request->question.''.$que->id))
        {
            return back()->withErrors('Please fill all questions.');
        }
        
    }
25 Mar
3 months ago

Deekshith started a new conversation Query Regarding Fetching Data

Hi, I have three tables namely, users,user_membership,user_payment_details, Users have more than 1 user_membership and user_payment_details data. so that relation would be hasmany.

right now I am fetching all users data using below query,

$users = User::select('users.*','chapters.chapter_name as chapter_name','membership_payment_structure.name as fee_name','membership.name as membership_name')->leftJoin('chapters','users.chapter_id','chapters.id') ->leftJoin('membership', 'users.membership_id', 'membership.id') ->leftJoin('membership_payment_structure', 'users.mebership_fee_id','membership_payment_structure.id') ->with(['lastmembership'=>function($query){ $query->select('started_at', 'ended_at','users_id','id'); }])->with(['lastpayment'=>function($query){ $query->where('status','!=','Expired')->select('amount', 'status','user_id','currency','check_no','transaction_id'); }])->orderBy('users.created_at','DESC')->get();

public function lastmembership() { return $this->hasOne('App\UserMembership','users_id','id')->orderBy('id', 'desc'); }

public function lastpayment(){ return $this->hasOne('App\UserPayment')->orderBy('id', 'desc'); }

Above query displays all users. But now I am trying to implement filters for above query and now i want to apply the condition for a user_payment_details table. user_payment_details has status columns where I want to apply where condition.

So i want to display users which match user_payment_details status column. But if i put where condition in "lastpayment" it is displaying all users. Any suggestions?

Deekshith started a new conversation Query Regarding Fetching Data,

Hi, I have three tables namely, users,user_membership,user_payment_details, Users have more than 1 user_membership and user_payment_details data. so that relation would be hasmany.

right now i am fetching all users data using below query,

$users = $users->select('users.*','chapters.chapter_name as chapter_name','membership_payment_structure.name as fee_name','membership.name as membership_name')->leftJoin('chapters','users.chapter_id','chapters.id') ->leftJoin('membership', 'users.membership_id', 'membership.id') ->leftJoin('membership_payment_structure', 'users.mebership_fee_id','membership_payment_structure.id') ->with(['lastmembership'=>function($query){ $query->select('started_at', 'ended_at','users_id','id'); }])->with(['lastpayment'=>function($query){ $query->where('status','!=','Expired')->select('amount', 'status','user_id','currency','check_no','transaction_id'); }])->orderBy('users.created_at','DESC')->paginate(20);

public function lastmembership(){ return $this->hasOne('App\UserMembership','users_id','id')->orderBy('id', 'desc'); }

public function lastpayment(){
  return $this->hasOne('App\UserPayment')->orderBy('id', 'desc');
}

Above query displays all users. But now i am trying to implement filters for above query and now i want to apply the condition for user_payment_details table. user_payment_details has status columns where I want to apply where condition.

So i want to display users which match user_payment_details status column. But if i put where condition in "lastpayment" it is displaying all users. Any suggestions?

08 Mar
4 months ago

Deekshith started a new conversation How To Write Custom Redirect Path After Logout In Default Auth Logincontroller.php

Hi Guys, I have developed role-based login mechanism using laravel Auth. Created 3 middleware namely, Admin, Vendor and Customer and written custom redirect rule in LoginController.php file like below,

protected function redirectTo( ) {

if (Auth::check() && Auth::user()->role == 3) {
    return '/customerhome';
}
elseif (Auth::check() && Auth::user()->role == 2) {
    return '/vendorhome';
}
else {
    return '/home';
}

}

Now i can achieve a custom redirect path for every role using above code. But I want to write a custom redirect path for every user after logout. Example: Admin should be redirected to /login after logout Vendor should be redirected to /vendorlogin after logout

i am using below function in LoginController.php

public function logout(Request $request) {

$this->performLogout($request);
return redirect()->route('your_route');
}

But I am not getting how to match role_id just like in redirectTo function to write custom redirect path login.. Please help me out with this guys.

26 Feb
4 months ago

Deekshith left a reply on Fetch Strtotime Data As Time Format With Am And Pm

@johnbraun this can be done when we use laravel foreach to display data in blade file but i am using angularjs ng-repeat to display data in blade table.

Deekshith started a new conversation Fetch Strtotime Data As Time Format With Am And Pm

Hi, I have a table with the columns start time and end time and it doesn't have any date. I have converted time to strtotime and Stored in a database. Now I want to know how to fetch time record in time format with am and pm using Db raw query or using any other way. Please guide me. I am not storing datetime here just storing time because this time data remains constant for all days. Ex : time: 10:00 AM converted to strtotime and storing in the database. I am using angularjs ng-repeat to display data in blade file.

25 Feb
4 months ago

Deekshith left a reply on Fetch Strtotime Data As Time Format With Am And Pm

@MARTINBEAN - But I am using AngularJS bind to display data using ng-repeat to display time. How can I achieve this in AngularJS ng-bind filter?

Deekshith left a reply on Fetch Strtotime Data As Time Format With Am And Pm

@But I am using AngularJS bind to display data using ng-repeat to display time. How can I achieve this in AngularJS ng-bind filter?

Deekshith left a reply on Fetch Strtotime Data As Time Format With Am And Pm

@MANELGAVALDA - But I am using AngularJS bind to display data using ng-repeat to display time. How can I achieve this in AngularJS ng-bind filter?

Deekshith started a new conversation Fetch Strtotime Data As Time Format With Am And Pm

Hi, I have a table with columns start time and end time and it don't have any date. I have converted time to strtotime and Stored in database. Now I want to know how to fetch time record in time format with am and pm using Db raw query or using any other way. Please guide me. I am not storing datetime here just storing time because this time data remains constant for all days. Ex : time: 10:00 AM converted to strtotime and storing in database.

30 Jan
5 months ago

Deekshith left a reply on Connect SAP Software With PHP

@primordial yes ERP solution. Do have any idea to achieve as documentation is very confusing.

Deekshith started a new conversation Connect SAP Software With PHP

Hi Guys,

I have an SAP software and now I am going to develop a Customer Web Portal in php so that our customers can log-in and see all data relating to their orders which will be pulled from SAP - Order history, Current Order Status, Invoice Details etc. I have some questions.

1). can I connect sap with PHP. if so, how can I do that?

2). if my web application is in third-party hosting provider(Ex: GoDaddy with domain). can I access SAP data even though if it is not in the local server?

3). Is there any way that I can access data using API so that I can directly call that API in PHP and just display that without any extra work?

Please suggest me the easiest way to do this.

Waiting for your reply.

28 Jan
5 months ago

Deekshith started a new conversation Laravel Query

Hi everyone, I have two tables namely, user and user_membership

users table has the following columns:

id,name,email,mobile

the user_membrship table has the following columns:

id,user_id,started_date,ended_date

Now, users renew their membership every year. for example,

user table:

id name email mobile 1 Deekshith [email protected] 8908908908

and user_membership table have following entries,

user_membrship table:

id users_id started_date ended_date 1 1 2017-01-01 2017-12-31 and 1 1 2018-01-01 2018-12-31

now I want to expire all users which membership "ended_date" is lesser than the current date,

In above example user "deekshith" ended_date is expired so I want to get all expired users like the above user in table format. I have tried but I am getting only 2017-12-31 ended_date data instead of 2018-12-31 in the user_membership table.

My code is (Raw query),

SELECT users_membership.started_at,users_membership.ended_at,users.id,users.name FROM users_membership join users on users_membership.users_id = users.id where users_membership.ended_at< '2019-01-25';

But it is displaying an only first entry of the user_membership table for a single user, but I want only last latest entry of the user_membership table for a particular user.

Please help me out.

Deekshith left a reply on Laravel Query

@ahsan Any suggestions? regarding my question?

Deekshith started a new conversation Laravel Query

Hi everyone, I have two tables namely, user and user_membership

users table has the following columns:

id,name,email,mobile

the user_membrship table has the following columns:

id,user_id,started_date,ended_date

Now, users renew their membership every year. for example,

user table:

id name email mobile 1 Deekshith [email protected] 8908908908

and user_membership table have following entries,

user_membrship table:

id users_id started_date ended_date 1 1 2017-01-01 2017-12-31 1 1 2018-01-01 2018-12-31

now I want to expire all users which membership "ended_date" is lesser than the current date,

In above example user "deekshith" ended_date is expired so I want to get all expired users like the above user in table format. I have tried but I am getting only 2017-12-31 ended_date data instead of 2018-12-31 in the user_membership table.

My code is (Raw query),

SELECT users_membership.started_at,users_membership.ended_at,users.id,users.name FROM users_membership join users on users_membership.users_id = users.id where users_membership.ended_at< '2019-01-25';

But it is displaying an only first entry of the user_membership table for a single user, but I want only last latest entry of the user_membership table for a particular user.

Please help me out.

21 Jan
6 months ago

Deekshith left a reply on Sending Bulk Email Using Sendgrid

Thanks for the reply, But in my case I have a blog application once new article posted then it should send bulk email for all registered emails. This is dynamic. I am experiencing some problem in mail queues. It seems your point will be valid if my user database is fixed but what if my user database will be increased? And I am using sendgrid to send emails.

Deekshith left a reply on Laravel Hasmany Relationship Query

Yes it was working but all my concern is time. Sometimes it will not even take 1 sec to complete and it was sending in background. But it suddenly stops to work in background and it is taking more than 2 min to complete the process.

Deekshith left a reply on Laravel Hasmany Relationship Query

This application had been developed using 4.2 version and I have not created any laravel queue, instead I have used Mail:: queue. Initially I am storing all email address in one array then I am converting that array to different chuncks with each Chuck has 1000 email addresses. And I am using forloop to send emails chuncks wise. Please check my previous reply to check my code.

Deekshith left a reply on Laravel Hasmany Relationship Query

i had converted to chunks, so for one loop, it will send for 1000 contacts at once. if I add "to" instead of bcc then every user will have to see other 999 users email address.

Deekshith left a reply on Laravel Hasmany Relationship Query

@vilfago Please help me out with this,

I have a user management application and there are around 15k users registered on our website. and this application has a simple blog module designed using laravel and I want to send email to all registered users once I post any updates in the blog. I am using sendgrid for this, but whenever I tried to send email, it is taking too much time in a loop and sometimes it gives timeout error. is there any way I can achieve this at high speed? and I need to hide all recipients email address. I know by using bcc we can hide all emails but need clarification regarding this.

Here is the sample code:

//converted email array to chunks

$recipient_chunks = array_chunk($email_array, 999);

//loop over user email address

foreach ($recipient_chunks as $user) {

Mail::queue('emails.updates_template',$email_data,function($message) use($email_data,$user) { $message->bcc($user)->subject('Latest Updates'); });

}

Deekshith left a reply on Laravel Hasmany Relationship Query

@vilfago Perfect, Thank you so much.

Deekshith started a new conversation Laravel Hasmany Relationship Query

I have two tables User table and user membership table user membership table consists every year data for a user.

Example: User table

id name 1 Deekshith

User Membership Table:

id user_id started_at ended_at 1 1 2018-01-01 2018-12-31 2 1 2019-01-01 2019-12-31

So it has one to many relation

My question is how to fetch record from user table using laravel Eloquent: Relationships and query should return record from user membership table which has max of id.

please check my query below,

$users = User::where('role_id',2)->with(['membership' => function($query){

$query->where(DB::raw('users_membership.id  IN ( SELECT MAX(id) FROM users_membership GROUP BY users_id )'))
->select('started_at','ended_at'); //you may use any condition here or manual select operation

}])->with(['payment' => function($query){

$query->where(DB::raw('id IN ( SELECT MAX(id) FROM user_payment_details GROUP BY user_id )')) ->select('amount','status'); //you may use any condition here or manual select operation

}])->select('users.email')->get();

But above query returns cardinally violation on mysql query.

i can get expected result in raw mysql query but I want this to be done with the relationship.

so how can I combine below query with user model in a relationship,

SELECT * FROM users_membership WHERE id IN ( SELECT MAX(id) FROM users_membership GROUP BY users_id )

right now i am matching returned id with users table id in html table which is taking too much time to load.

Deekshith left a reply on Sending Bulk Email Using Sendgrid

Hi Tisuchi, Thanks for the reply,

I have used the queue as well and converted email array to chunks to avoid high memory usage, Please check below code.

Here is the sample code:

//converted email array to chunks

$recipient_chunks = array_chunk($email_array, 999);

//loop over a user email address

foreach ($recipient_chunks as $user) {

Mail::queue('emails.updates_template',$email_data,function($message) use($email_data,$user) { $message->bcc($user)->subject('Latest Updates'); });

}

Deekshith started a new conversation Sending Bulk Email Using Sendgrid

Hi Guys, Please help me,

I have a user management application and there are around 15k users registered on our website. and this application has a simple blog module designed using laravel and I want to send email to all registered users once I post any updates in the blog. I am using sendgrid for this, but whenever I tried to send email, it is taking too much time in a loop and sometimes it gives timeout error. is there any way I can achieve this at high speed? and I need to hide all recipients email address. I know by using bcc we can hide all emails but need clarification regarding this.

Here is the sample code:

//converted email array to chunks

$recipient_chunks = array_chunk($email_array, 999);

//loop over user email address

foreach ($recipient_chunks as $user) {

Mail::queue('emails.updates_template',$email_data,function($message) use($email_data,$user) { $message->bcc($user)->subject('Latest Updates'); });

}

18 Jan
6 months ago

Deekshith started a new conversation Sending Bulk Email Using Sendgrid

Hi Guys, Please help me,

I have a user management application and i have around 15k users registered on our website. and we have a simple blog application designed using laravel and I want to send email to all registered users once i post any updates in the blog. I am using sendgrid for this, but whenever I tried to send email, it is taking too much time in a loop and sometimes it gives timeout error. is there any way I can achieve this at high speed? and I need to hide all recipients email address. i know by using bcc we can hide all emails but need clarification regarding this.

Here is the sample code:

//converted email array to chunks

$recipient_chunks = array_chunk($email_array, 999);

//loop over user email address

foreach ($recipient_chunks as $user) {

Mail::queue('emails.updates_template',$email_data,function($message) use($email_data,$user) { $message->bcc($user)->subject('Latest Updates'); });

}

17 Jan
6 months ago

Deekshith started a new conversation Send Bulk Email To All Users Using Sendgrid.

I have a user management application and i have around 15k users registered on our website. and we have a simple blog application designed using laravel and I want to send email to all registered users once i post any updates in the blog. I am using sendgrid for this, but whenever I tried to send email, it is taking too much time in loop and sometimes it gives timeout error. is there any way I can achieve this with high speed? and I need to hide all recipients email address. i know by using bcc we can hide all emails but need clarification regarding this.

Here is the sample code:

//converted email array to chunks $recipient_chunks = array_chunk($email_array, 999);

//loop over user email address foreach ($recipient_chunks as $user) {

Mail::queue('emails.updates_template',$email_data,function($message) use($email_data,$user) { $message->bcc($user)->subject('Latest Updates'); });

}