@extends('layouts.admin') @section('title', 'Rewards & Referrals') @section('content') @php $labels = [ 'rewards_signup_points' => 'Friend creates an account', 'rewards_referral_tour_points' => 'Friend books a tour package', 'rewards_referral_ship_points' => 'Friend books a ship / cruise', 'rewards_referral_flight_points' => 'Friend books an air ticket', 'rewards_referral_resort_points' => 'Friend books a resort', ]; $discountLabel = fn ($coupon) => $coupon->discount_type === 'percent' ? rtrim(rtrim(number_format((float) $coupon->discount_value, 2), '0'), '.') . '% off' : 'BDT ' . number_format((float) $coupon->discount_value) . ' off'; @endphp @unless ($enabled)
Rewards are switched off. Customers see nothing of this in the app or on the website, earn no points and cannot redeem. Set it up here, then tick "Rewards are live" to launch it.
@endunless
@foreach (['outstanding' => 'Points customers hold', 'earned' => 'Points earned, all time', 'referred' => 'Customers who were referred', 'coupons' => 'Coupons redeemed'] as $key => $label)
{{ $label }}
{{ number_format($stats[$key]) }}
@endforeach
Earning rules
@csrf @method('PUT')
Shows points, referrals and the coupon store in the customer app and on the website, and starts crediting points.
@foreach ($labels as $key => $label)
@endforeach

The referral bonus for a booking is paid once per friend, on the first thing they book and pay for. Levels are fixed: Explorer from 0 points, Voyager from 1,000 (+10% on own bookings), Globetrotter from 3,000.

Coupon store
@forelse ($coupons as $coupon) @empty @endforelse
CouponForDiscountMin. spendValidCostStatusAction
{{ $coupon->title }} {{ $categories[$coupon->category] ?? $coupon->category }} {{ $discountLabel($coupon) }}@if ($coupon->max_discount)
max BDT {{ number_format((float) $coupon->max_discount) }}@endif
BDT {{ number_format((float) $coupon->min_spend) }} {{ $coupon->valid_days }} days {{ number_format($coupon->points_cost) }} pts {{ $coupon->is_active ? 'On sale' : 'Hidden' }}
@csrf @method('DELETE')
@csrf @method('PUT') @include('admin.rewards._coupon', ['coupon' => $coupon])
No coupons yet. Add the first one below.
Add a coupon
@csrf @include('admin.rewards._coupon', ['coupon' => null])
Points ledger
@csrf
@forelse ($transactions as $tx) @empty @endforelse
WhenCustomerWhatFriendPoints
{{ $tx->created_at?->format('d M Y H:i') }} {{ $tx->customer?->full_name }} {{ $tx->description }} ยท {{ str_replace('_', ' ', $tx->kind) }} {{ $tx->relatedCustomer?->full_name ?: '-' }} {{ $tx->points > 0 ? '+' : '' }}{{ number_format($tx->points) }}
Nothing earned or spent yet.
@endsection