dealhub/app/Actions/GetUserReportedDealsAction.php
kusowl 94ef8f360d feature (favorite and reported deals):
- add favorites and reported tabs in user profile pages
- add remove favorites
- customers can view a deal directly from profiles section and deal modal is shown in explore page
- fix formatting by pint
2026-01-23 16:14:04 +05:30

18 lines
329 B
PHP

<?php
namespace App\Actions;
use App\Models\User;
use Illuminate\Support\Collection;
final readonly class GetUserReportedDealsAction
{
public function execute(User $user): Collection
{
return $user->reports()
->select('reports.id')
->with('deals:id,title')
->get();
}
}