Sergiu17 liked a comment+100 XP
6d ago
@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 liked a comment+100 XP
1mo ago
@sandraalmassri OK? Do that, then?
Sergiu17 wrote a reply+100 XP
1mo ago
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 was awarded Best Answer+1000 XP
2mos ago
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 wrote a reply+100 XP
2mos ago
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 wrote a reply+100 XP
2mos ago
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 wrote a reply+100 XP
3mos ago
Hello, check Laravel Cloud https://cloud.laravel.com/
Sergiu17 wrote a reply+100 XP
3mos ago
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 liked a comment+100 XP
5mos ago
Sergiu17 wrote a reply+100 XP
5mos ago
$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' }}