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
I turned FilamentPHP into a no-code app, sort of

Hi,

I want to start by saying that I enjoy using FilamentPHP, have been working with it since v2, on various projects, and now it is my go-to tool when creating anything admin panel-related.

With that being said, you still have to code stuff, so I thought, what if I could make FilamentPHP work as a no-code tool?

So I did that, sort of. Well, I did mostly a demo, you can basically create TextInput, Selects, and define one-to-one and one-to-many relationships.

Now to share some technical details. The whole project runs on SQLite (I was inspired by PocketBase and the idea of having a lightweight, standalone, independent tool that doesn't need any other resources running to use it other than the web server itself). In order to make this thing work alongside Laravel and FilamentPHP I created a GenericModel class to talk with the database, custom migrations for database relationships as well as a somewhat easy-to-extend builder for forms and tables.

The project is of course very early, there is stuff that works on the surface, but if you look behind the scenes is not good code, there is no docs, no way to extend anything other than modifying the core.

Long story short, if you are curious, want to share any feedback, or anything really here is a link to the repo https://github.com/morfibase/morfibase

https://redd.it/1nhq1ap
@r_php
PHP (Non Thread Safe) now on WinGet

As I use PHP for general Windows noscripting tasks I was happy to see the (faster) NTS version added to the WinGet package manager only a few days after a post I made to the PHP mailing list. I'm impressed.

https://redd.it/1nies7m
@r_php
How much AI assistance do you use when working on Laravel projects?

This is something I've been wondering about for a while in the greater Laravel community. For me personally, I tend to only use Copilot inside PHPStorm as mostly a glorified autocomplete when it comes to creating files.

If I'm stuck on a particular method or completing a test assertion, it can come in handy, but I don't let it have free rein over dictating what my code is or should do, as that tends to lead to readability issues and undesired outcomes in my experience.

I imagine there are two camps: no AI or only uses AI and with lots of nuance in between.


How much AI do you use in projects and what do you use? I know AI can be such a hot topic but I'm curious to see what people's thoughts are specifically within the Laravel world.

https://redd.it/1niekdh
@r_php
Longhorn PHP full schedule

Hey y'all - just wanted to share that the full schedule is now online for this year's Longhorn PHP:

https://longhornphp.com/

The conference is October 23-25 in Austin, TX. We have virtual ($75) and in-person ($250-$350) ticket options.

https://redd.it/1niuz2k
@r_php
Existing Laravel app now needs an API

Hey all

I build a Laravel app with Inertia for a client a couple of years back and it's still working perfectly. My client now wants a mobile app as part of the solution which will need to access the data.

So...add an API with JWT to the existing project and make use of services to share code, or create a separate API project accessing the same database or something else?

I'm sure others have faced this issue so interested to hear what swayed the decision.

Cheers.

https://redd.it/1njgct3
@r_php
Laravel MultiTenant, MultiDatabase (JOBS)

Bom, estou desenvolvendo um cardápio online totalmente em Laravel. A aplicação já estava praticamente pronta, mas tive a ideia de transformá-la em multi-tenant. Grande parte já está funcionando, porém me deparei com um problema.

Tenho um banco principal, que vou chamar de "Principal", e os bancos dos tenants: "Tenant1", "Tenant2", e assim por diante. Estou utilizando filas do Laravel porque também uso WebSocket (Laravel Reverb), além da integração com WhatsApp via Twilio.

Centralizei todos os jobs na tabela do banco Principal, ou seja, todos os jobs de todos os tenants são enfileirados lá. Como a aplicação é um cardápio, ela não precisa ser 100% em tempo real, então esse modelo faz sentido.

O problema é que, quando envio um job para disparar mensagens no WhatsApp, a aplicação não consegue se conectar ao banco do tenant. Esse job chama um service responsável pelo envio.

Alguém aqui já trabalhou com filas em sistema multi-tenant no Laravel e poderia me dar uma luz?

https://redd.it/1njp5nf
@r_php
Any plans for proper PHP gRPC server support in 2025?

My organisation is looking at gRPC for internal service communications in place of our existing REST/GraphQL calls. But what’s holding us back from moving towards this direction is we have several PHP mature services that we actively maintain.

Given we have the PHP foundation established, gRPC is a feature I feel that is missing in today’s modern PHP toolkit that isn’t discussed about often, especially with it gaining popularity over the years. There’s full support running gRPC servers in other languages but not PHP.

Is this something that is on the radars of the PHP foundation? Or is the only way is to adopt 3rd party/community developed solutions which seems more like a workaround?

I’m talking about 3rd party plugins like https://github.com/khepin/php-grpc-server-notes which needs to run on RoadRunner, which aren’t actively maintained.

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