File tree Expand file tree Collapse file tree 6 files changed +17
-14
lines changed Expand file tree Collapse file tree 6 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ public function show(Team $team)
25
25
'team ' => $ team ,
26
26
'customer ' => $ customer ,
27
27
'nextPayment ' => $ nextPayment ,
28
- 'subscription ' => $ team ->subscription ()->canceled () ? null : $ team ->subscription (),
28
+ 'subscription ' => $ team ->subscription ()? ->canceled() ? null : $ team ->subscription (),
29
29
'checkout ' => $ checkout ->options (),
30
30
'transactions ' => $ team ->transactions ,
31
- 'updatePaymentMethodUrl ' => $ team ->subscription ()->paymentMethodUpdateUrl (),
32
- 'cancelSubscriptionUrl ' => $ team ->subscription ()->cancelUrl (),
31
+ 'updatePaymentMethodUrl ' => $ team ->subscription ()? ->paymentMethodUpdateUrl(),
32
+ 'cancelSubscriptionUrl ' => $ team ->subscription ()? ->cancelUrl(),
33
33
]);
34
34
}
35
35
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Models ;
4
4
5
- // use Illuminate\Contracts\Auth\MustVerifyEmail;
5
+ use Illuminate \Contracts \Auth \MustVerifyEmail ;
6
6
use Illuminate \Database \Eloquent \Factories \HasFactory ;
7
7
use Illuminate \Foundation \Auth \User as Authenticatable ;
8
8
use Illuminate \Notifications \Notifiable ;
11
11
use Laravel \Jetstream \HasTeams ;
12
12
use Laravel \Sanctum \HasApiTokens ;
13
13
14
- class User extends Authenticatable
14
+ class User extends Authenticatable implements MustVerifyEmail
15
15
{
16
16
use HasApiTokens;
17
17
use HasFactory;
Original file line number Diff line number Diff line change @@ -43,10 +43,13 @@ public function via(object $notifiable): array
43
43
public function toMail (object $ notifiable ): MailMessage
44
44
{
45
45
$ nextPayment = $ this ->team ->subscription ()->nextPayment ();
46
+ $ dateDiff = $ nextPayment ->date ->longRelativeToNowDiffForHumans ();
46
47
47
48
return (new MailMessage )
48
- ->line ('Your trial ends soon. ' )
49
- ->line ("You will be charged {$ nextPayment ->amount ()} on {$ nextPayment ->date ->toDateTimeString ()} ( {$ nextPayment ->date ->longRelativeToNowDiffForHumans ()}). " )
49
+ ->subject ("Your trial ends in {$ dateDiff }" )
50
+ ->greeting ("Hello {$ this ->team ->customer ->name }! " )
51
+ ->line ('Your trial for team ' .$ this ->team ->name .' ends soon. ' )
52
+ ->line ("You will be charged {$ nextPayment ->amount ()} on {$ nextPayment ->date ->toDateTimeString ()} ( {$ dateDiff }). " )
50
53
->action ('Manage Subscription ' , url (route ('teams.billing.show ' , $ this ->team )))
51
54
->line ('Any other questions? Contact us at ' .config ('app.email ' ));
52
55
}
Original file line number Diff line number Diff line change 58
58
*/
59
59
60
60
'features ' => [
61
- // Features::termsAndPrivacyPolicy(),
61
+ Features::termsAndPrivacyPolicy (),
62
62
// Features::profilePhotos(),
63
63
Features::api (),
64
64
Features::teams (['invitations ' => true ]),
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ const logout = () => {
71
71
<button type =" button" class =" inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-700 active:bg-gray-50 dark:active:bg-gray-700 transition ease-in-out duration-150" >
72
72
<span class =" flex flex-col" >
73
73
<span >{{ $page.props.auth.user.current_team.name }}</span >
74
- <span v-if =" $page.props.auth.user.current_team.billing.status === 'trialing'" class =" text-xs text-amber-600" >Trial ends {{dayjs($page.props.auth.user.current_team.billing.trial_ends_at).fromNow()}}</span >
74
+ <span v-if =" $page.props.auth.user.current_team.billing? .status === 'trialing'" class =" text-xs text-amber-600" >Trial ends {{dayjs($page.props.auth.user.current_team.billing.trial_ends_at).fromNow()}}</span >
75
75
<!-- <span class="text-xs text-red-600">Payment Due</span>-->
76
76
</span >
77
77
Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ const verificationLinkSent = computed(() => props.status === 'verification-link-
41
41
</PrimaryButton >
42
42
43
43
<div >
44
- <Link
45
- :href =" route('profile.show')"
46
- class =" underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
47
- >
48
- Edit Profile</Link >
44
+ <!-- <Link-->
45
+ <!-- :href="route('profile.show')"-->
46
+ <!-- class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"-->
47
+ <!-- > -- >
48
+ <!-- Edit Profile</Link> -- >
49
49
50
50
<Link
51
51
:href =" route('logout')"
You can’t perform that action at this time.
0 commit comments