chore: code styling via pint

This commit is contained in:
idevakk
2025-11-14 01:51:35 -08:00
parent 3892c48ef2
commit 90ab79b3a2
121 changed files with 1003 additions and 892 deletions

View File

@@ -2,15 +2,16 @@
namespace App\Livewire\Dashboard;
use Exception;
use Log;
use App\Models\ActivationKey;
use App\Models\Plan;
use Exception;
use Livewire\Component;
use Log;
class Pricing extends Component
{
public $plans;
public $activation_key;
public function mount(): void
@@ -66,12 +67,12 @@ class Pricing extends Component
$user->updateStripeCustomer([
'address' => [
'postal_code' => '10001',
'country' => 'US',
'country' => 'US',
],
'name' => $user->name,
'email' => $user->email,
]);
$user->creditBalance($plan->price * 100, 'Premium Top-up for plan: ' . $plan->name);
$user->creditBalance($plan->price * 100, 'Premium Top-up for plan: '.$plan->name);
$balance = $user->balance();
$user->newSubscription('default', $plan->pricing_id)->create();
@@ -81,12 +82,15 @@ class Pricing extends Component
$ends_at = now()->addYear();
}
$user->subscription('default')->cancelAt($ends_at);
return true;
} catch (Exception $e) {
Log::error($e->getMessage());
return false;
}
}
public function render()
{
return view('livewire.dashboard.pricing');