PHP Reddit – Telegram
PHP Reddit
34 subscribers
291 photos
37 videos
24.9K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Where to host a simple php website?

I developed a simple personal website that has blog section and people can comment. For database I used sqlite to store comments. I plan to buy domain from namecheap, but what about hosting? I don't need anything fancy a cpanel with ftp connection will suffice.

https://redd.it/1khlaix
@r_php
Do you use AI for generating unit Tests and which one?

It seems to be a more difficult task for programmer workflows who do not prefer strictly TDD.

The only tool I get, let's say 30% success rate is Jetbrains AI. Copilot, Tabnine plugins fails more and need permanently rework.

They use private method, try to mock class inherited methods, use deprecated reflections methods or deprecated phpunit features.
I though (according to marketing promises lol) plugins should see the the whole source.

Also generic AI fails mostly when copy paste class into the chat. Even when there is nothing to mock or extended.
It seems they are only able to test getter/setter.

What would you recommend for AI PHP testing support?

Greetings Niko




https://redd.it/1kifl8j
@r_php
What's Your Favourite Architecture in PHP Projects?

I appreciate the ongoing exchanges here – a recent discussion actually inspired the topic for my latest 9th newsletter issue on handling MVP growth. It's good to see these conversations bearing fruit.

Following up on that, I'm diving into event-driven architecture, potentially for my next newsletter. I'm curious what your preferred architecture approach is, assuming I am mostly interested in larger, longer-living SaaS applications that need to scale in the future but can be handled by a simple monolith right now. And if you also use event-driven - what are your specific choices?

In my case, as I get older/more experienced in projects. I tend to treat event-driven architecture as my go-to approach. I combine it with CQRS in almost all cases. I have my opinionated approach to it, where I rarely use real queues and have most of the events work synchronously by default, and just move them to async when needed. I know no architecture fits all needs, and in some cases, I choose other approaches, but still treat the one mentioned before as my go-to standard.

https://redd.it/1kiezn0
@r_php
Laravel Cloud: Any local ways to optimize/resize uploaded images?

Trying out the new Cloud. Seems nice, so far.

But haven’t been able to find a “local” to optimize/scale user uploaded images.

I tried with the spatie laravel image optimizer package, but nothing. I guess none of the packages it uses, is available on the Laravel Cloud instance.

Is there no way, other than using an external service through an API to resize my images, like Tinify?

Clarification: I already use the bucket in Laravel Cloud. Users upload usually 5mb from their camera roll. After OpenAI is done with OCR processing, I’d like to resize it to <1mb and just store that, for future reference, instead of 5mb.

https://redd.it/1kimud9
@r_php
Advantage Database Server

I have a website primarily coded in PHP on an Ubuntu server and we were hoping to get data from an Advantage Database Server which is on a Windows Server. We're running PHP 8.3 currently. The closest thing I could find is the SAP SQL Anywhere PHP Module (The SAP SQL Anywhere PHP Module | SAP Help Portal). Is anyone else able to get this to work?

https://redd.it/1kipyk7
@r_php
Does Laravel Cloud offer API?

Just like Laravel Forge- can I create resources via API? I would like to use it to manage my clients' instances (it's impossible to manage such volume manually).

I did not find anything in official docs which seems strange to me. Maybe I'm naive but I would expect at least the same feature parity when releasing another tool from the same company that created Forge.

https://redd.it/1kiptpr
@r_php
Am I wrong to combine c# with my XAMPP backend?

I apologize if this is a dumb question and I truthfully searched to see if this had been asked.

I developing a Windows desktop application that requires an authentication system. The data is on an Apache server (well, a WAMP/XAMPP) stack for now). I chose this environment because I have limited knowledge on .NET and just need this tool done. All of the backend API's are in PHP. User database is in mySQL.

Is there anything necessarily wrong with what I'm doing? I know how to handle API's and make sure that all the data is secure, such as sending over HTTPS, not storing database information in the application itself, encryption, tokens, brute force etc. I'm specifically referring to the general concept, if this is a "no no". With C# being a MS product, I am sure the standard is to go with ASP.

For anybody that might be wondering why I am now making a Windows application for a PHP web-based application, it's because my application now requires CPU intensive tasks and there is data that I am getting from the desktop itself (GPS).


Thank you.

https://redd.it/1kjeso9
@r_php
What video tutorial should i watch if I'm gonna start php as a beginner?

Should i watch this video?
https://www.youtube.com/watch?v=fw5ObX8P6as&t=30418s&ab_channel=Laracasts

Or this one
https://www.youtube.com/watch?v=l4_Vn-sTBL8&t=34916s&ab_channel=DaniKrossing

I feel like the laracast video are more detailed but it was in October 2023 i think that it was uploaded and the other one is in 2025. Which tutorial would you recommend for a beginner like me to follow? Thank you in advance.

https://redd.it/1kjenrb
@r_php
An upcoming interview need help

So, I have an upcoming interview for Cyber Security Analyst: Code review... And one of the languages they need is PHP. In didn't know anything about PHP but I learnt the basic syntax & currently at a level where I can understand the code & point out the vulnerabilitys. I have tested my skill on random GitHub php codes & chatGPT given examples...

All, I am asking is plz if you have any tips or would like to share any common mistake people make in PHP coding, it would be helpful

https://redd.it/1kk2jcq
@r_php
Weekly /r/Laravel Help Thread

Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:

What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.

For more immediate support, you can ask in the official Laravel Discord.

Thanks and welcome to the r/Laravel community!

https://redd.it/1kk5pqq
@r_php
Weekly Ask Anything Thread

Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.

https://redd.it/1kkiltm
@r_php