Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

laracoft's avatar

laracoft started a new conversation+100 XP

1mo ago

No way to set HTTP status
HTTP/2 400 
server: openresty
date: Sat, 04 Apr 2026 11:28:22 GMT
content-type: text/html; charset=utf-8
cache-control: no-cache, private
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
phpdebugbar-id: 01KNC40K97P25K2JC4TFG74HMH
access-control-allow-origin: *

Calling abort(400, 'No parameters provided'); gives me the above, is there a way to show my message like when I'm calling response()->setStatusCode(400, 'Empty')?

laracoft's avatar

laracoft wrote a reply+100 XP

1mo ago

Gemini vs Claude with Boost?

which one? i only caught the one where he installed boost

laracoft's avatar

laracoft started a new conversation+100 XP

1mo ago

Gemini vs Claude with Boost?

Has anyone used both Gemini and Claude with Boost? Which is better and why?

laracoft's avatar

laracoft started a new conversation+100 XP

2mos ago

Laravel Vite 7 `npm run dev` High CPU load
  1. When I run npm run dev, 2 of more cores shoot to 100%
  2. So, I made the file watching use polling every 10 seconds, but still 100% on 2 cores
  3. How do debug?
laracoft's avatar

laracoft wrote a reply+100 XP

2mos ago

Not receiving Laracast emails

There's nothing to change there except remove conversations i'm watching... it's a long long list there

laracoft's avatar

laracoft was awarded Best Answer+1000 XP

3mos ago

How to have multiple handlers for events?

After more debugging, I found the issue: for a handler's handle(), it must return null. Anything else will cause the next handler not to run.

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

How to have multiple handlers for events?

After more debugging, I found the issue: for a handler's handle(), it must return null. Anything else will cause the next handler not to run.

laracoft's avatar

laracoft started a new conversation+100 XP

3mos ago

Not receiving Laracast emails

Not getting any emails when someone replies to the conversations I'm watching... anyone having the same problem?

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

How to have multiple handlers for events?

Because I step debug and also there are no tracked links in the email (second listener's job)

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

How to have multiple handlers for events?

I see 2 handlers for Illuminate\Mail\Events\MessageSending, yet only 1 runs (the first one)

The 1st one is a class, 2nd is a closure.

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

How to have multiple handlers for events?

Thanks, but the docs say I can call it multiple times, and it doesn't work as described in my case. (I can't call an array because it is 2 separate service providers)

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

How to have multiple handlers for events?

Are you suggesting his code does not work? Because it does (if I remove my listener).

laracoft's avatar

laracoft started a new conversation+100 XP

3mos ago

How to have multiple handlers for events?

In one of package's service provider, I have

Event::listen(MessageSending::class, MyHandler::class);

Then I added https://github.com/jdavidbakr/mail-tracker which also tries to listen to MessageSending (https://github.com/jdavidbakr/mail-tracker/blob/96244f621f1201385a2645152cabb414b2a7fde3/src/MailTrackerServiceProvider.php#L36), however, only MyHandler is called.

How do I make both handlers run on the event?

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

Rate limiting mailables

They are all software, so I do wonder, what is Laravel not getting right?

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

Rate limiting mailables

where do I add releaseAfter and perSecond?

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

Rate limiting mailables

Ok, I want to slow down sending emails, say send only 10 emails every minute, but I don't want any emails to be dropped and they have to be sent from a job running on a queue

laracoft's avatar

laracoft started a new conversation+100 XP

3mos ago

Rate limiting mailables
use Illuminate\Cache\RateLimiter;
use Illuminate\Support\Facades\RateLimiter as RateLimiterFacade;

// In AppServiceProvider boot method:
RateLimiterFacade::for('mailing-list', function (object $job) {
    return $job->user->rateLimit(5)->perMinute(); // A - defined first time
    // Or a global limit:
    // return Limit::perMinute(5);
});
class SendUserEmail implements ShouldQueue
{
    // ...
    public function middleware(): array
    {
        return [
            // Define the rate limit: e.g., 5 emails per minute
            (new RateLimited('mailing-list'))
                ->allow(5)->every(60)   // B - why do this again?
                // If rate limited, release the job back for 60 seconds
                ->releaseAfterSeconds(60),
        ];
    }
}
  • AI suggested the above code to me
  • Why do we need to define the rate limiting 2 times in A and B?
laracoft's avatar

laracoft wrote a reply+100 XP

4mos ago

Public facing Filament 4 form with Tailwind 4

I don't think you addressed my previous 3 points, especially the one: to style new stuff without affecting others

Can you give me an example of Filament's own classes?? Because I do not use any of my own classes, all are copied from Tailwind examples.

laracoft's avatar

laracoft wrote a reply+100 XP

4mos ago

Public facing Filament 4 form with Tailwind 4

Wait a second, I'm not using any other CSS framework, only Tailwind, and Filament claims to also use Tailwind.

And Tailwind's claim to prominence is to style new stuff without affecting others.

Isn't it?

laracoft's avatar

laracoft started a new conversation+100 XP

4mos ago

Public facing Filament 4 form with Tailwind 4
  1. I'm using Filament 4 and Tailwind 4 to build a public facing Filament form using these references
  2. I also had to add @import '../../vendor/filament/filament/resources/css/theme.css'; into resources/css/app.css
  3. But once I added theme.css, my website's original colors (from flowbite.com) are overwritten
  4. I tried to shift @import ... to the last line of resources/css/app.css, but had no effect
  5. I need the @import ..., without it, the Filament form does not layout properly
  6. How do I maintain my original colors?
laracoft's avatar

laracoft started a new conversation+100 XP

4mos ago

Disks for my package

If my package requires its own entries in config/filesystem.php, what is the best way to get them in place without requiring the developer to go through my README.md?

laracoft's avatar

laracoft started a new conversation+100 XP

5mos ago

Why `markdown()` renders differently?

A

$html = <<<'HTML'
<x-markdown>{{ $variable->value }}</x-markdown>
HTML;
dd(Str::of($html)->markdown());

Illuminate\Support\Stringable^ {#444
  #value: "<p><x-markdown>{{ $variable-&gt;value }}</x-markdown></p>\n"
} // 

B

$html = <<<'HTML'
<x-markdown>{{ $variable->value }}
</x-markdown>
HTML;
dd(Str::of($html)->markdown());
Illuminate\Support\Stringable^ {#444
  #value: """
    <p><x-markdown>{{ $variable-&gt;value }}\n
    </x-markdown></p>\n
    """
} 

C

$html = <<<'HTML'
<x-markdown>
{{ $variable->value }}</x-markdown>
HTML;
dd(Str::of($html)->markdown());

Illuminate\Support\Stringable^ {#444
  #value: """
    <x-markdown>\n
    {{ $variable->value }}</x-markdown>\n
    """
}

Can someone explain why C is so special and doesn't get the &gt; treatment?

laracoft's avatar

laracoft started a new conversation+100 XP

5mos ago

Replacing a middleware in L11's bootstrap/app.php

I have some customization in L10's Http/Kernel.php, and now need to convert to L11's bootstrap/app.php because a package requires it

How do I replace the middleware 'auth' with another class in L11's app.php syntax?

laracoft's avatar

laracoft started a new conversation+100 XP

5mos ago

How to create missing `bootstrap/providers.php`?

I just learnt about bootstrap/providers.php here https://laravel.com/docs/12.x/providers

My Laravel 5 project was upgraded over the years to L12 now, but I don't see it.

  1. Who is suppose to create it? Developer or Laravel?
  2. If there are differences with config/app.php, who is the single source of truth?
laracoft's avatar

laracoft wrote a reply+100 XP

5mos ago

Package Discovery/loading order

Can explain further what is in provider.php? And is it modified by your code?