PHP Reddit – Telegram
PHP Reddit
34 subscribers
289 photos
37 videos
24.8K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Laravel react started kit, seems has changed, not sure when and what to do

inside every react component we used to call a web Route like this route(...)

but this time it seems things has changed

I have noticed a new folders

https://preview.redd.it/20cp2aym4znf1.png?width=297&format=png&auto=webp&s=cfb5db77b4e075b03677ad2125de6880e2e010a4

and here is a sample of a login route

https://preview.redd.it/texmr1tt4znf1.png?width=642&format=png&auto=webp&s=3010e80cc549d4a239f4f7a2a1b967db92a4f12f


what do you think of this approach, will it be good during scale,

and is there any docs for it, and what do we even name this approach



https://redd.it/1nbtqcz
@r_php
PhpStorm setup for Laravel

Hello everyone,

I am curious how you guys solve the code formatting throughout php, blade and js files.

I am trying to get a common ground between all developers and also enforce all code formatting rules via a github action.

I have tried many configurations, but none of them work in the same way for both CI and local, e.g. npx prettier output is different than the phpstorm auto format.

Also laravel pint (in ci env) is different than local format (in phpstorm).


If you have any suggestions or guides to fully setup phpstorm and a gituhub action, please feel free to drop it here :)


Thanks!

https://redd.it/1nbx9eg
@r_php
PHP Enum to javanoscript objects, The Ziggy / Wayfinder of Enums. Does that exists ?

In order to ensure consistency between front and back end, I'm looking for a package that would "automagically" generate javanoscript / typenoscript files from PHP enums.

I have loads of Enums that I am "mirroring" on the front-end for consistency. I would love this step to be automated.

Similar to what Ziggy ( https://github.com/tighten/ziggy ) or Wayfinder ( https://github.com/laravel/wayfinder ) do for routes: automatically generate some javanoscript code that can be used in the front-end.

Does that exist at all ?

How do you manage that in your code ?




https://redd.it/1nc0a6i
@r_php
The State of Laravel 2025 results are live!
https://stateoflaravel.com/

https://redd.it/1ncdu5w
@r_php
Question about PHP/FI

I am curious about the early PHP versions and I see no precompiled binaries for PHP/FI 1 or 2. Do these exist? if not, how can I build them from source?

https://redd.it/1ncvuix
@r_php
Laravel React native starter if any?

Do we have any Laravel React Native starter? Any recommendation?

https://redd.it/1nd6wc7
@r_php
Add a custom file in config/packages

I want to add a custom config file config/packages/job_offers.yaml. But i face an error:
In FileLoader.php line 177:

There is no extension able to load the configuration for "job_offer" (in "C:\Users\Asmitta\sources\phenix-emploi/config/packages/job_offer.
yaml"). Looked for namespace "job_offer", found "framework", "doctrine", "doctrine_migrations", "debug", "twig", "web_profiler", "stimulus"
, "turbo", "twig_extra", "security", "monolog", "maker", "doctrine_fixtures", "twig_component", "autocomplete", "dropzone", "asmitta_form_f
low", "live_component", "chartjs", "mercure", "a2lix_auto_form", "a2lix_translation_form", "doctrine_behaviors", "knp_paginator", "presta_s
itemap" in C:\Users\Asmitta\sources\phenix-emploi/config/packages/job_offer.yaml (which is being imported from "C:\Users\Asmitta\sources\ph
enix-emploi\src\Kernel.php").


In YamlFileLoader.php line 814:

There is no extension able to load the configuration for "job_offer" (in "C:\Users\Asmitta\sources\phenix-emploi/config/packages/job_offer.
yaml"). Looked for namespace "job_offer", found "framework", "doctrine", "doctrine_migrations", "debug", "twig", "web_profiler", "stimulus"
, "turbo", "twig_extra", "security", "monolog", "maker", "doctrine_fixtures", "twig_component", "autocomplete", "dropzone", "asmitta_form_f
low", "live_component", "chartjs", "mercure", "a2lix_auto_form", "a2lix_translation_form", "doctrine_behaviors", "knp_paginator", "presta_s
itemap".


I think it's because there's no package JobOffer, but how can i fix it please ? That config file is sent to one of my services.

https://redd.it/1nd8s9m
@r_php
will the forge 2 have a way to go around with mails?

hi, my setup is domains and mini-hosting by hostcreators, a small local company, then i have dns redirecting to digitalocean, because it's forge-connectable vps service.

now i have smtp at hostcreators, but they use ports 465 and 587, which are blocked by do.

so while paying for their mailing service, i also have to pay for mailgun.

since forge 2 vps' will be using do's servers, i assume these ports will still be blocked.

forge devs, is there a chance i could unblock these ports, so i don't have to pay 2 mailing subnoscriptions please?

https://redd.it/1nd83xh
@r_php
SheafUI Starter Kit, Zero dependency Laravel boilerplate with 16 components you actually own

SheafUI Starter Kit is different:

When you install it, you get 16 beautiful UI components that are copy-pasted directly into your Laravel project. They become YOUR code. Modify them, customize them, remove SheafUI CLI entirely if you want and your components stay.

What's included:

\- Complete authentication system (registration, login, password reset)

\- Dashboard with functional components

\- User settings and profile management

\- Toast notification system (works with Livewire + controllers)

\- 16 production-ready UI components (buttons, forms, modals, etc.)

\- Zero external dependencies (except sheaf/cli for installation)

True code ownership:

\- Copy-paste installation model

\- No vendor lock-in

\- Remove SheafUI anytime - your code remains

Check it out: https://sheafui.dev/docs/guides/starter-kit

Anyone else tired of not actually owning their UI code? What's your experience with vendor lock-in?

https://redd.it/1nd8yhg
@r_php
UX SweetAlert, a Symfony bundle integrating the SweetAlert2 library in Symfony applications.

Looking to enhance your Symfony application's UX with elegant modal dialogs and toast notifications? Meet UX SweetAlert, a Symfony UX bundle that seamlessly integrates SweetAlert2 into your PHP backend and Twig frontend.


UX SweetAlert gives you an elegant, JavaScript-powered feedback system directly from your Symfony controllers — no need to manage messy JS state manually.

If you're already using Symfony UX and Stimulus, this is a no-brainer.

📦 GitHub repository : https://github.com/pentiminax/ux-sweet-alert

https://redd.it/1ndir9k
@r_php
Do you embed PHP code in the blade file or barely? If you do, where is the boundary that determines that it is fine in the blade or it should be in the PHP component class? I'm in a bind.

Which is better for passing and displaying schedules to the calendar that uses CSS grid? In the livewire component, ready the collection with empty items for the sake of putting an empty grid item and display the schedules correctly or do it in the blade file by writing/embedding php code and using foreach loop?

https://redd.it/1ndzftt
@r_php
Are PHP developers underestimating the power of typed properties in real projects?

PHP has been gradually adding type safety features like typed properties and union types. In real-world applications, are developers actually using these features to improve code reliability, or do they mostly stick to dynamic typing out of habit? I’d love to hear examples or experiences of teams successfully adopting these features - or the challenges you’ve faced in doing so.

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