This commit is contained in:
ct
2025-07-02 18:25:12 +08:00
parent 68a47ec916
commit 0aa0d9569f
20 changed files with 515 additions and 193 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
class UserAccountController extends Controller
{
public function index()
{
$user = Auth::user();
$user->load('user_usage');
$user->load('plan');
return response()->json([
'success' => [
'data' => [
'user' => $user,
'billing' => [
'provider' => 'stripe',
'portal' => Auth::user()->billingPortalUrl(route('home'))
]
],
],
]);
}
}