Includes all work from phases 6-9+ and frontend polish rounds 1 & 2: - Login history with device trust, new device notifications, session management - Churn prevention: cancellation surveys, winback campaigns with email sequences - Financial reports: revenue, P&L, tax, aging, refund, subscription reports with PDF/CSV/JSON export - Configurable checkout: plan config groups/options, build-your-own VPS - Frontend polish: fix broken legal links, add SEO meta tags, favicon, font display=swap, Head titles on all 14 marketing pages, mobile responsive fixes, AuthLayout legal footer, remove false 24/7 claims, hide empty stats, correct uptime SLA to 99.9%, GameServers notify buttons linked to /contact, 301 redirects for /terms and /privacy - WHMCS migration scripts - Update legal page effective dates to March 16, 2026 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 lines
818 B
PHP
32 lines
818 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Controllers\Account;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\TrustedDevice;
|
|
use Illuminate\Http\RedirectResponse;
|
|
use Illuminate\Http\Request;
|
|
|
|
class TrustedDeviceController extends Controller
|
|
{
|
|
public function destroy(Request $request, TrustedDevice $device): RedirectResponse
|
|
{
|
|
if ($device->user_id !== $request->user()->id) {
|
|
abort(403, 'You do not own this trusted device.');
|
|
}
|
|
|
|
$device->delete();
|
|
|
|
return redirect()->back()->with('success', 'Trusted device removed.');
|
|
}
|
|
|
|
public function destroyAll(Request $request): RedirectResponse
|
|
{
|
|
$request->user()->trustedDevices()->delete();
|
|
|
|
return redirect()->back()->with('success', 'All trusted devices removed.');
|
|
}
|
|
}
|