Update pricing UX, billing flows, and API rules

This commit is contained in:
Dwindi Ramadhana
2026-02-12 00:52:40 +07:00
parent cf065fab1e
commit a905256353
202 changed files with 22348 additions and 301 deletions

View File

@@ -1,6 +1,9 @@
<?php
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\Web\SiteController;
use App\Http\Controllers\Billing\PayPalController;
use App\Http\Controllers\Billing\PakasirController;
use Illuminate\Support\Facades\Route;
Route::get('/', [SiteController::class, 'home'])->name('home');
@@ -11,14 +14,37 @@ Route::get('/api-docs', [SiteController::class, 'apiDocs'])->name('api-docs');
Route::get('/emoji/{slug}', [SiteController::class, 'emojiDetail'])->name('emoji-detail');
Route::get('/pricing', [SiteController::class, 'pricing'])->name('pricing');
Route::post('/pricing/currency', [SiteController::class, 'setPricingCurrency'])->name('pricing.currency');
Route::get('/support', [SiteController::class, 'support'])->name('support');
Route::get('/privacy', [SiteController::class, 'privacy'])->name('privacy');
Route::get('/terms', [SiteController::class, 'terms'])->name('terms');
Route::get('/profile', function () {
return redirect()->route('profile.edit');
})->middleware('auth');
Route::get('/{categorySlug}', [SiteController::class, 'category'])
->where('categorySlug', 'all|smileys|people|animals|food|travel|activities|objects|symbols|flags')
->name('category');
Route::get('/{categorySlug}/{subcategorySlug}', [SiteController::class, 'categorySubcategory'])
->where('categorySlug', 'all|smileys|people|animals|food|travel|activities|objects|symbols|flags')
->where('subcategorySlug', '[a-z0-9\-]+')
->where('subcategorySlug', '[a-z0-9\\-]+')
->name('category-subcategory');
Route::middleware('auth')->group(function () {
Route::post('/billing/paypal/create', [PayPalController::class, 'createSubscription'])
->middleware('verified')
->name('billing.paypal.create');
Route::get('/billing/paypal/return', [PayPalController::class, 'return'])->name('billing.paypal.return');
Route::post('/billing/pakasir/create', [PakasirController::class, 'createTransaction'])
->middleware('verified')
->name('billing.pakasir.create');
Route::post('/billing/pakasir/cancel', [PakasirController::class, 'cancelPending'])
->middleware('verified')
->name('billing.pakasir.cancel');
Route::get('/dashboard/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/dashboard/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/dashboard/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});
require __DIR__.'/auth.php';