- 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
18 lines
329 B
PHP
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();
|
|
}
|
|
}
|