Excellent ❤️ , I hope you can explain all topics of laravel real time , Broadcast , events , , , etc and finally end with real time chat with laravel + Tailwind CSS Once again, thank you very much for your great effort
I hope you realise how many comments me and other UA-camrs get, it's very easy in your position to say "man answer to comments". If you do really want my help or others, just join the Discord man, that's my response :)
but how can we use queues in production. we will have to run the command: php artisan queue:work for queue to take effect right. So is there any way to automate this artisan command when a certain condition is met ?
great as usual :D .. I've got a question.. someone said if you want to make a for loop of a HUGE database to search for users whose subscription has ended .. and then send an email to each one of them .. if you do that in a controller (that has the for loop and then dispatching the email jobs) .. you'll get a timeout error .. but if you do that in a "command" instead of a controller it will just work .. so is that correct ? does this php timeout depend on where the task is from "like if it is from the browser or the cli" or it is really different if its in a command class or a controller ?
@@codewithdary thank you Dary, but what if it is a heavy load .. do we get a timeout if we executed it through cli "not through a button on web for example" ? .. and does it make difference if that load is in a command or a controller ?
Controllers are meant for receiving requests from the user and then responding to them. It is expected that these requests be responded to as quickly as possible. Since the client that sent the request is waiting for a response, it has a set time it waits for the response. if no response by end of set time, it throws an error. hence the timeout. For what you are asking, it is likely that the task is not triggered by an end user or client. That task is likely done by an admin or someone else in-house. That should be done on a cli. You don't need to block the enduser thread with heavy tasks that the user has not initiated. Thus makes more sense to use a command than a controller. If the end-user initiates a time consuming task, put it in a queue. The right tool for the right job.
@@codewithdary I found at the error but still couldn't find the fix It's because of the attachment. I'm using fromPath() to access an image from the public folder to send the mail it's working normally but when I use the queue the location is somehow different. Give me a solution for that please
LETS CONNECT THROUGH INSTAGRAM.
instagram.com/codewithdary
Always clear clean and easy to understand. Thank you
You are welcome!
I like how you teach. You show simple examples that can easily be understood.
Thanks buddy!
Perfect match for my requirements, thanks again, Dary.
Lovely Adil!
Very clear and concise. Thank you.
Thank you so much Aseem
thanks for the explanation. it really very easy to understand.
You are welcome!
This video is very helpful for me.
Thank you brother🥰
Welcome 😊
simple and clean this makes me feel supper goooood i love this channel Keep going
thanks alot Dary.
I should be thanking you for watching :)
really thanks!!! you are my hero!!!!
You're welcome!
Nice! Thanks! It's working!
Lovely!!
Excellent ❤️ , I hope you can explain all topics of laravel real time , Broadcast , events , , , etc and finally end with real time chat with laravel + Tailwind CSS Once again, thank you very much for your great effort
We will get there Ahmed! :)
@@codewithdary Thank you bro
thank you, I learned a lot from your video
Glad to hear that Praveen!
Thanks. The best!!
You're welcome Sylvester!
so good, very easy to understand
Thank you so much Nguyen!
Hi, thank you !
How do you handle queues in production ?
I came across the following article and it helped me a lot: laravel-news.com/how-to-run-workers-in-production
@@codewithdary what if i don't want to use forge?
@@asemmuhammad7922 scroll down there also explained how to setup without forge
loved it
Happy to help :)
thanks for the explanation.
but please, I have one Q is the queue:work command can run for just one row in the job table?
yeah.. but how to run it on production ,, since when you close terminal worker is terminated
Dude answer questions on your comments...
Do we have to run "artisan queue:work" on production? If true den how do we automate
I hope you realise how many comments me and other UA-camrs get, it's very easy in your position to say "man answer to comments". If you do really want my help or others, just join the Discord man, that's my response :)
but how can we use queues in production. we will have to run the command: php artisan queue:work for queue to take effect right. So is there any way to automate this artisan command when a certain condition is met ?
+++
Same question here.
great as usual :D ..
I've got a question.. someone said if you want to make a for loop of a HUGE database to search for users whose subscription has ended .. and then send an email to each one of them .. if you do that in a controller (that has the for loop and then dispatching the email jobs) .. you'll get a timeout error .. but if you do that in a "command" instead of a controller it will just work ..
so is that correct ?
does this php timeout depend on where the task is from "like if it is from the browser or the cli" or it is really different if its in a command class or a controller ?
You should change your Eloquent query where you only retrieve users whose subscription has ended, rather than getting them all and loopign over it!
@@codewithdary thank you Dary, but what if it is a heavy load .. do we get a timeout if we executed it through cli "not through a button on web for example" ? .. and does it make difference if that load is in a command or a controller ?
Controllers are meant for receiving requests from the user and then responding to them. It is expected that these requests be responded to as quickly as possible. Since the client that sent the request is waiting for a response, it has a set time it waits for the response. if no response by end of set time, it throws an error. hence the timeout.
For what you are asking, it is likely that the task is not triggered by an end user or client. That task is likely done by an admin or someone else in-house. That should be done on a cli.
You don't need to block the enduser thread with heavy tasks that the user has not initiated. Thus makes more sense to use a command than a controller. If the end-user initiates a time consuming task, put it in a queue.
The right tool for the right job.
What is the number next to time in the terminal and how to rest it? Thanks
thank',, what terminal tools do you use on mac?
I have iTerm 2 installed, really like using it :)
Is there any option in shared hosting to serve queue workers?
For me the queue is getting failed. Kindly help please
Can't help without any code or error.
@@codewithdary I found at the error but still couldn't find the fix
It's because of the attachment.
I'm using fromPath() to access an image from the public folder to send the mail it's working normally but when I use the queue the location is somehow different. Give me a solution for that please
i got fail when run php artisan queue:work
Can't really help if I don't know what you have done, what your queue is, what your error is.
mine always return failed job after excuting the queue work command
please help
ur the best
Thank you Peter!
❤️❤️❤️
❤️
When you will be teaching Graphql then Laravel + Graphql?
I don't have that on my upcoming schedule, sorry.
@@codewithdary can you please make a video on what you have planned for your channel and the list?
✌️