user()->email)); $licenses = License::query() ->with('product') ->whereRaw('LOWER(customer_email) = ?', [$email]) ->latest() ->paginate(15); return view('licensing::customer.index', compact('licenses')); } public function show(Request $request, License $license): View { // Return 404, not 403, to avoid disclosing whether a licence exists. abort_unless( hash_equals( mb_strtolower(trim((string) $license->customer_email)), mb_strtolower(trim((string) $request->user()->email)) ), 404 ); $license->load(['product', 'activations']); return view('licensing::customer.show', compact('license')); } }