Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,15 @@ AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"

PADDLE_SELLER_ID=
PADDLE_CLIENT_SIDE_TOKEN=
PADDLE_API_KEY=
PADDLE_WEBHOOK_SECRET=
PADDLE_SANDBOX=true

PADDLE_PRICE_PRO_MONTHLY=
PADDLE_PRICE_PRO_YEARLY=

VITE_PADDLE_PRICE_PRO_MONTHLY="${PADDLE_PRICE_PRO_MONTHLY}"
VITE_PADDLE_PRICE_PRO_YEARLY="${PADDLE_PRICE_PRO_YEARLY}"
9 changes: 1 addition & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for

This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.

- php - 8.4
- php - 8.3
- inertiajs/inertia-laravel (INERTIA_LARAVEL) - v3
- laravel/fortify (FORTIFY) - v1
- laravel/framework (LARAVEL) - v13
Expand Down Expand Up @@ -118,13 +118,6 @@ This project has domain-specific skills available in `**/skills/**`. You MUST ac

- Laravel can be deployed using [Laravel Cloud](https://cloud.laravel.com/), which is the fastest way to deploy and scale production Laravel applications.

=== herd rules ===

# Laravel Herd

- The application is served by Laravel Herd at `https?://[kebab-case-project-dir].test`. Use the `get-absolute-url` tool to generate valid URLs. Never run commands to serve the site. It is always available.
- Use the `herd` CLI to manage services, PHP versions, and sites (e.g. `herd sites`, `herd services:start <service>`, `herd php:list`). Run `herd list` to discover all available commands.

=== tests rules ===

# Test Enforcement
Expand Down
57 changes: 57 additions & 0 deletions app/Http/Controllers/SubscriptionController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Inertia\Inertia;

class SubscriptionController extends Controller
{
public function index()
{
return Inertia::render('pricing');
}

public function edit(Request $request)
{
return Inertia::render('settings/subscription');
}

public function checkout(Request $request)
{
$priceId = $request->input('price_id');

if (! $priceId) {
return back()->with('error', 'Please select a plan.');
}

return $request->user()->checkout($priceId)
->returnTo(route('dashboard'));
}

public function cancel(Request $request)
{
$subscription = $request->user()->subscription();

if (! $subscription) {
return back()->with('error', 'You do not have an active subscription.');
}

$subscription->cancel();

return back()->with('status', 'Your subscription has been cancelled.');
}

public function resume(Request $request)
{
$subscription = $request->user()->subscription();

if (! $subscription) {
return back()->with('error', 'You do not have a subscription to resume.');
}

$subscription->resume();

return back()->with('status', 'Your subscription has been resumed.');
}
}
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"require-dev": {
"fakerphp/faker": "^1.24",
"fruitcake/laravel-debugbar": "^4.2",
"laravel/boost": "^2.2",
"laravel/pail": "^1.2.5",
"laravel/pao": "^1.0.6",
Expand Down
Loading
Loading