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

Sergiu17's avatar

Sergiu17 liked a comment+100 XP

6d ago

Implement ticket watch feature like jira,clickup using laravel

@avishkame If I understand you correctly, why don't you simply implement this feature instead of using a package?

Here could be the approach:

  • Create a table to keep information on who (user) is watching which ticket. It's kind of like a pivot table.
  • Any change that happens on any ticket, it should fire and event. The respective listener will find out the list of the watchers for this ticket and then send a notification (could be email / database / whatever????)
Sergiu17's avatar

Sergiu17 liked a comment+100 XP

1mo ago

Sergiu17's avatar

Sergiu17 wrote a reply+100 XP

1mo ago

RateLimiting in Tests

I don't think you want to test the middleware itself, you need to make sure some specific routes has that middleware.

collect(Route::getRoutes())
            ->filter(fn ($route) => str_contains($route->uri(), 'api'))
            ->each(fn($route) => $this->assertContains('throttle:60,1', $route->gatherMiddleware()));

modify the filter according to your needs

Sergiu17's avatar

Sergiu17 was awarded Best Answer+1000 XP

2mos ago

How to select all the records from the listings from the pagination?

Since not all the records are loaded - there's no way to know which records to select, you'd need to send a key in order to remove all, for example, selected_all=true

Sergiu17's avatar

Sergiu17 wrote a reply+100 XP

2mos ago

How to select all the records from the listings from the pagination?

Since not all the records are loaded - there's no way to know which records to select, you'd need to send a key in order to remove all, for example, selected_all=true

Sergiu17's avatar

Sergiu17 wrote a reply+100 XP

2mos ago

Laravel 12 Cors- not working for me?

Make sure XSRF-TOKEN is stored in your browser ( Dev tools -> Storage -> Cookies ), then make sure axios is configured properly

axios.defaults.withCredentials = true
Sergiu17's avatar

Sergiu17 wrote a reply+100 XP

3mos ago

Sergiu17's avatar

Sergiu17 wrote a reply+100 XP

3mos ago

Testing FORM component - sometimes fails (have to duplicate filling fields)

Try to add a pause just to see if it's because of the logic on the server

visit(route('referrals.create'))
        ->type('#company', $company->name)
		->pause(1000) // <---------- this
        ->select('#type_id', '1')
        ->radio('[name="code_or_url_radio"]', 'code')
        ->fill('#code_or_url', '122234')
        ->fill('#referrals_commission', '10')	
        ->press('#save')
Sergiu17's avatar

Sergiu17 liked a comment+100 XP

5mos ago

Testing

Isn't route model binding performed in middleware?

Sergiu17's avatar

Sergiu17 wrote a reply+100 XP

5mos ago

Error Call to a member function diffForHumans() on null

$new->created_at is null, and you are trying to call a method on null which results in an error. Check why created_at is null in the first place, as a solution use nullsafe opeartor

{{ $new->created_at?->diffForHumans() ?? 'Unknown date' }}