File tree Expand file tree Collapse file tree 5 files changed +104
-0
lines changed Expand file tree Collapse file tree 5 files changed +104
-0
lines changed Original file line number Diff line number Diff line change 39
39
'instructions ' => 'Your account has been activated. ' ,
40
40
'button ' => 'Login ' ,
41
41
],
42
+ 'welcome_user ' => [
43
+ 'subject ' => 'Welcome ! ' ,
44
+ 'greeting ' => 'Welcome :display_name ! ' ,
45
+ 'instructions ' => 'This site is your new companion on the road to online success.
46
+ Use our no-code builder to create the website or online store of your dreams. ' ,
47
+ 'button ' => 'Get Started ' ,
48
+ ]
42
49
];
Original file line number Diff line number Diff line change 39
39
'instructions ' => 'Hesabınız aktive edildi. ' ,
40
40
'button ' => 'Oturum aç ' ,
41
41
],
42
+ 'welcome_user ' => [
43
+ 'subject ' => 'Hoşgeldiniz ! ' ,
44
+ 'greeting ' => 'Hoşgeldiniz :display_name ! ' ,
45
+ 'instructions ' => 'Online satışlarda başarıya giden yolunuz biz olalım.
46
+ Hayallerinizdeki online mağazayı kurmak için Ocify kullanın. ' ,
47
+ 'button ' => 'Hemen Başla ' ,
48
+ ]
42
49
];
Original file line number Diff line number Diff line change
1
+ {% extends " streams::notifications/email" %}
Original file line number Diff line number Diff line change
1
+ <?php namespace Anomaly \UsersModule \User \Command ;
2
+
3
+ use Anomaly \UsersModule \User \Contract \UserInterface ;
4
+ use Illuminate \Foundation \Bus \DispatchesJobs ;
5
+
6
+ class WelcomeUser
7
+ {
8
+ use DispatchesJobs;
9
+
10
+ /**
11
+ * The user instance.
12
+ *
13
+ * @var UserInterface
14
+ */
15
+ protected $ user ;
16
+
17
+ /**
18
+ * The redirect path.
19
+ *
20
+ * @var string
21
+ */
22
+ protected $ redirect ;
23
+
24
+ /**
25
+ * Create a new SendWelcomeEmail instance.
26
+ *
27
+ * @param UserInterface $user
28
+ * @param string $redirect
29
+ */
30
+ public function __construct (UserInterface $ user , $ redirect = '/ ' )
31
+ {
32
+ $ this ->user = $ user ;
33
+ $ this ->redirect = $ redirect ;
34
+ }
35
+
36
+ /**
37
+ * Handle the command.
38
+ *
39
+ * @return bool
40
+ */
41
+ public function handle ()
42
+ {
43
+ $ this ->user ->notify (new \Anomaly \UsersModule \User \Notification \WelcomeUser ($ this ->redirect ));
44
+ }
45
+ }
Original file line number Diff line number Diff line change
1
+ <?php namespace Anomaly \UsersModule \User \Notification ;
2
+
3
+ use Anomaly \Streams \Platform \Notification \Message \MailMessage ;
4
+ use Anomaly \UsersModule \User \Contract \UserInterface ;
5
+ use Illuminate \Bus \Queueable ;
6
+ use Illuminate \Contracts \Queue \ShouldQueue ;
7
+ use Illuminate \Notifications \Notification ;
8
+
9
+
10
+ class WelcomeUser extends Notification implements ShouldQueue
11
+ {
12
+
13
+ use Queueable;
14
+
15
+
16
+ public $ redirect ;
17
+
18
+
19
+ public function __construct ($ redirect = '/ ' )
20
+ {
21
+ $ this ->redirect = $ redirect ;
22
+ }
23
+
24
+ public function via (UserInterface $ notifiable )
25
+ {
26
+ return ['mail ' ];
27
+ }
28
+
29
+
30
+ public function toMail (UserInterface $ notifiable )
31
+ {
32
+ $ data = $ notifiable ->toArray ();
33
+
34
+ return (new MailMessage ())
35
+ ->view ('anomaly.module.users::notifications.welcome_user ' )
36
+ ->subject (trans ('anomaly.module.users::notification.welcome_user.subject ' , $ data ))
37
+ ->greeting (trans ('anomaly.module.users::notification.welcome_user.greeting ' , $ data ))
38
+ ->line (trans ('anomaly.module.users::notification.welcome_user.instructions ' , $ data ))
39
+ ->action (
40
+ trans ('anomaly.module.users::notification.welcome_user.button ' , $ data ),
41
+ $ this ->redirect != '/ ' ?$ this ->redirect : 'https:// ' .setting_value ('streams::domain ' , 'ocify.co ' )
42
+ );
43
+ }
44
+ }
You can’t perform that action at this time.
0 commit comments