@@ -112,30 +112,39 @@ class="mx-auto mt-6 max-w-2xl text-lg text-gray-600 dark:text-gray-400"
112112 "
113113 class =" mt-8 flex flex-col items-center gap-4 sm:flex-row"
114114 >
115- <a
116- href =" #pricing"
117- class =" inline-flex items-center gap-2 rounded-xl bg-emerald-600 px-8 py-4 font-semibold text-white transition hover:bg-emerald-700"
118- >
119- Get Early Bird Access &mdash ; $101
120- <svg
121- xmlns =" http://www.w3.org/2000/svg"
122- viewBox =" 0 0 20 20"
123- fill =" currentColor"
124- class =" size-5"
115+ @if ($alreadyOwned )
116+ <div class =" inline-flex items-center gap-2 rounded-xl bg-emerald-100 px-8 py-4 font-semibold text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300" >
117+ <svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 24 24" stroke-width =" 2" stroke =" currentColor" class =" size-5" >
118+ <path stroke-linecap =" round" stroke-linejoin =" round" d =" m4.5 12.75 6 6 9-13.5" />
119+ </svg >
120+ You Own This Course
121+ </div >
122+ @else
123+ <a
124+ href =" #pricing"
125+ class =" inline-flex items-center gap-2 rounded-xl bg-emerald-600 px-8 py-4 font-semibold text-white transition hover:bg-emerald-700"
125126 >
126- <path
127- fill-rule =" evenodd"
128- d =" M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z"
129- clip-rule =" evenodd"
130- />
131- </svg >
132- </a >
133- <a
134- href =" #signup"
135- class =" text-sm font-medium text-gray-500 transition hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"
136- >
137- or join the waitlist
138- </a >
127+ Get Early Bird Access &mdash ; $101
128+ <svg
129+ xmlns =" http://www.w3.org/2000/svg"
130+ viewBox =" 0 0 20 20"
131+ fill =" currentColor"
132+ class =" size-5"
133+ >
134+ <path
135+ fill-rule =" evenodd"
136+ d =" M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z"
137+ clip-rule =" evenodd"
138+ />
139+ </svg >
140+ </a >
141+ <a
142+ href =" #signup"
143+ class =" text-sm font-medium text-gray-500 transition hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"
144+ >
145+ or join the waitlist
146+ </a >
147+ @endif
139148 </div >
140149 </div >
141150 </section >
@@ -573,14 +582,28 @@ class="mx-auto mt-10 max-w-lg"
573582 The NativePHP Masterclass
574583 </h3 >
575584
576- <div class =" mt-4 flex items-baseline gap-2" >
577- <span class =" text-5xl font-bold text-gray-900 dark:text-white" >
578- $101
579- </span >
580- <span class =" text-gray-500 dark:text-gray-400" >
581- one-time payment
582- </span >
583- </div >
585+ @if ($alreadyOwned )
586+ <div class =" mt-6 text-center" >
587+ <div class =" mx-auto grid size-14 place-items-center rounded-full bg-emerald-100 dark:bg-emerald-900/50" >
588+ <svg xmlns =" http://www.w3.org/2000/svg" fill =" none" viewBox =" 0 0 24 24" stroke-width =" 2" stroke =" currentColor" class =" size-7 text-emerald-600 dark:text-emerald-400" >
589+ <path stroke-linecap =" round" stroke-linejoin =" round" d =" m4.5 12.75 6 6 9-13.5" />
590+ </svg >
591+ </div >
592+ <p class =" mt-3 text-lg font-semibold text-emerald-700 dark:text-emerald-300" >You Own This Course</p >
593+ <p class =" mt-1 text-sm text-gray-600 dark:text-gray-400" >
594+ You'll be notified when the course launches.
595+ </p >
596+ </div >
597+ @else
598+ <div class =" mt-4 flex items-baseline gap-2" >
599+ <span class =" text-5xl font-bold text-gray-900 dark:text-white" >
600+ $101
601+ </span >
602+ <span class =" text-gray-500 dark:text-gray-400" >
603+ one-time payment
604+ </span >
605+ </div >
606+ @endif
584607
585608 <ul class =" mt-8 space-y-3" >
586609 <li class =" flex items-center gap-3" >
@@ -605,36 +628,38 @@ class="mx-auto mt-10 max-w-lg"
605628 </li >
606629 </ul >
607630
608- <form
609- action =" {{ route (' course.checkout' ) } }"
610- method =" POST"
611- class =" mt-8"
612- id =" checkout-form"
613- >
614- @csrf
615- <button
616- type =" submit"
617- class =" flex w-full items-center justify-center gap-2 rounded-xl bg-emerald-600 px-8 py-4 text-center font-semibold text-white transition hover:bg-emerald-700"
631+ @unless ($alreadyOwned )
632+ <form
633+ action =" {{ route (' course.checkout' ) } }"
634+ method =" POST"
635+ class =" mt-8"
636+ id =" checkout-form"
618637 >
619- Get Early Bird Access
620- <svg
621- xmlns =" http://www.w3.org/2000/svg"
622- viewBox =" 0 0 20 20"
623- fill =" currentColor"
624- class =" size-5"
638+ @csrf
639+ <button
640+ type =" submit"
641+ class =" flex w-full items-center justify-center gap-2 rounded-xl bg-emerald-600 px-8 py-4 text-center font-semibold text-white transition hover:bg-emerald-700"
625642 >
626- <path
627- fill-rule =" evenodd"
628- d =" M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z"
629- clip-rule =" evenodd"
630- />
631- </svg >
632- </button >
633- </form >
643+ Get Early Bird Access
644+ <svg
645+ xmlns =" http://www.w3.org/2000/svg"
646+ viewBox =" 0 0 20 20"
647+ fill =" currentColor"
648+ class =" size-5"
649+ >
650+ <path
651+ fill-rule =" evenodd"
652+ d =" M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z"
653+ clip-rule =" evenodd"
654+ />
655+ </svg >
656+ </button >
657+ </form >
634658
635- <p class =" mt-4 text-center text-xs text-gray-500 dark:text-gray-400" >
636- Early bird pricing won't last forever. Lock in the lowest price today.
637- </p >
659+ <p class =" mt-4 text-center text-xs text-gray-500 dark:text-gray-400" >
660+ Early bird pricing won't last forever. Lock in the lowest price today.
661+ </p >
662+ @endunless
638663 </div >
639664 </div >
640665 </section >
@@ -755,7 +780,7 @@ class="rounded-xl bg-gray-900 px-6 py-3 text-sm font-semibold text-white transit
755780 </div >
756781
757782 @auth
758- @if (request (' checkout' ) )
783+ @if (request (' checkout' ) && ! $alreadyOwned )
759784 <script >
760785 document .getElementById (' checkout-form' ).submit ();
761786 </script >
0 commit comments