FleetCart/Modules/Account/Http/Controllers/AccountReviewController.php
2023-06-11 13:14:03 +01:00

24 lines
530 B
PHP

<?php
namespace Modules\Account\Http\Controllers;
class AccountReviewController
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$reviews = auth()->user()
->reviews()
->withoutGlobalScope('approved')
->with('product.files')
->whereHas('product')
->paginate(20);
return view('public.account.reviews.index', compact('reviews'));
}
}