laracoft's avatar

laracoft started a new conversation+100 XP

3w ago

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

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

laracoft's avatar

laracoft started a new conversation+100 XP

1mo ago

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

laracoft's avatar

laracoft started a new conversation+100 XP

1mo ago

  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

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

2mos ago

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

2mos ago

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

2mos ago

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

2mos ago

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

2mos ago

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

2mos ago

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

2mos ago

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

2mos ago

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

2mos ago

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

where do I add releaseAfter and perSecond?

laracoft's avatar

laracoft wrote a reply+100 XP

3mos ago

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

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

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

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

  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

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

4mos ago

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

4mos ago

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

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

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

laracoft's avatar

laracoft wrote a reply+100 XP

5mos ago

Thanks for the replies, I'm already using Issues in Gitea (almost identical to Issues in Github)

Have updated the OP with more insight into this problem

laracoft's avatar

laracoft wrote a reply+100 XP

5mos ago

Thanks,

  1. How would code for scheduling a root Task look like? It sounds cumbersome if I have to create a Job for every root Task
  2. I need to run as root when modifying certain files, e.g. nginx etc
laracoft's avatar

laracoft started a new conversation+100 XP

5mos ago

Is there a Laravel way setup cron to run most tasks as www-data and some tasks as root?

The docs show only https://laravel.com/docs/12.x/scheduling#running-the-scheduler which implies only 1 user can be specified. It feels dangerous to set it as root.

laracoft's avatar

laracoft wrote a reply+100 XP

5mos ago

Thanks for the replies, I'm actually already using Gitea's issues (almost identical to Github issues)

  1. I gave my problem more thought and have more insights: when I see 100s of issues, I don't know where to start, picking a random one feels like throwing a dice, i.e. is there another more important issue I should work on

  2. I'm also using labels (and they include) priority but it still feels like I might be missing something

  3. Sometimes we get an idea, but details may not be clear, aka it is still hard to act on and probably requires alot of clarifications

  4. These should be separate from say bugs, which has a very clear problem, and requires someone who knows how to debug it

  5. I'm still thinking about the problem if you ask me what is my dream solution, I wish there is a system that can tell me the best issue that I should be working on next

laracoft's avatar

laracoft started a new conversation+100 XP

5mos ago

  1. I have several repos and many issues across all of them
  2. Is there any tool that can help me go through them and sort out which one the team should work on first?

Update

  1. I'm already using Issues in Gitea
  2. But seeing 100s of issues is overwhelming and I'm not sure where is the best place to start
  3. After some thoughts, I realized a big factor is that some issues are clear, e.g. bug with very reproducible steps, vs a fresh raw idea where details are still scant - addressing this factor will likely make the problem smaller
  4. Also, going along the lines of wishful thinking, I wish there was a tool that can tell each developer which is the issue they should work on first
laracoft's avatar

laracoft started a new conversation+100 XP

5mos ago

  1. My package requires spatie/laravel-permissions, so I added setPermissionsTeamId(1) in its service provider's boot(), this service provider is auto-discovered by Laravel
  2. However, it has no effect, e.g. if in one of my artisan command, I echo getPermissionsTeamId(), I get null
  3. However, if I add setPermissionsTeamId(1) to my AppServiceProvider's boot(), the echo getPermissionsTeamId() will return 1

What is happening?

laracoft's avatar

laracoft started a new conversation+100 XP

5mos ago

Can anyone share how they are doing backups and restore of multiple Laravel projects?

In particular, I'm concerned with DB, .env and storage as these are not version controlled.

Preferably it is all done via SSH.

I'm hoping it is easy to setup, verify that it is working correctly and of course, easy to restore too.