PHP Reddit – Telegram
PHP Reddit
33 subscribers
293 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
still have to manually edit them most of the time. Laravel, on the other hand, follows a "schema-as-code" approach—each database change is defined in PHP using a structured API. This makes migrations more readable and easier to modify.

# Final Thought: "Magic" in Laravel vs. Symfony

As a Laravel developer, I’ve often heard the criticism that Laravel relies too much on "magic." But after exploring Symfony’s Doctrine ORM and Dependency Injection, I’d say Symfony has its fair share of magic too—it just uses different terminology:

Symfony’s "magic" comes from Reflection API & Autowiring.
Laravel’s "magic" comes from Facades & PHP’s Magic Methods (__call, __get**)**.

So, in terms of "magical behavior," I’d say the score is 1:1. Each framework abstracts complexity in its own way, and it all comes down to preference.

That’s it for today! Next, I’ll be diving deeper into Symfony’s routing and request handling. Let me know if you have any insights or experiences with Doctrine—especially if you’ve transitioned from Laravel like I have!

https://redd.it/1izrt2g
@r_php
Why did you write your own framework?

I'm curious to those who have written their own framework.

1. Do you still use it?

2. What features did it have?

3. What was the advantage of your framework over a more populair option?



I have a sideproject framework, that is used in 4 production applications. It has its own HTTP client. CLI/HTTP router. Fully functional (but slow....) ORM. While project setup and troubleshooting are a breeze, the features that a (professionally) maintained framework offers is unmathed. I'm attempting a rewrite currently, hoping mainly to fix the querybuilder.

https://redd.it/1iztyci
@r_php
Php is really good

I used a lot of language and frameworks -

Ruby on rails
Laravel
Django

But i wanted to build a website from scratch, so i will learn php now. Honestly feels very great. Most of my fav websites use php(custom framework or simple php). It feels fresh again. The best langauge to build websites from small to big. Php + go is what you need and you can build anything.

https://redd.it/1j0368s
@r_php
Shipping with Laravel

Firstly, thank you to everyone who engaged with and saw my “I want to give back” post. I spent some time dumping my brain onto words and coming up with this written post. I’m also super excited about the timing of this and what Laravel Cloud brings to the ecosystem.

I hope this post helps some of you who are trying to ship your applications—whether you’re just starting out or already deep in the trenches. While this is the first, beginner-friendly post, I’ve designed it to be useful across different skill levels and should be updated as time goes on.



Today, I’m happy to share the first look at the written post on Shipping with Laravel:
https://james.buzz/blog/shipping-with-laravel/

TL;DR: My biggest lesson; Things fail all the time. You need to spot these failures quickly and resolve them without breaking anything else.



If you have any suggestions or insights, please share them. And if you think I’ve missed anything or something could be corrected, let me know and I'll check it ASAP.

https://redd.it/1j04201
@r_php
PingCRM with React, Inertia, SSR, Reverb Websockets and i18n

Hello everyone! With all the hype surrounding the release of Laravel 12, I wanted to share an old project that I recently migrated in the style of the recently released starter kits.
I added some crud and a reverb demo.

# What is it?

This is an adaptation of the classic PingCRM demo for, originally created by Jonathan Reinink (original Vue.js version), later ported to React by Lior Rocks (React version).

GitHub: https://github.com/fouteox/pingcrm-react-inertia-laravel

# Why another PingCRM?

I know there are plenty of starter kits out there, but this isn't trying to be one. Instead, it's a comprehensive demonstration of several modern Laravel features working together:

Laravel 12 with [Inertia.js v2](https://inertiajs.com/) and SSR
React 19 with TypeScript
Tailwind v4 with shadcn components
Full internationalization with i18next (EN/FR)
Real-time notifications with Laravel Reverb
Background jobs with Horizon
Task scheduling
High-performance Octane + FrankenPHP setup

# Easy to try

Just install DDEV and run:

git clone https://github.com/fouteox/pingcrm-react-inertia-laravel.git

cd pingcrm-react-inertia-laravel

ddev start && ddev launch

The entire environment will be set up automatically, including dependencies, database, queue workers, websockets, etc.

# Learning from feedback

About two weeks ago, I posted about Fadogen, a development environment generator. The top comment was basically: "Why use this instead of official Laravel installers?"
I took that feedback to heart. I've been working hard to make it fully compatible with Laravel 12 starter kits.

But beyond that, I'm working on making deployment as easy as initializing a project.
And I'm almost done!

Soon, you'll be able to deploy your application to a Raspberry Pi behind a Cloudflare tunnel with an automated process similar to initializing a development environment.

My goal, in my humble little way, is to try to build an ecosystem that simplifies the entire process, from initializing a project to going live.

Thanks for taking the time to check this out. I've tried to incorporate the feedback from my previous post and continue improving. And sorry for any language mistakes - English isn't my native language!

https://redd.it/1j052ij
@r_php
What would you change in Laravel?

Inspired by the complaints in the thread regarding starter kits, and my offhand comment about a fork, I started to wonder, what others dislike about Laravel.

If you had a magic wand and you could change anything in the Laravel architecture or way of doing things, what would you change?

And just for the record, I very much ❤️ the framework.

https://redd.it/1j06964
@r_php
Issue 51 of A Day With Laravel : TailDrops, Security Tip: Don't Roll Your Own Crypto!, Laravel VS Code Extension, Initializer and Laravel — Bester Practices are discussed

https://preview.redd.it/tdm5drufbvle1.jpg?width=1280&format=pjpg&auto=webp&s=944d62dc8968f0b7682d7dcfba757df5b3d0a93d

Hey Laravel friends 🤟,

It's time to a new issue of ‘**A Day With Laravel**’, which presents in a very short format some Laravel news.


In this issue we will talk about :

* **TailDrops** by John Champ
* **Security Tip: Don't Roll Your Own Crypto!** by Stephen Rees-Carter
* **The Laravel VS Code Extension is (officially) HERE** by u/joshcirre
* **Initializer for Laravel** by Niclas
* **Laravel — Bester Practices** by tontonsb


I really hope this free content brings value to you.

Let me know in comment what do you think about it.

See you on the next issue.

[https://go.itanea.fr/adwl51](https://go.itanea.fr/adwl51)


https://redd.it/1j05wpd
@r_php
What are different fetch modes in PDO?

I am trying to learn PDO using PHP official manual, phpdelusions and severl other sites found from Google, but all the time I face new concepts, for example cursor.

Now I know only that different fetch modes exist, but that is all. No any explanations why they exist or when to use each.

Also what fetch and query mean and how do they differ between each other? I can only find some library or SDK related things (I guess next I need to learn some set theory).

https://redd.it/1j0gtcl
@r_php
About Inertiajs scaling

Is anyone using Inertia.js with 1K-2K concurrent users? Any issues with slow reloads or performance? Is it more expensive than an API approach?

I'm currently exploring how well Inertia.js scales for high-traffic applications. I’ve heard mixed opinions and wanted to get some real-world insights.

Right now, I have a news platform built with Laravel (API) + Nuxt, handling 2K min – 10K max concurrent users (avg ~5K). It works well, but I was wondering if Inertia could have been a solid alternative.

For those using Inertia at 1K-2K+ concurrent users, did you notice any performance bottlenecks or slow reload times compared to a traditional API-based approach? Also, does it end up being more expensive in terms of server costs since Laravel is handling more rendering instead of just returning JSON?

Would love to hear from anyone who has scaled an Inertia app to a large user base!

https://redd.it/1j0jm5u
@r_php
Pining for the Fjords (of Laravel)

With Laravel 12, Cloud, the new starter kits, mass hysteria and confusion, the community up in arms, etc., my sense is a lot of you are [pining for the fjords](https://www.youtube.com/watch?v=4vuW6tQ0218) of Laravel. Pine no more! You're just 7 commands away from Laravel 12, Bootstrap 5, and auth\*! This is the all joy, no soy OG Starter Kit that my grandma used back in '18 and I'm sharing her secret recipe here for your enjoyment!

composer create-project laravel/laravel your-project-name
cd your-project name
composer require laravel/ui
php artisan ui bootstrap --auth
npm remove @tailwindcss/vite tailwindcss
npm install
php artisan serve

That isn't very DRY, so I even had gippity whip you up a bash noscript so you can use it for all your side projects!

#!/bin/bash

# Exit on any error
set -e

# Store project name from argument or use default
PROJECT_NAME=${1:-"your-project-name"}

echo "Creating new Laravel project: $PROJECT_NAME"
composer create-project laravel/laravel "$PROJECT_NAME"

echo "Changing directory to $PROJECT_NAME"
cd "$PROJECT_NAME"

echo "Installing Laravel UI package"
composer require laravel/ui

echo "Setting up Bootstrap authentication scaffolding"
php artisan ui bootstrap --auth

echo "Removing Tailwind related packages"
npm remove @tailwindcss/vite tailwindcss

echo "Installing npm dependencies"
npm install

echo "Starting Laravel development server"
php artisan serve

Make a directory for all your about-to-be-insanely-productive-and-successful side projects. Create a file in that folder's root called og-start.sh and run it as:

`og-start.sh good-vibes-only`

Bonus! Add that puppy to your bash profile as an alias:

echo
'alias ogs="og-start.sh"' >> ~/.bash_profile && source ~/.bash_profile

Then run it with:

`ogs good-vibes-only`

Let's get back to our roots and ship! Have a great weekend everyone!

\* ^(PHP) ^(and) ^(node) ^(required,) [^(jQuery)](https://jquery.com/download/) ^(optional) ^(but) ^(recommended,) ^(OP) ^(not) ^(responsible) ^(for) ^(injury,) ^(loss) ^(of) ^(life,) ^(or) ^(developer) ^(ridicule)

https://redd.it/1j0p0a2
@r_php
PHP RFC: True Async

https://wiki.php.net/rfc/true\_async

Hello everyone,
A few months ago, the PHP community held a vote on what people would like to see in the new version. I responded that it would be amazing to have true concurrency in PHP as a native language feature, without the need for additional libraries or extensions.

So today, I present to you something I’ve been dreaming of — and hopefully, some of you have too.

I believe that such development should not be done by a single person but should instead be open for discussion. I think this approach to coding is more effective.

Thanks in advance for any valuable feedback — or even just for sharing your thoughts! :)

https://redd.it/1j0vo2a
@r_php
Java vs PHP in Europe

Hey everyone,

I'm curious about the state of backend development in Europe, especially when it comes to Java springboot and php laravel.

I am an FE developer, looking to move into fullstack.

1. Which one do you see more commonly used in companies across Europe? I am assuming Java has more work opportunities.

2. How do salaries compare for spring boot vs laravel? I am assuming Java is higher paid, since the barrier to entry in lower with laravel.

3. If you had to pick one for long-term career growth, which would you choose and why?



Thank you for your comments.

https://redd.it/1j14ohf
@r_php
To the friendly guy at Barnes & Noble

Stranger saw me looking at a python book and I mentioned he started with PHP. Talked a bit more and I mentioned I was just starting to learn and kept hearing about Python and JavaScript online, hoping to maybe one day get a better job or make some side money.

Got up to the front to pay for Python Crash Course and the cashier handed me a bag with “PHP and MySQL” by John Duckett and said it was already paid for.

I don’t know much about this stuff or if any jobs are around here in NJ for PHP. I feel like I owe it to this stranger to give it a try though.

Thanks whoever you are!


https://redd.it/1j19jie
@r_php
First impression of Laravel Cloud?

In my opinion, it is expensive since the machines aren't cheap, and you already pay a subnoscription. I would love it if I could pay an expensive subnoscription but get the machines at cheaper prices.


https://redd.it/1j1d6l9
@r_php
Upgrade All Your Composer Dependencies with a Single Command!

Hey PHP community,

I'm excited to introduce Composer Upgrader v1.0.0 — a new Composer plugin that streamlines your dependency management. With just one command, composer upgrade-all, you can upgrade patch, minor, major, or even specific packages effortlessly.

Why You'll Love It:
- Simplicity: No more juggling multiple commands. One command, all dependencies upgraded.
- Flexibility: Choose to upgrade all packages or target specific ones.
- Efficiency: Keeps your projects up-to-date with minimal effort.

Getting Started is Easy:
Install it using:
composer global require vildanbina/composer-upgrader


Give it a try and let me know your thoughts. Happy coding!

Check out the full details and contribute on GitHub.



https://redd.it/1j1f7jm
@r_php
Am I missing out by not using any frontend frameworks? None of them feel as clean and intuitive as blade to me.

The noscript basically. I've been making websites since I was 12, and been enjoying Laravel since about 5 years.

I have tried learning Vue and React many times, but I just couldn't wrap my head around the whole concept. So far I've built all my Laravel apps using the good ol' Blade templating engine and I love how readable it is when compared to something like React.

Do you think it's a bad thing that I don't use any js frameworks as a solo (fine, I'll call myself full stack) developer?

I am comfortable with Livewire, and even though most people here seem to hate Volt, I do enjoy writing a single page component for a small feature that requires combining logic with interactivity, and doesn't need to bloat my controller. To me that can be a separation of a concern in itself.

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