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
Laravel 12 Documentation over Laravel Passort is referencing Passport 13

Laravel 12 Documentation about passport (https://laravel.com/docs/12.x/passport) is referencing passport 13.

Is it an idea to mention the version of the package at the top of the documentation page? Or link to a passport documentation page instead of trying to fit everything on the laravel 12 documentation.

https://redd.it/1lj4x5o
@r_php
Swagger UI - single page with all routes and different security

Hi everyone. I'm trying to setup swagger (NelmioApiDocBundle). I need a single page (like /api/doc) with every endpoints. I have 2 types of API endpoints: private and public, so private must be protected with api Key (AuthLogin and AuthPassword).

The problem is that I don't know how to correctly separate zones and specify that apiKey must be used for a private zone. And moreover all zones need to be displayed on a single page.

P.S. I don't really want to specify every endpoint in "paths". So I need a killer feature to solve this. And last but not least I need to do it in nelmio_api_doc.yaml (without code) :( Please help me

https://redd.it/1lj63e8
@r_php
Free hosting for Laravel and Postgres

Hi, so Im new to this kind of task because I mostly focused on my programming skills. Is this task under DevOps?

Anyway, I am looking for your recommendations in free hosting for my Laravel Apps and Database for my portfolio and showcase my stuff. Right now my frontend is Livewire3 which I might tackle React or Vue later on but wanted to focus on PHP/Laravel at the moment to avoid getting overwhelmed.

I could ask AI for this but I need to hear from your personal experiences and expertise. Again, right now Im looking for free ones, not the trial.

Thank you so much

https://redd.it/1lj5zwm
@r_php
Does everyone do their dev work like this?

I'm relatively new to professional programming (currently working with Laravel), and I feel like I rarely write code that works on the first try. For example, I’ll implement an update method in a controller and make a bunch of silly mistakes typos, validating unrelated fields, or calling a model method on a collection without realizing it. It’s only when I start testing that I notice all these issues, and then I end up debugging every little thing just to get it working the way it's intended to.

it's like when there's so much context to keep in mind my brain will go autopilot and I won't even try to think it through because I know I will miss something up anyway

https://redd.it/1lj8njx
@r_php
Locked log file prevents development server from working
https://redd.it/1ljd9ul
@r_php
You can write plugins for VitoDeploy
https://redd.it/1ljjjqs
@r_php
Laravel Nova market size

I work at an agency and we use Nova internally, but I have no visibility into the broader market. Thinking about building some premium plugins but want to gauge if it's worth the time investment.

Anyone have insights on:
- How big is the Nova user base actually?
- Are people still actively buying Nova plugins?
- Is the ecosystem growing or shrinking?

I've tried researching this myself but there's surprisingly little public data on Nova adoption/market size. Would love to hear from other devs who've built plugins or agencies using it.

Thanks!

https://redd.it/1ljke29
@r_php
What’s your production host, and why?

We use render.com and in all honesty, it’s fine. However migrating to it from heroku was a true hellscape.

I can’t think of anything render does that’s particularly annoying and the things that do annoy me, I know render has the featureset to make less annoying (like env variables across the main web service and all the workers, for example).

I’d love to know what everyone else is using and why they use it.



https://redd.it/1ljmjl7
@r_php
Laravel Nightwatch feature request

Please please please build in the ability to

Ignore "queued jobs" and "job attempts"
Maybe i'm dumb but i can't see why I want to track these
Sample queries
seeing 10% of my queries would be MORE THAN enough to get a picture of whats going on in my app.

i couldn't justify paying the money until this functionality is added. But i do want to use it, it's really cool apart from the above points.

For me and my app which is a pretty busy thing... counting every job, attempted job and every query makes it untenable financially.

https://redd.it/1ljrj9q
@r_php
What features would you like added to Laravel Nightwatch?

I'd like to see added:

Ignore "queued jobs" and "job attempts"
Maybe i'm dumb but i can't see why I want to track these
Sample queries
seeing 10% of my queries would be MORE THAN enough to get a picture of whats going on in my app.

i couldn't justify paying the money until this functionality is added. But i do want to use it, it's really cool apart from the above points.

My product is very busy. counting every job, attempted job and every query makes it untenable financially.


I'm aware you can already control sampling to a certain extent. I'm looking for finer controls.

https://redd.it/1lk1i40
@r_php
Pecl down?

So Pecl seems to be down. Only for us or for everyone? :)

Build pipelines are failing due to 500s and 404s

https://redd.it/1lk3lzq
@r_php
Longhorn PHP is returning this fall - CFP open now!

Hey y'all - after skipping last year due to overlap with Laracon, we are bringing back Longhorn PHP for 2025. The CFP is open now, so please submit some talks! Key details:


When: October 23-25, 2025
Where: Austin,TX - Holiday Inn Austin Midtown
Website: https://www.longhornphp.com
CFP: https://cfp.longhornphp.com

https://redd.it/1lkablk
@r_php
SaaS with PHP: Libraries or Roll Your Own Multi-Tenancy?

While writing my recent newsletter release on multi-tenancy, I've started to think about in-house vs external library approaches for the tenant data isolation.

Most of the SaaS companies I worked with, or discussed the architecture with, had an in-house implementation, or they had none. By none, I mean the software they write is just single-tenant, and they spin up a fresh instance for each customer. That works for some business cases, for some it does not, but that is a different topic to discuss.

Back to in-house vs library. Currently, there are some good, ready-to-use solutions, such as Laravel Tenancy, which seem to cover most of the required flows, battle-proven, and easy to set up. On the other hand, when you know the approach you would like to have, writing your own implementation will take less than a day, or a couple of days in more complicated scenarios. In exchange, you get full control of how the multi-tenancy behaves, and both altering it to your needs as well as debugging should be easier. And the SaaS companies I talked with - each of them needed some very specific solutions perfectly tailored to their case.

What is your preference? I guess, when building the MVP, a ready-to-use solution seems a better choice, as long as the approach allows you to switch/extend it in the future. Each day saved might be crucial. In other cases, I prefer to implement my own solutions. in case you are interested in the newsletter edition on this topic: https://phpatscale.substack.com/p/php-at-scale-10 



https://redd.it/1lkttfj
@r_php
Trouble Logging from Laravel (Local) to Remote Elasticsearch on AWS – Any Tips?

Hey everyone!

I'm working on a Laravel project locally and for a test trying to send application logs to a **remote Elasticsearch cluster hosted on AWS**.

The idea is to centralize logs for auditability, and I'm using **Monolog** to push logs to a specific index.

# What I’ve done so far:

* Set up Laravel to use a custom Monolog handler with the `elasticsearch/elasticsearch` PHP client.
* Created a dedicated index (`custom-output-index-001`) on the remote host.
* Verified I can connect to the AWS host using cURL and basic auth.
* Confirmed the logs are being written *locally* if I point to a local Elasticsearch instance (`localhost:9200`).

# The problem:

When I switch the Elasticsearch host in the Laravel config to the remote endpoint (on AWS), **no logs show up in the remote index**, and I get **no exceptions or errors** in the Laravel logs.

# What I suspect:

* The client version (v9.x) may not be compatible with the remote ElasticSearch instance. I’m considering downgrading to the v7.x client which uses `application/json` instead of `application/x-ndjson`.
* Content-Type mismatch? The remote service may reject the format used by the newer client.
* Maybe a network/firewall/SIGv4 auth issue?
* Or the index mapping/settings on AWS Elasticsearch need to be adjusted to accept those documents?

# What I’d like to know:

* Has anyone successfully configured Laravel to log to a remote Elasticsearch endpoint?
* Did you have to downgrade the client library or tweak headers?
* Any best practices or gotchas when working with Elasticserach + Laravel?

This is myy current logging config

use Elastic\Elasticsearch\ClientBuilder;
use Elastic\Elasticsearch\Exception\AuthenticationException;
use Illuminate\Support\Facades\Log;
use Monolog\Logger;
use Monolog\Handler\ElasticsearchHandler;
use Monolog\Formatter\ElasticsearchFormatter;

class ElasticsearchLogger
{
/**
* @throws AuthenticationException
*/
public function __invoke(array $config): Logger
{
$client = ClientBuilder::create()
->setHosts([
[
'host' => MY_HOST,
'port' => ENV_PORT,
'scheme' => ENV_SCHEME,
'user' => '********', // ← Basic Auth username
'pass' => '*****', // ← Basic Auth password
]
])
->build();

$indexName = 'custom-output-index-001';

$handler = new ElasticsearchHandler($client, [
'index' => $indexName,
'type' => '_doc',
]);
$response = $client->info();
Log::debug("CLIENT",[$response]);

$formatter = new ElasticsearchFormatter($indexName, '_doc');
$handler->setFormatter($formatter);

return new Logger('elastic', [$handler]);
}
}

Thanks in advance!

https://redd.it/1lkwi22
@r_php
New to php, but curious about it with Laravel

Hi guys,

I've been lurking some time now, and I want to try out php with Laravel.
Which editor do you guys recommend for php development?
Also any extensions that are useful?

Cheers!

https://redd.it/1llb32w
@r_php
what are the quirks of php and what mindset should a php dev have ??

forgive if my words come out wrong and ill-informed

was told php is not an important language ,now have to work on it cuz I was a java dev. now i have to work in my hometown due to ma and pa so i have taken a php job

what makes a php dev great compared to say a java dev or c++ dev?? hidden quirks of the language and mindset

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