mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-20 04:23:16 +00:00
feat: pricing plans ans subs
This commit is contained in:
1 parent
97e2a5d30b
commit
c7fc00095c
8 files changed
+308
-34
No files matched your search
@@ -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