This is my first ever comment. What you do here is absolute game changer practical knowledge, that you are giving to us for free! These topics Are really great and I have never seen them before. Thank you!!
To know the path doesn't mean to go through the path. And 12 years of experience Gio has will not bestow upon me on the 4th day of watching these tutorials. I am in maternity leave since 2015 and have read a lot, need some tasks. A bit overwhelmed to read in the Linkedin that Gio was consulting on Java, PHP and C++ at the same time in college. Great channel.
Great lesson again, Gio. Some minor points about the github repo of this lesson... 1. I had to puzzle somewhat to get the github code (branch 3.14) started since when I started it broke on the InvoiceService class, that still calls the now non-existing EmailService->send method. I see that in branch 3.15 the InvoiceService class is removed, solving the break there. But just taking the github branch and goint to localhost:8000 was a bit confusing at the start and it took me some time to find out where it what to do. In the end just commenting the line was sufficient, since it was not really part of this lesson. 2. As of the previous lesson the .env-example file no longer is complete, since MAILER_DSN was added to the environment variables. 3. Perhaps it would be nice, when you add tables or table contents as a startposition, to add the sql for that somewhere, so the student that want to follow the examples can be sure about having a secure starting position? I have taken the result from you screen, and got it working, but having an exact reference for comparison be nice. Al in all, just some minor points, that are solvable for students that have followed you so far. But you tend to be complete in your material, so I thought to give it back. You don't say it here, but I found out that when you start this script "in the terminal" that you mean a bash terminal in a docker app? container. When I went there it seemed to work, but it wasn't my first try to get there. Normally I just use git bash for commands, but of course that doesn't work when you need a db connection using host=db. Ah well, so we learn. 🙂 Thanks again
Thank you & thanks for the feedback, I'll keep that in mind for future for sure. For the project that we are working on now branches are a lot more organized & SQL in form of migrations are included as well.
Thank you so much, I am still in the first section and I will continue to watch your playlist and the whole practice, I hope there is a greater part of practical examples to do so that more is understood♥️🙏🏻
Hi Gio, I'm back here. So glad I have this to watch again. But I have a question. I would like to create a record on a table at specific times of the day throughout everyday. Would you recommend using crontab or are there perhaps are other more efficient ways? Thanks in anticipation
I absolutely enjoyed this. It's incredible that you showed us this. I had fun with it as I created the database and now found a way to access my database from my text/code editor. Thanks alot for this Gio
Just in case you wonder how the CRON container could read the script file in the PHP container, the CRON container actually had a copy of those files when he created the volumes for this container, as you can see at 14:28.
This would've been such a CRONic pain trying to figure out without Gio. I did have a slight issue with imports because this project has Email model and uses Email class from Symfony\Component\Mime\Email but I got it to work in the end.
Another question: Many developers recommend not storing JSON in database, what do you think about that? Is it better to store (from) and (to) in their own columns ?? Thank you😊
You could use it yea. As for json it depends on the app & what exactly you are storing in json. I store stuff in json all the time without issues, if you do a lot of selects & filtering around those columns then json may not be most efficient, if it's some metadata that you don't access frequently then I don't see an issue with storing it in json. If your from & to are dates or address then no I would store them separately and not in json
Hey, could be due to different reasons. I would need to see the code to help troubleshoot. Send me a DM on X (Twitter) with GitHub link of ur code and I can check
Do you get any errors? DM me on Twitter and I'll try to help you troubleshoot it. Please upload your code to GitHub and share link. Also share the contents of crontab or however you set up the cron
Are you on Windows? Cron is for linux so if you are Windows you either need to use Docker or WSL. Otherwise I think Windows has scheduled tasks, though I have never set it up on Windows so not sure.
Cron is not a PHP thing so it should. Now the script that Cron runs may or may not work in older PHP versions depending on which version that script was written in but the cron itself is tool for Unix