feat: pricing plans ans subs
This commit is contained in:
@@ -2,13 +2,16 @@
|
||||
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
function getSubscriptionLink()
|
||||
function getSubscriptionLink($id)
|
||||
{
|
||||
$checkout_id = config("coolify.lemon_squeezy_checkout_id_$id");
|
||||
if (!$checkout_id) {
|
||||
return null;
|
||||
}
|
||||
$user_id = auth()->user()->id;
|
||||
$team_id = auth()->user()->currentTeam()->id ?? null;
|
||||
$email = auth()->user()->email ?? null;
|
||||
$name = auth()->user()->name ?? null;
|
||||
$checkout_id = config('coolify.lemon_squeezy_checkout_id');
|
||||
$url = "https://store.coollabs.io/checkout/buy/$checkout_id?";
|
||||
if ($user_id) {
|
||||
$url .= "&checkout[custom][user_id]={$user_id}";
|
||||
|
Reference in New Issue
Block a user