79228521

Date: 2024-11-26 23:05:37
Score: 0.5
Natty:
Report link

hope my solution solves your problem. To ensure the status attribute works correctly, modify your query to include the columns needed for the accessor:y and avoid additional queries.

$tickets = Tickets::select('id', 'title', 'date', 'payment', 'total', 'active')
    ->limit(100)
    ->get();

This way, all the necessary data for the custom attribute is fetched in the initial query.

Thanks

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: AlphaCoX