Compare commits

881 Commits

Author SHA1 Message Date
Sayli Raut
b6a45d8a80 Merge pull request #457 from WDI-Ideas/sayli
Sayli
2024-08-16 13:35:43 +05:30
sayliraut
14af12c818 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-16 13:35:20 +05:30
sayliraut
b9614c75dc changes 2024-08-16 13:35:09 +05:30
Sayli Raut
1a9b92ce49 Merge pull request #456 from WDI-Ideas/sayli
Sayli
2024-08-16 12:59:19 +05:30
sayliraut
d221544c24 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-16 12:58:55 +05:30
sayliraut
f310428fd6 changes 2024-08-16 12:58:45 +05:30
Sayli Raut
6721d6890a Merge pull request #455 from WDI-Ideas/sayli
Sayli
2024-08-16 12:36:35 +05:30
sayliraut
7083252e5c Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-16 12:36:11 +05:30
sayliraut
55a6d8cfe6 changes 2024-08-16 12:36:02 +05:30
Sayli Raut
323ffbc631 Merge pull request #454 from WDI-Ideas/sayli
Sayli
2024-08-16 12:17:37 +05:30
sayliraut
7c62e42548 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-16 12:17:12 +05:30
sayliraut
3814a176a7 changes 2024-08-16 12:17:02 +05:30
Sayli Raut
d6c5e1ae24 Merge pull request #453 from WDI-Ideas/sayli
Sayli
2024-08-14 15:56:52 +05:30
sayliraut
2cbb0f955b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-14 15:56:21 +05:30
sayliraut
ad0367ec73 changes 2024-08-14 15:56:13 +05:30
Sayli Raut
0d90f9de93 Merge pull request #452 from WDI-Ideas/sayli
Sayli
2024-08-14 15:51:52 +05:30
sayliraut
11d5467d88 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-14 15:51:21 +05:30
sayliraut
ce2120374b changes 2024-08-14 15:51:12 +05:30
Sayli Raut
fc3517e7a6 Merge pull request #451 from WDI-Ideas/sayli
Sayli
2024-08-14 13:36:20 +05:30
sayliraut
0f460faa17 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-14 13:35:54 +05:30
sayliraut
8b347013b7 changes 2024-08-14 13:35:44 +05:30
Sayli Raut
984936e4de Merge pull request #450 from WDI-Ideas/sayli
Sayli
2024-08-14 13:31:25 +05:30
sayliraut
80ad968314 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-14 13:30:56 +05:30
sayliraut
1136eb3ee3 changes 2024-08-14 13:30:47 +05:30
Sayli Raut
8343cecd62 Merge pull request #449 from WDI-Ideas/sayli
Sayli
2024-08-14 13:16:41 +05:30
sayliraut
e7704c22b8 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-14 13:16:10 +05:30
sayliraut
4b0537af70 changse 2024-08-14 13:15:59 +05:30
Sayli Raut
f4943d9b2b Merge pull request #448 from WDI-Ideas/sayli
Sayli
2024-08-14 13:06:27 +05:30
sayliraut
87ece61e06 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-14 13:06:00 +05:30
sayliraut
17390bf873 changes 2024-08-14 13:05:48 +05:30
Sayli Raut
5927f32a8e Merge pull request #447 from WDI-Ideas/sayli
changes
2024-08-13 19:16:31 +05:30
sayliraut
6aff746e2b changes 2024-08-13 19:16:02 +05:30
Sayli Raut
fb3b95b1ba Merge pull request #446 from WDI-Ideas/sayli
Sayli
2024-08-12 16:18:25 +05:30
sayliraut
11f8b03075 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-12 16:17:54 +05:30
sayliraut
d2e1ff1fd3 changes 2024-08-12 16:17:45 +05:30
sayliraut
0351840e0c changes 2024-08-12 16:12:44 +05:30
Sayli Raut
9db365a3eb Merge pull request #445 from WDI-Ideas/sayli
Changes
2024-08-12 16:05:41 +05:30
sayliraut
b1da47eb24 Changes 2024-08-12 16:05:03 +05:30
Sayli Raut
11d00eb076 Merge pull request #444 from WDI-Ideas/sayli
Sayli
2024-08-12 16:02:58 +05:30
sayliraut
5cc4f0d0ea Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-12 16:02:34 +05:30
sayliraut
bf2c992911 changes 2024-08-12 16:02:22 +05:30
Sayli Raut
3af56e90e7 Merge pull request #443 from WDI-Ideas/sayli
Sayli
2024-08-12 15:57:07 +05:30
sayliraut
a3284c9688 changes 2024-08-12 15:56:04 +05:30
sayliraut
43be39c47f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-12 15:17:53 +05:30
sayliraut
6036f0e2ad changes 2024-08-12 15:17:41 +05:30
Sayli Raut
4d755c7630 Merge pull request #442 from WDI-Ideas/sayli
Sayli
2024-08-12 15:13:24 +05:30
sayliraut
a8d0393cb4 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-12 15:12:50 +05:30
sayliraut
c686993103 Changes 2024-08-12 15:12:39 +05:30
Sayli Raut
4a167e4a12 Merge pull request #441 from WDI-Ideas/sayli
Sayli
2024-08-12 13:55:06 +05:30
sayliraut
01fc617229 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-12 13:54:36 +05:30
sayliraut
79f5af0cf3 changes 2024-08-12 13:54:28 +05:30
Sayli Raut
cf778142d3 Merge pull request #440 from WDI-Ideas/sayli
Sayli
2024-08-12 13:49:20 +05:30
sayliraut
a8b6baaaff Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-12 13:48:53 +05:30
sayliraut
6d926b495e changes 2024-08-12 13:48:43 +05:30
sayliraut
6160919166 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-09 13:22:55 +05:30
sayliraut
029e25f4a2 bug 2024-08-09 13:22:47 +05:30
Sayli Raut
e576d43edb Merge pull request #439 from WDI-Ideas/sayli
Sayli
2024-08-09 13:21:27 +05:30
sayliraut
5b6c8a8e51 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-08 19:40:40 +05:30
sayliraut
31a014505f changes 2024-08-08 19:40:31 +05:30
Sayli Raut
5d9a051b4a Merge pull request #438 from WDI-Ideas/sayli
Sayli
2024-08-08 19:39:08 +05:30
sayliraut
85fc5692e6 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-08 12:35:18 +05:30
sayliraut
e78930117f changes 2024-08-08 12:35:08 +05:30
Sayli Raut
a6d7cc5a3d Merge pull request #437 from WDI-Ideas/sayli
Sayli
2024-08-08 12:33:49 +05:30
sayliraut
a716f6a61d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-07 19:16:30 +05:30
sayliraut
fe410c6501 get restaurant hours helper function 2024-08-07 19:16:18 +05:30
Sayli Raut
9fc03f7637 Merge pull request #436 from WDI-Ideas/sayli
Sayli
2024-08-07 19:15:02 +05:30
sayliraut
ccee9fc3e1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-07 17:38:30 +05:30
sayliraut
7b9b92bc9f changes 2024-08-07 17:38:23 +05:30
Sayli Raut
8c593f00b5 Merge pull request #435 from WDI-Ideas/sayli
Sayli
2024-08-07 17:36:53 +05:30
sayliraut
844a932b2f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-07 16:31:06 +05:30
sayliraut
15c2322a8b changes 2024-08-07 16:30:52 +05:30
Sayli Raut
8e1a546814 Merge pull request #434 from WDI-Ideas/sayli
Sayli
2024-08-07 16:29:35 +05:30
sayliraut
9a0d833993 changes 2024-08-07 14:54:37 +05:30
Sayli Raut
8bfb4ce86d Merge pull request #433 from WDI-Ideas/sayli
changes
2024-08-07 14:53:31 +05:30
Hritikkk9
f0bf98e211 Merge pull request #432 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-07 11:46:05 +05:30
Hritikkk9
2feaf50e96 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-08-07 11:44:58 +05:30
Hritikkk9
1b7aa59054 open close key updated 2024-08-07 11:44:48 +05:30
Sayli Raut
2ba787237b Merge pull request #431 from WDI-Ideas/sayli
Sayli
2024-08-06 19:35:48 +05:30
sayliraut
4fc13f3a22 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-06 19:37:03 +05:30
sayliraut
dc315ffc2f changes 2024-08-06 19:36:55 +05:30
sayliraut
ad1ef6c204 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-06 19:12:49 +05:30
sayliraut
ddb4b6379f Changes 2024-08-06 19:12:38 +05:30
Sayli Raut
e82cc78f3a Merge pull request #430 from WDI-Ideas/sayli
Sayli
2024-08-06 19:11:22 +05:30
sayliraut
3fce81ba95 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-06 17:20:22 +05:30
sayliraut
a6ec410322 changes 2024-08-06 17:20:13 +05:30
Sayli Raut
9448e8796b Merge pull request #429 from WDI-Ideas/sayli
Sayli
2024-08-06 17:18:52 +05:30
sayliraut
5dcd85f0d9 changes 2024-08-06 17:15:55 +05:30
Sayli Raut
ba4f07993b Merge pull request #428 from WDI-Ideas/sayli
changes
2024-08-06 17:14:43 +05:30
Sayli Raut
3a5d9cdd0d Merge pull request #427 from WDI-Ideas/sayli
Sayli
2024-08-06 16:41:33 +05:30
sayliraut
666ed5dcd7 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-06 16:42:53 +05:30
sayliraut
d9b528ba86 changes 2024-08-06 16:42:44 +05:30
sayliraut
7b45532884 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-06 14:49:08 +05:30
sayliraut
d351eceba4 changes 2024-08-06 14:48:59 +05:30
Sayli Raut
306839b182 Merge pull request #426 from WDI-Ideas/sayli
Sayli
2024-08-06 14:47:37 +05:30
Hritikkk9
bae2423539 Merge pull request #425 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-06 11:22:11 +05:30
Hritikkk9
81563d32aa subscription data updatess nre 2024-08-06 11:21:33 +05:30
Hritikkk9
508bc37e05 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-08-06 11:20:13 +05:30
Hritikkk9
20e0c4599c subscription data updated 2024-08-06 11:20:06 +05:30
sayliraut
57d92e8ccc Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-06 11:14:47 +05:30
sayliraut
1adb6dc55b changes 2024-08-06 11:14:38 +05:30
Sayli Raut
ba1fa566b3 Merge pull request #424 from WDI-Ideas/sayli
Sayli
2024-08-06 11:13:35 +05:30
Hritikkk9
872ac5661c Merge pull request #423 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-05 18:53:17 +05:30
Hritikkk9
45e4b5cc2e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-08-05 18:51:05 +05:30
Hritikkk9
c8c9a2912d other changes 2024-08-05 18:50:59 +05:30
sayliraut
e96054d612 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-05 18:42:59 +05:30
sayliraut
8fbb3d76c6 changes 2024-08-05 18:42:46 +05:30
Sayli Raut
8e56b3d824 Merge pull request #422 from WDI-Ideas/sayli
Sayli
2024-08-05 18:41:38 +05:30
Hritikkk9
33429d5704 referral code added conflickt 2024-08-05 17:55:19 +05:30
Hritikkk9
f6fbbbf970 referral code added 2024-08-05 16:41:27 +05:30
sayliraut
8aaa3e221c Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-05 12:19:54 +05:30
sayliraut
35a4d47ca6 changes 2024-08-05 12:19:45 +05:30
Sayli Raut
d28f420bbf Merge pull request #421 from WDI-Ideas/sayli
Sayli
2024-08-05 12:18:28 +05:30
sayliraut
038497ccf3 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-02 19:43:33 +05:30
sayliraut
975853c22d changes 2024-08-02 19:43:21 +05:30
Sayli Raut
c7b8bcb5c3 Merge pull request #420 from WDI-Ideas/sayli
Sayli
2024-08-02 19:42:04 +05:30
Hritikkk9
e1dafb509f Merge pull request #419 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-02 17:12:42 +05:30
Hritikkk9
06a823b7d6 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-08-02 17:12:02 +05:30
Hritikkk9
d0ed063a42 minor changes 2024-08-02 17:11:52 +05:30
Hritikkk9
da8fae2343 Merge pull request #418 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-02 16:43:51 +05:30
Hritikkk9
b4fcf211c1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-08-02 16:42:04 +05:30
Hritikkk9
51d28709bc referral user updated 2024-08-02 16:41:58 +05:30
Hritikkk9
80c73c98ec Merge pull request #417 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-02 16:36:24 +05:30
Hritikkk9
7d7cfeb8b7 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-08-02 16:35:55 +05:30
Hritikkk9
90519e7e00 subscription Module Updated ooo 2024-08-02 16:35:51 +05:30
Hritikkk9
41223879d2 Merge pull request #416 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-02 16:34:36 +05:30
Hritikkk9
01d017d131 referral updated 2024-08-02 16:33:51 +05:30
Hritikkk9
66367d405a referral updated 2024-08-02 16:32:30 +05:30
sayliraut
a3e4593812 changes 2024-08-02 16:02:52 +05:30
Sayli Raut
22fbf0a365 Merge pull request #415 from WDI-Ideas/sayli
changes
2024-08-02 16:01:43 +05:30
Sayli Raut
1dc3e8e264 Merge pull request #414 from WDI-Ideas/sayli
Sayli
2024-08-02 15:20:44 +05:30
sayliraut
8af2e01e97 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-02 15:22:04 +05:30
sayliraut
d44e651894 changes 2024-08-02 15:21:50 +05:30
Hritikkk9
fb0414f368 Merge pull request #413 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-02 15:09:01 +05:30
Hritikkk9
58f965da76 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-08-02 14:52:51 +05:30
Hritikkk9
36caf1a54d subscription Module Updated 2024-08-02 14:52:42 +05:30
sayliraut
38e666c4a0 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-02 13:22:17 +05:30
sayliraut
9f5438980c changes 2024-08-02 13:22:08 +05:30
Sayli Raut
fbc719ba13 Merge pull request #412 from WDI-Ideas/sayli
Sayli
2024-08-02 13:20:55 +05:30
sayliraut
d1f8b6fa86 changes 2024-08-02 11:25:33 +05:30
Sayli Raut
64f8538b43 Merge pull request #411 from WDI-Ideas/sayli
changes
2024-08-02 11:24:33 +05:30
Sayli Raut
661b29fbdc Merge pull request #410 from WDI-Ideas/sayli
Sayli
2024-08-01 17:52:40 +05:30
sayliraut
368f375eaa Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-01 17:53:59 +05:30
sayliraut
f79bf19bfc changes 2024-08-01 17:53:51 +05:30
sayliraut
a3827f8b8d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-01 17:31:21 +05:30
sayliraut
6a8ade88fa changes 2024-08-01 17:31:12 +05:30
Sayli Raut
25964bb471 Merge pull request #409 from WDI-Ideas/sayli
Sayli
2024-08-01 17:29:58 +05:30
sayliraut
d0788543cd changes 2024-08-01 16:48:52 +05:30
Sayli Raut
489c79d421 Merge pull request #408 from WDI-Ideas/sayli
Sayli
2024-08-01 16:47:54 +05:30
sayliraut
e2141fb7c3 changes 2024-08-01 16:46:51 +05:30
Hritikkk9
9b67dcdc8d Merge pull request #407 from WDI-Ideas/HritikCheers
Hritik cheers
2024-08-01 15:05:52 +05:30
Hritikkk9
a3677a22da Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-08-01 15:05:06 +05:30
Hritikkk9
64eeba054f subscription feedbacke updated 2024-08-01 15:04:57 +05:30
sayliraut
7e722421ae Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-01 12:32:13 +05:30
sayliraut
a667aac49a changes 2024-08-01 12:32:04 +05:30
Sayli Raut
7e17c5b6e8 Merge pull request #406 from WDI-Ideas/sayli
Sayli
2024-08-01 12:30:53 +05:30
sayliraut
ff8ebad56a Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-08-01 12:25:47 +05:30
sayliraut
17800867b8 changes 2024-08-01 12:25:39 +05:30
Sayli Raut
bc0945f70e Merge pull request #405 from WDI-Ideas/sayli
Sayli
2024-08-01 12:24:32 +05:30
sayliraut
dc5cabe495 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-31 11:32:00 +05:30
sayliraut
5b927df6f3 changes 2024-07-31 11:31:14 +05:30
Sayli Raut
513facba64 Merge pull request #404 from WDI-Ideas/sayli
Sayli
2024-07-31 11:30:56 +05:30
sayliraut
202e25963d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-30 18:02:42 +05:30
sayliraut
c0c521451e changes 2024-07-30 18:02:33 +05:30
Sayli Raut
75cee21685 Merge pull request #403 from WDI-Ideas/sayli
Sayli
2024-07-30 18:01:22 +05:30
sayliraut
34a6227abf Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-30 16:52:42 +05:30
sayliraut
1121c5c2db changes 2024-07-30 16:52:32 +05:30
Sayli Raut
a6c155044a Merge pull request #402 from WDI-Ideas/sayli
Sayli
2024-07-30 16:51:24 +05:30
sayliraut
7e846dac5b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-30 16:16:06 +05:30
sayliraut
613fb987a3 changes 2024-07-30 16:15:52 +05:30
Sayli Raut
fb71b81016 Merge pull request #401 from WDI-Ideas/sayli
Sayli
2024-07-30 16:14:56 +05:30
sayliraut
e7e800569f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-30 15:58:33 +05:30
sayliraut
83e2eeabe0 changes 2024-07-30 15:58:22 +05:30
Sayli Raut
a65af42d8e Merge pull request #400 from WDI-Ideas/sayli
Sayli
2024-07-30 15:57:19 +05:30
sayliraut
b5f5135e3d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-30 15:41:09 +05:30
sayliraut
bafd01c2fc changes 2024-07-30 15:40:54 +05:30
Sayli Raut
8a725ee0f5 Merge pull request #399 from WDI-Ideas/sayli
Sayli
2024-07-30 15:39:54 +05:30
sayliraut
4c6b80d18d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-30 15:10:07 +05:30
sayliraut
76c626da23 changes 2024-07-30 15:09:57 +05:30
Sayli Raut
6a96c73f1f Merge pull request #398 from WDI-Ideas/sayli
Sayli
2024-07-30 15:08:52 +05:30
sayliraut
1c3a7a2f4c Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-30 11:33:34 +05:30
sayliraut
525fe5af50 changes 2024-07-30 11:33:23 +05:30
Sayli Raut
600be67ab7 Merge pull request #397 from WDI-Ideas/sayli
Sayli
2024-07-30 11:32:45 +05:30
sayliraut
e0edbb98c1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-29 15:05:20 +05:30
sayliraut
74c77f6b0f date format changes 2024-07-29 15:05:11 +05:30
Sayli Raut
67cea1a47f Merge pull request #396 from WDI-Ideas/sayli
Sayli
2024-07-29 15:04:09 +05:30
sayliraut
27719f3c99 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-29 11:12:41 +05:30
Sayli Raut
dc239f907e Merge pull request #395 from WDI-Ideas/sayli
Sayli
2024-07-29 11:12:32 +05:30
sayliraut
4bbebe58f3 changes 2024-07-29 11:12:31 +05:30
Sayli Raut
87364d48ea Merge pull request #394 from WDI-Ideas/sayli
Sayli
2024-07-27 15:18:46 +05:30
sayliraut
d8a394c083 changes 2024-07-27 15:18:00 +05:30
sayliraut
ff8d524599 changes 2024-07-27 15:17:16 +05:30
Sayli Raut
75b6f9f4ca Merge pull request #393 from WDI-Ideas/sayli
Sayli
2024-07-27 15:12:56 +05:30
sayliraut
c5259d3964 chnages 2024-07-27 15:12:17 +05:30
sayliraut
819d9abb97 chnages 2024-07-27 15:10:43 +05:30
Sayli Raut
102722caaa Merge pull request #392 from WDI-Ideas/sayli
Sayli
2024-07-27 10:41:12 +05:30
sayliraut
03a2dd02ab change 2024-07-27 10:35:52 +05:30
sayliraut
d14abf8a58 changes 2024-07-27 10:34:39 +05:30
Sayli Raut
16ee1144d3 Merge pull request #391 from WDI-Ideas/sayli
changes
2024-07-27 10:30:32 +05:30
sayliraut
4314cdbb80 changes 2024-07-27 10:26:20 +05:30
sayliraut
05738e57cb Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-26 19:13:24 +05:30
sayliraut
8fc344a763 changes 2024-07-26 19:13:15 +05:30
Sayli Raut
b6524d6f51 Merge pull request #390 from WDI-Ideas/sayli
Sayli
2024-07-26 19:12:14 +05:30
sayliraut
4c6cefbb5e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-26 14:47:09 +05:30
sayliraut
bde503cb11 changes 2024-07-26 14:46:59 +05:30
Sayli Raut
b5afa4f041 Merge pull request #389 from WDI-Ideas/sayli
Sayli
2024-07-26 14:45:59 +05:30
Hritikkk9
90d1761da1 Merge pull request #388 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-26 13:03:38 +05:30
Hritikkk9
7a509c2215 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-26 13:02:37 +05:30
Hritikkk9
9aa0c6e9d3 sub ui updated 2024-07-26 13:02:26 +05:30
Hritikkk9
3cc6b5710c Merge pull request #387 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-26 11:24:59 +05:30
Hritikkk9
e53f20eb92 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-26 11:21:16 +05:30
Hritikkk9
864cf755ee user id updated 2024-07-26 11:21:09 +05:30
Hritikkk9
05e18dbcb0 Merge pull request #386 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-26 11:07:51 +05:30
Hritikkk9
7291b216b1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-26 11:05:52 +05:30
Hritikkk9
42660ef409 height updated 2024-07-26 11:05:46 +05:30
Hritikkk9
8c6c39373b Merge pull request #385 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-25 19:11:25 +05:30
Hritikkk9
cf021b5ba4 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-25 19:10:48 +05:30
Hritikkk9
de7ef119b1 subscription updated new 2024-07-25 19:10:42 +05:30
Hritikkk9
eef99c6cf2 Merge pull request #384 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-25 17:48:33 +05:30
Hritikkk9
3e73528089 subscription updated ag 2024-07-25 17:47:26 +05:30
Hritikkk9
e0ce641fc4 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-25 17:47:05 +05:30
Hritikkk9
300f48818e subscription updated agagin 2024-07-25 17:46:56 +05:30
Hritikkk9
6a3565c3bc Merge pull request #383 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-25 15:49:53 +05:30
Hritikkk9
fbbe48826e sub updated3 2024-07-25 15:49:07 +05:30
Hritikkk9
0c633df862 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-25 15:48:34 +05:30
Hritikkk9
7d1aa67898 sub updated 2024-07-25 15:48:21 +05:30
CodewithSayali
239693059b Merge pull request #382 from WDI-Ideas/sayaliP
Sayali p
2024-07-25 15:43:09 +05:30
sayaliparab
0f85a77dfb Changes 2024-07-25 15:41:47 +05:30
sayaliparab
fea7d5134a changes 2024-07-25 15:41:21 +05:30
sayliraut
9b99377117 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-25 15:21:44 +05:30
sayliraut
1afbb7f900 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-25 15:20:52 +05:30
sayliraut
f56bb41405 changes in about us 2024-07-25 15:20:42 +05:30
Sayli Raut
1c00ff6bfb Merge pull request #381 from WDI-Ideas/sayli
Sayli
2024-07-25 15:20:34 +05:30
CodewithSayali
5a41d0b81c Merge pull request #380 from WDI-Ideas/sayaliP
Sayali p
2024-07-25 15:19:33 +05:30
sayaliparab
b96724518b changes 2024-07-25 15:18:33 +05:30
sayaliparab
1415e94de5 rest 2024-07-25 15:18:02 +05:30
Hritikkk9
0e73c08647 Merge pull request #379 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-25 14:57:02 +05:30
Hritikkk9
5e306ae7c2 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-25 14:56:13 +05:30
Hritikkk9
f69a0f7df1 subscription updated 2024-07-25 14:56:04 +05:30
CodewithSayali
f98d56761d Merge pull request #378 from WDI-Ideas/sayaliP
Sayali p
2024-07-25 14:54:59 +05:30
sayaliparab
a50e46e238 referral 2024-07-25 14:52:54 +05:30
sayaliparab
65d6c679f3 referral 2024-07-25 14:52:22 +05:30
Hritikkk9
33ef6a71d6 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-25 13:23:59 +05:30
Sayli Raut
966fc691b0 Merge pull request #377 from WDI-Ideas/sayli
Sayli
2024-07-25 11:45:47 +05:30
sayliraut
f92763e059 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-25 11:43:58 +05:30
sayliraut
9a84532d75 design changes 2024-07-25 11:43:42 +05:30
sayliraut
a27a8f1459 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-24 16:08:31 +05:30
sayliraut
0c456d347a chnages 2024-07-24 16:08:21 +05:30
Sayli Raut
33178b7103 Merge pull request #376 from WDI-Ideas/sayli
Sayli
2024-07-24 16:07:25 +05:30
CodewithSayali
e3c7808fb9 Merge pull request #375 from WDI-Ideas/sayaliP
Sayali p
2024-07-24 15:40:37 +05:30
sayaliparab
1af5968001 referral 2024-07-24 15:39:30 +05:30
sayaliparab
a543e1f8e5 referral 2024-07-24 15:37:11 +05:30
sayliraut
11d65029a9 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-24 14:54:38 +05:30
sayliraut
2ec9ea5b92 changes 2024-07-24 14:54:29 +05:30
Sayli Raut
158ef13f81 Merge pull request #374 from WDI-Ideas/sayli
Sayli
2024-07-24 14:53:46 +05:30
sayliraut
b0e083df6d changes 2024-07-24 14:44:32 +05:30
sayliraut
cdc1c1cb23 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-24 14:43:42 +05:30
Sayli Raut
2f75acb2a6 Merge pull request #373 from WDI-Ideas/sayli
Sayli
2024-07-24 14:43:36 +05:30
sayliraut
fc46b30f8a changes 2024-07-24 14:43:32 +05:30
Sayli Raut
f7f2947982 Merge pull request #372 from WDI-Ideas/sayli
Sayli
2024-07-24 13:53:01 +05:30
sayliraut
fa30efe9c0 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-24 13:52:30 +05:30
sayliraut
8325bbc815 changes 2024-07-24 13:52:20 +05:30
sayliraut
96d598d42b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-24 13:44:58 +05:30
sayliraut
27d6764fbc changes 2024-07-24 13:44:21 +05:30
Sayli Raut
0cc0f87b75 Merge pull request #371 from WDI-Ideas/sayli
Sayli
2024-07-24 13:43:58 +05:30
CodewithSayali
132439f291 Merge pull request #370 from WDI-Ideas/sayaliP
Sayali p
2024-07-24 13:40:36 +05:30
sayaliparab
f2f8ef2fda changesIndollar 2024-07-24 13:39:17 +05:30
sayaliparab
f84d79d09c changesIncustomer 2024-07-24 13:38:45 +05:30
sayliraut
237d3172c1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-24 13:37:06 +05:30
sayliraut
e3bcd5321e sub_admin 2024-07-24 13:36:56 +05:30
Sayli Raut
917d566795 Merge pull request #369 from WDI-Ideas/sayli
Sayli
2024-07-24 13:35:58 +05:30
CodewithSayali
13f0a808bb Merge pull request #368 from WDI-Ideas/sayaliP
Sayali p
2024-07-24 08:10:21 +05:30
sayaliparab
b9ccd35742 userRest 2024-07-24 08:08:46 +05:30
sayaliparab
cbda01f160 restUser 2024-07-24 08:08:12 +05:30
CodewithSayali
7caafe8dc8 Merge pull request #367 from WDI-Ideas/sayaliP
fliter
2024-07-23 17:17:06 +05:30
sayaliparab
5929fbdadb fliter 2024-07-23 17:13:20 +05:30
Sayli Raut
cad7ed5396 Merge pull request #366 from WDI-Ideas/sayli
changes
2024-07-23 17:01:54 +05:30
sayliraut
f07f00e89c changes 2024-07-23 17:02:42 +05:30
Hritikkk9
8b639f240e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-23 12:16:48 +05:30
CodewithSayali
681b91862a Merge pull request #365 from WDI-Ideas/sayaliP
Sayali p
2024-07-22 19:56:24 +05:30
sayaliparab
d8fd11ed4f Restchanges 2024-07-22 19:54:58 +05:30
sayaliparab
cca6aefd5c restchanges 2024-07-22 19:54:00 +05:30
Sayli Raut
2d771f2170 Merge pull request #364 from WDI-Ideas/sayli
Sayli
2024-07-22 17:52:18 +05:30
sayliraut
05dec2db37 referral rule API 2024-07-22 17:53:12 +05:30
sayliraut
e061d3f670 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-22 16:09:03 +05:30
CodewithSayali
c4c6e304be Merge pull request #363 from WDI-Ideas/sayaliP
Sayali p
2024-07-22 16:03:41 +05:30
sayaliparab
362036606d referralRules 2024-07-22 16:02:45 +05:30
sayaliparab
deb6ae0488 rulereferral 2024-07-22 16:02:15 +05:30
sayliraut
657b5e962a changes 2024-07-22 15:35:03 +05:30
CodewithSayali
454b254568 Merge pull request #362 from WDI-Ideas/sayaliP
Sayali p
2024-07-22 13:34:19 +05:30
sayaliparab
2d0d6c71eb excelCustom 2024-07-22 13:32:25 +05:30
sayaliparab
c8bb3ea999 CustomerExcelchanges 2024-07-22 13:31:54 +05:30
Sayli Raut
87dfcc4e81 Merge pull request #361 from WDI-Ideas/sayli
Sayli
2024-07-22 13:24:51 +05:30
sayliraut
aa17412214 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-22 13:25:54 +05:30
sayliraut
f2ac46db19 changes 2024-07-22 13:25:42 +05:30
sayliraut
e1b8cdd57f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-19 19:19:42 +05:30
sayliraut
895f1466ab change 2024-07-19 19:19:20 +05:30
Sayli Raut
6bf1a1bf4a Merge pull request #360 from WDI-Ideas/sayli
Sayli
2024-07-19 19:18:55 +05:30
sayliraut
50d4996ec6 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-19 19:14:36 +05:30
sayliraut
6a1520c5d6 notification changes 2024-07-19 19:14:23 +05:30
Sayli Raut
2c0030e37c Merge pull request #359 from WDI-Ideas/sayli
Sayli
2024-07-19 19:13:37 +05:30
CodewithSayali
5180f7267e Merge pull request #358 from WDI-Ideas/sayaliP
Sayali p
2024-07-19 13:35:37 +05:30
sayaliparab
84b1dbcaa4 ReportChanges 2024-07-19 13:33:56 +05:30
sayaliparab
f2daffaee5 rportChanges 2024-07-19 13:33:10 +05:30
sayliraut
4523ac7cef Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-18 16:34:07 +05:30
sayliraut
22fa66f56f changes 2024-07-18 16:33:56 +05:30
Sayli Raut
05a502b126 Merge pull request #357 from WDI-Ideas/sayli
Sayli
2024-07-18 16:33:43 +05:30
sayliraut
1d1b9a4206 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-18 16:22:00 +05:30
Sayli Raut
f2771132ba Merge pull request #356 from WDI-Ideas/sayli
Sayli
2024-07-18 16:21:34 +05:30
sayliraut
5399d2814b notification 2024-07-18 16:14:58 +05:30
CodewithSayali
fb862c47ea Merge pull request #355 from WDI-Ideas/sayaliP
Sayali p
2024-07-18 15:37:51 +05:30
sayaliparab
551ecccef9 SubadminChanges 2024-07-18 15:36:56 +05:30
sayaliparab
89fb83ae5d ChagesSubadmin 2024-07-18 15:36:01 +05:30
CodewithSayali
cd21513553 Merge pull request #354 from WDI-Ideas/sayaliP
Sayali p
2024-07-18 12:26:31 +05:30
sayaliparab
c9844e12b5 RestCreated 2024-07-18 12:21:21 +05:30
sayaliparab
146ffbd337 restRenewal 2024-07-18 12:19:12 +05:30
CodewithSayali
8342002782 Merge pull request #353 from WDI-Ideas/sayaliP
Sayali p
2024-07-18 11:49:49 +05:30
sayaliparab
f2077e77eb reportName 2024-07-18 11:47:46 +05:30
sayaliparab
e1ede21417 reportName 2024-07-18 11:47:17 +05:30
CodewithSayali
8871c6ed22 Merge pull request #352 from WDI-Ideas/sayaliP
Sayali p
2024-07-17 17:58:03 +05:30
sayaliparab
3ecbd11a85 RestExpotChange 2024-07-17 17:55:30 +05:30
sayaliparab
f35c960dfa restExportChanges 2024-07-17 17:55:00 +05:30
sayliraut
534b0d8d29 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 17:54:23 +05:30
sayliraut
99c3cead0c changes 2024-07-17 17:54:13 +05:30
Sayli Raut
ef75aff612 Merge pull request #351 from WDI-Ideas/sayli
Sayli
2024-07-17 17:53:23 +05:30
sayliraut
78984cf9e7 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 17:49:51 +05:30
sayliraut
d1ad9a6e48 changes 2024-07-17 17:49:39 +05:30
Sayli Raut
af1d9f3fdf Merge pull request #350 from WDI-Ideas/sayli
Sayli
2024-07-17 17:48:47 +05:30
CodewithSayali
68838da0ff Merge pull request #349 from WDI-Ideas/sayaliP
Sayali p
2024-07-17 16:12:02 +05:30
sayaliparab
889da666bb restExport 2024-07-17 16:08:24 +05:30
sayaliparab
9889e663af restExport 2024-07-17 16:07:50 +05:30
sayliraut
a7645e499e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 15:58:42 +05:30
sayliraut
c29af1a72a operating hours 2024-07-17 15:58:32 +05:30
Sayli Raut
55fa8997a7 Merge pull request #348 from WDI-Ideas/sayli
Sayli
2024-07-17 15:57:53 +05:30
sayliraut
f50e910970 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 15:41:58 +05:30
sayliraut
4808f0f3a8 changes 2024-07-17 15:41:49 +05:30
Sayli Raut
8ee88b5ef8 Merge pull request #347 from WDI-Ideas/sayli
Sayli
2024-07-17 15:41:00 +05:30
sayliraut
0cd46ad83d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 15:13:48 +05:30
sayliraut
4aa72ebef6 changes 2024-07-17 15:13:37 +05:30
Sayli Raut
1ab57c7727 Merge pull request #346 from WDI-Ideas/sayli
Sayli
2024-07-17 15:12:47 +05:30
sayliraut
ce5edcedbc Changes 2024-07-17 13:22:38 +05:30
Hritikkk9
68810a3d66 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-17 13:02:52 +05:30
Hritikkk9
f93beff03f please wait added 2024-07-17 13:02:43 +05:30
sayliraut
35136b12a7 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 12:45:50 +05:30
sayliraut
6a7d3b05da changes 2024-07-17 12:45:41 +05:30
Sayli Raut
9abdf81109 Merge pull request #345 from WDI-Ideas/sayli
Sayli
2024-07-17 12:44:45 +05:30
sayliraut
93b9559d54 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 12:37:55 +05:30
sayliraut
09d15f09b6 changes 2024-07-17 12:37:47 +05:30
Sayli Raut
da4700bd27 Merge pull request #344 from WDI-Ideas/sayli
Sayli
2024-07-17 12:37:12 +05:30
sayliraut
6a32aad513 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 12:22:05 +05:30
sayliraut
fde8df31e8 changes 2024-07-17 12:21:56 +05:30
Sayli Raut
95fab6022c Merge pull request #343 from WDI-Ideas/sayli
Sayli
2024-07-17 12:21:07 +05:30
sayliraut
b5e6af1005 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-17 12:04:46 +05:30
sayliraut
3d4302d531 changes 2024-07-17 12:04:38 +05:30
Sayli Raut
b2ab6de332 Merge pull request #342 from WDI-Ideas/sayli
Sayli
2024-07-17 12:04:25 +05:30
Sayli Raut
ee39232cc1 Merge pull request #341 from WDI-Ideas/sayli
changes
2024-07-17 11:35:58 +05:30
sayliraut
f3229c6266 changes 2024-07-17 11:27:32 +05:30
Hritikkk9
ad86fb89ce Merge pull request #340 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-16 19:31:48 +05:30
Hritikkk9
a8afd5352c Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-16 19:17:56 +05:30
Hritikkk9
c1833cff98 int val added in time 2024-07-16 19:17:46 +05:30
Hritikkk9
e15a0d1243 Merge pull request #339 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-16 19:12:31 +05:30
Hritikkk9
437a2109a1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-16 19:11:38 +05:30
Hritikkk9
2f220363a1 hours updated 2024-07-16 19:11:19 +05:30
Hritikkk9
797f53a210 Merge pull request #338 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-16 18:59:06 +05:30
Hritikkk9
338d94ccc9 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-16 18:58:28 +05:30
Hritikkk9
85e23ac2d0 restaurant and customer updated 2024-07-16 18:58:17 +05:30
Hritikkk9
850c60ba5f Merge pull request #337 from WDI-Ideas/HritikCheers
unautho
2024-07-16 18:55:46 +05:30
Hritikkk9
c526fcbdad unautho 2024-07-16 18:55:01 +05:30
Hritikkk9
3d9da59c6d other customer 2024-07-16 13:22:12 +00:00
Hritikkk9
459975ea7b Merge pull request #336 from WDI-Ideas/HritikCheers
customer jwt updated
2024-07-16 18:48:52 +05:30
Hritikkk9
4b9e568985 customer jwt updated 2024-07-16 18:48:00 +05:30
Sayli Raut
333089cea1 Merge pull request #335 from WDI-Ideas/sayli
Sayli
2024-07-16 18:00:35 +05:30
sayliraut
b35d1617ea Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-16 18:01:30 +05:30
sayliraut
e5816b00c8 changes 2024-07-16 18:01:20 +05:30
Hritikkk9
97df439c6f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 2024-07-16 12:26:09 +00:00
sayliraut
c81852d661 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-16 17:55:34 +05:30
sayliraut
8d2bc89490 changes 2024-07-16 17:55:22 +05:30
Sayli Raut
72612cbcb1 Merge pull request #334 from WDI-Ideas/sayli
Sayli
2024-07-16 17:54:42 +05:30
Hritikkk9
49833f94fe Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 2024-07-16 12:20:18 +00:00
Hritikkk9
6a00d7119f server up 2024-07-16 12:10:31 +00:00
sayliraut
364be93cdc changes 2024-07-16 17:28:32 +05:30
Hritikkk9
5c184b80ee server changes 2024-07-16 11:11:32 +00:00
CodewithSayali
930176ddb9 Merge pull request #333 from WDI-Ideas/sayaliP
Sayali p
2024-07-16 16:27:07 +05:30
sayaliparab
105245fec1 ReportChanges 2024-07-16 16:25:41 +05:30
sayaliparab
ec964f2ce6 Changesreport 2024-07-16 16:25:10 +05:30
sayliraut
34fb933a12 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-16 15:56:28 +05:30
sayliraut
3c3d2e41a6 changes 2024-07-16 15:56:20 +05:30
Sayli Raut
b93ac105d8 Merge pull request #332 from WDI-Ideas/sayli
Sayli
2024-07-16 15:55:33 +05:30
sayliraut
4f5960c9ae Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-16 13:20:03 +05:30
sayliraut
989b64e505 changes 2024-07-16 13:19:50 +05:30
Sayli Raut
f2bae2622d Merge pull request #331 from WDI-Ideas/sayli
Sayli
2024-07-16 13:19:05 +05:30
sayliraut
bc1c466fd1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-16 12:50:26 +05:30
sayliraut
bab6c3324a changes 2024-07-16 12:50:13 +05:30
Sayli Raut
092f206d60 Merge pull request #330 from WDI-Ideas/sayli
Sayli
2024-07-16 12:49:42 +05:30
Hritikkk9
433c7ba338 Merge pull request #329 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-16 12:43:20 +05:30
Hritikkk9
458a502740 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-16 12:42:38 +05:30
CodewithSayali
7ead79267b Merge pull request #328 from WDI-Ideas/sayaliP
Sayali p
2024-07-16 12:37:14 +05:30
sayaliparab
18867acc2f report 2024-07-16 12:36:12 +05:30
sayaliparab
72491bfd2e Report 2024-07-16 12:35:35 +05:30
Hritikkk9
bf99303876 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-16 12:17:23 +05:30
Hritikkk9
f5e7487877 subscription webhook updated 2024-07-16 12:17:11 +05:30
CodewithSayali
3f0e4a479e Merge pull request #327 from WDI-Ideas/sayaliP
Sayali p
2024-07-15 19:12:48 +05:30
sayaliparab
e2074625e4 reportChanges 2024-07-15 19:11:39 +05:30
sayaliparab
57c4820219 ReportExcel 2024-07-15 19:11:04 +05:30
Sayli Raut
831d19f056 Merge pull request #326 from WDI-Ideas/sayli
Sayli
2024-07-15 18:58:40 +05:30
sayliraut
6b46f22a4d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-15 18:59:28 +05:30
sayliraut
1d6065ce70 changes 2024-07-15 18:59:09 +05:30
sayliraut
fbe06c6900 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-15 17:54:41 +05:30
sayliraut
418278d053 changes 2024-07-15 17:54:33 +05:30
Sayli Raut
80eb0d728b Merge pull request #325 from WDI-Ideas/sayli
Sayli
2024-07-15 17:53:54 +05:30
sayliraut
38cad36f99 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-15 17:26:07 +05:30
sayliraut
ad40740362 changes 2024-07-15 17:25:58 +05:30
Sayli Raut
19c4641ea7 Merge pull request #324 from WDI-Ideas/sayli
Sayli
2024-07-15 17:25:13 +05:30
sayliraut
f15deee72b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-15 16:42:15 +05:30
sayliraut
63f6744068 changes 2024-07-15 16:41:58 +05:30
Sayli Raut
7fa338eba1 Merge pull request #323 from WDI-Ideas/sayli
Sayli
2024-07-15 16:41:18 +05:30
CodewithSayali
9d59702dc3 Merge pull request #322 from WDI-Ideas/sayaliP
Sayali p
2024-07-15 15:43:10 +05:30
sayaliparab
63b0a6a990 RecentTrans 2024-07-15 15:41:53 +05:30
sayaliparab
5dc57eaa83 recentTrans 2024-07-15 15:41:18 +05:30
sayliraut
94f65baea6 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-15 12:29:26 +05:30
sayliraut
62c505c11a changes 2024-07-15 12:29:18 +05:30
Sayli Raut
3751541754 Merge pull request #321 from WDI-Ideas/sayli
Sayli
2024-07-15 12:28:25 +05:30
sayliraut
f019b7429e changes 2024-07-15 11:23:12 +05:30
Sayli Raut
cc91181cc3 Merge pull request #320 from WDI-Ideas/sayli
changes
2024-07-15 11:22:28 +05:30
Sayli Raut
63b251ff32 Merge pull request #319 from WDI-Ideas/sayli
Sayli
2024-07-12 19:26:05 +05:30
sayliraut
d49a66bc1b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-12 19:27:02 +05:30
sayliraut
f73d4212f0 changes in notification 2024-07-12 19:26:50 +05:30
Hritikkk9
3d94692b39 Merge pull request #318 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-12 19:18:35 +05:30
Hritikkk9
9156be0de1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-12 19:17:27 +05:30
Hritikkk9
563246bd54 google place api controller updated 2024-07-12 19:17:19 +05:30
sayliraut
3d52559366 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-12 17:19:33 +05:30
Sayli Raut
4299c55178 Merge pull request #317 from WDI-Ideas/sayli
Sayli
2024-07-12 17:19:16 +05:30
sayliraut
ef48a5fd9d changes 2024-07-12 17:19:05 +05:30
CodewithSayali
f1f4991aec Merge pull request #316 from WDI-Ideas/sayaliP
Sayali p
2024-07-12 16:58:39 +05:30
sayaliparab
4e18854a28 report 2024-07-12 16:57:40 +05:30
sayaliparab
fcbc7639c1 report 2024-07-12 16:57:11 +05:30
CodewithSayali
770380878d Merge pull request #315 from WDI-Ideas/sayaliP
Sayali p
2024-07-12 15:27:19 +05:30
sayaliparab
376501f090 Export 2024-07-12 15:26:24 +05:30
sayaliparab
7a164f39f5 exportExcecl 2024-07-12 15:25:46 +05:30
CodewithSayali
28a4007da9 Merge pull request #314 from WDI-Ideas/sayaliP
Sayali p
2024-07-11 20:15:12 +05:30
sayaliparab
3f5dee257e ReportOfrefree 2024-07-11 20:13:27 +05:30
sayaliparab
7839959168 finalExcel 2024-07-11 20:12:55 +05:30
CodewithSayali
ad8a61611e Merge pull request #313 from WDI-Ideas/sayaliP
Sayali p
2024-07-11 20:05:52 +05:30
sayaliparab
284a1e11dc Referrs 2024-07-11 19:58:49 +05:30
sayaliparab
e0f0440f22 Referr 2024-07-11 19:56:53 +05:30
sayliraut
9d57f8a5d2 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-11 19:42:58 +05:30
sayliraut
1ff71dc65d subscription status 2024-07-11 19:42:48 +05:30
Sayli Raut
d650a79a99 Merge pull request #312 from WDI-Ideas/sayli
Sayli
2024-07-11 19:42:38 +05:30
Hritikkk9
474cd5a99d Merge pull request #311 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 18:01:39 +05:30
Hritikkk9
65096a5c61 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 18:01:02 +05:30
Hritikkk9
c104da1a11 subscription faq added-2 2024-07-11 18:00:57 +05:30
Hritikkk9
ea5911c6cf Merge pull request #310 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 18:00:31 +05:30
Hritikkk9
5bfb7bcdbd Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 17:59:18 +05:30
Hritikkk9
315da27c38 subscription faq added 2024-07-11 17:59:09 +05:30
Sayli Raut
5f4a1c12aa Merge pull request #309 from WDI-Ideas/sayli
Sayli
2024-07-11 17:17:03 +05:30
sayliraut
99f6657008 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-11 17:12:16 +05:30
sayliraut
797813221a changes 2024-07-11 17:10:34 +05:30
Hritikkk9
e8b1f2956f Merge pull request #308 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 17:10:01 +05:30
Hritikkk9
250ac11453 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 17:09:24 +05:30
Hritikkk9
b94647b055 Renewal amount 2024-07-11 16:53:15 +05:30
Hritikkk9
d4ac78bfee Merge pull request #307 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 16:51:28 +05:30
Hritikkk9
361145bb0f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 16:50:20 +05:30
Hritikkk9
06517f4c4a Renewal amount added 2024-07-11 16:50:15 +05:30
Hritikkk9
e5b7b4d3a4 Merge pull request #306 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 16:37:33 +05:30
Hritikkk9
532ab8b651 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 16:36:59 +05:30
Hritikkk9
a58ef55c1d Renewal amount added 2024-07-11 16:36:53 +05:30
Hritikkk9
ffade2dd6a amount divide by 100 2024-07-11 16:34:41 +05:30
Hritikkk9
819ea4efe8 Merge pull request #305 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 16:31:34 +05:30
Hritikkk9
b7adf8c0c4 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 16:30:53 +05:30
Hritikkk9
70c3d7456e fillable removed 2024-07-11 16:30:46 +05:30
Hritikkk9
907d6dddc4 Merge pull request #304 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 16:21:43 +05:30
Hritikkk9
e8dc0f2931 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 16:21:15 +05:30
Hritikkk9
8500eb6535 webhook updated 2024-07-11 16:21:05 +05:30
sayliraut
3781cc027f dashboard changes 2024-07-11 16:05:22 +05:30
sayaliparab
a59f3d723d Recent 2024-07-11 15:11:37 +05:30
sayaliparab
60a841498d Recent 2024-07-11 15:11:05 +05:30
Hritikkk9
494e1eca80 Merge pull request #303 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 15:04:23 +05:30
Hritikkk9
7cf9bf0c54 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 15:03:32 +05:30
Hritikkk9
a5062ff1c1 referaal user subscription data updated 2024-07-11 15:03:25 +05:30
Hritikkk9
65c22ace01 Merge pull request #302 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 14:56:39 +05:30
Hritikkk9
f5fa754532 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 14:55:59 +05:30
Hritikkk9
d479cdf869 30 day 2024-07-11 14:55:52 +05:30
Hritikkk9
0bd8c3d88f Merge pull request #301 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 14:49:30 +05:30
Hritikkk9
53cdc96c6d 30 days added new 2024-07-11 14:48:45 +05:30
Hritikkk9
9b7916b5ab Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 14:47:04 +05:30
Hritikkk9
47c8db98b6 30 days added 2024-07-11 14:46:56 +05:30
Hritikkk9
af7319e0dd Merge pull request #300 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 13:57:54 +05:30
Hritikkk9
e973c25958 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 13:57:18 +05:30
Hritikkk9
613ef95a84 subscription webhook updated with multiple referral 2024-07-11 13:57:10 +05:30
Hritikkk9
aef89afb18 Merge pull request #299 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 13:16:37 +05:30
Hritikkk9
11adc43d6d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 13:14:32 +05:30
Hritikkk9
74f51721cb subscription webhook updated 2024-07-11 13:14:25 +05:30
sayliraut
4f63083faa Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-11 12:26:02 +05:30
sayliraut
a67837b393 changes 2024-07-11 12:25:53 +05:30
Sayli Raut
2436ce0516 Merge pull request #298 from WDI-Ideas/sayli
Sayli
2024-07-11 12:25:19 +05:30
sayliraut
88e05c423a Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-11 12:01:20 +05:30
sayliraut
9c9d9f0a65 notification changes 2024-07-11 12:01:08 +05:30
Sayli Raut
8b6dc4cadb Merge pull request #297 from WDI-Ideas/sayli
Sayli
2024-07-11 12:00:32 +05:30
Hritikkk9
8df19d5abe Merge pull request #296 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 11:48:15 +05:30
Hritikkk9
2d03551719 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 11:47:37 +05:30
Hritikkk9
3f9f711565 date updated 2024-07-11 11:47:31 +05:30
Hritikkk9
3ff23ed7a3 Merge pull request #295 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-11 11:27:36 +05:30
Hritikkk9
493a3facbe Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-11 11:25:00 +05:30
Hritikkk9
814f491513 subscription updated 2024-07-11 11:24:51 +05:30
sayliraut
ded3ea50f6 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-10 17:15:59 +05:30
sayliraut
da6dc78ccf changes 2024-07-10 17:15:48 +05:30
Sayli Raut
a2251b779d Merge pull request #294 from WDI-Ideas/sayli
Sayli
2024-07-10 17:15:10 +05:30
Hritikkk9
475be7db85 Merge pull request #293 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-10 16:53:32 +05:30
Hritikkk9
7c3a811d8b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-10 16:51:33 +05:30
Hritikkk9
6daeca0628 subscription module updated 2024-07-10 16:50:45 +05:30
Hritikkk9
1a575539ce subscription Webhook Updated 2024-07-10 16:39:32 +05:30
sayliraut
b1ea9d07cb Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-10 15:05:13 +05:30
sayliraut
f80cb1194e changes 2024-07-10 15:05:03 +05:30
Sayli Raut
1a5ce47d81 Merge pull request #292 from WDI-Ideas/sayli
Sayli
2024-07-10 15:04:21 +05:30
CodewithSayali
cf2edb06d6 Merge pull request #291 from WDI-Ideas/sayaliP
Sayali p
2024-07-10 14:55:08 +05:30
sayaliparab
2f70e266a4 Faq 2024-07-10 14:53:57 +05:30
sayaliparab
728f1fbceb FAQ_sub 2024-07-10 14:53:23 +05:30
sayaliparab
06a85d5693 Faq 2024-07-10 14:52:39 +05:30
sayliraut
8d74a4d83c Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-10 14:47:50 +05:30
sayliraut
50ae997a42 changes 2024-07-10 14:47:41 +05:30
Sayli Raut
d63a3f1f40 Merge pull request #290 from WDI-Ideas/sayli
Sayli
2024-07-10 14:47:03 +05:30
CodewithSayali
82455c4d82 Merge pull request #289 from WDI-Ideas/sayaliP
Sayali p
2024-07-10 13:27:59 +05:30
sayaliparab
c6e1bc0a1d ExportRportFinal 2024-07-10 13:26:53 +05:30
sayaliparab
5cfa57b410 FinalReport 2024-07-10 13:26:20 +05:30
sayliraut
f14a73eb99 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-10 13:15:37 +05:30
sayliraut
75720d7b44 change 2024-07-10 13:15:23 +05:30
Sayli Raut
f6d70f645d Merge pull request #288 from WDI-Ideas/sayli
Sayli
2024-07-10 13:14:55 +05:30
sayliraut
499f00148b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-10 13:10:54 +05:30
sayliraut
236e337783 changes 2024-07-10 13:10:45 +05:30
Sayli Raut
2f21a34b98 Merge pull request #287 from WDI-Ideas/sayli
Sayli
2024-07-10 13:10:03 +05:30
sayliraut
901b2c6666 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-10 13:00:43 +05:30
sayliraut
a7fabb3179 changes 2024-07-10 13:00:30 +05:30
Sayli Raut
e6f01f7aa6 Merge pull request #286 from WDI-Ideas/sayli
Sayli
2024-07-10 13:00:04 +05:30
sayliraut
45fda180ac Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-10 12:19:46 +05:30
sayliraut
7c9754adf1 changes 2024-07-10 12:19:38 +05:30
Sayli Raut
ab4e353d93 Merge pull request #285 from WDI-Ideas/sayli
Sayli
2024-07-10 12:18:55 +05:30
sayliraut
22d5bbe0e4 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-10 12:02:29 +05:30
sayliraut
31cab80ff9 changes 2024-07-10 12:02:18 +05:30
Sayli Raut
34103efdc0 Merge pull request #284 from WDI-Ideas/sayli
Sayli
2024-07-10 12:01:41 +05:30
CodewithSayali
1aff35adfe Merge pull request #283 from WDI-Ideas/sayaliP
Sayali p
2024-07-09 19:50:33 +05:30
sayaliparab
3b9d03b623 Exportredeem 2024-07-09 19:49:16 +05:30
sayaliparab
5dc49a9c68 Export 2024-07-09 19:48:49 +05:30
CodewithSayali
d0052df774 Merge pull request #282 from WDI-Ideas/sayaliP
Sayali p
2024-07-09 19:30:33 +05:30
sayaliparab
e395c7761f ReportExport 2024-07-09 19:27:37 +05:30
sayaliparab
a728aab8d7 ExportReport 2024-07-09 19:27:01 +05:30
sayliraut
d1d2de8b27 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-09 19:15:12 +05:30
sayliraut
893c5d3517 changes 2024-07-09 19:15:01 +05:30
Sayli Raut
a33c94ae65 Merge pull request #281 from WDI-Ideas/sayli
Sayli
2024-07-09 19:14:28 +05:30
CodewithSayali
2c66be8cce Merge pull request #280 from WDI-Ideas/sayaliP
Sayali p
2024-07-09 19:06:54 +05:30
sayaliparab
adae7fc567 DashExport 2024-07-09 19:05:58 +05:30
sayaliparab
dae33b4f25 exportUser 2024-07-09 19:05:22 +05:30
sayliraut
f54789e832 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-09 18:52:26 +05:30
sayliraut
6786450d30 changes 2024-07-09 18:52:17 +05:30
Sayli Raut
616b0b2e44 Merge pull request #279 from WDI-Ideas/sayli
Sayli
2024-07-09 18:51:37 +05:30
sayliraut
f967347cb9 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-09 15:54:34 +05:30
sayliraut
f50ea7e39e schedule notification 2024-07-09 15:54:23 +05:30
Sayli Raut
04cc977f06 Merge pull request #278 from WDI-Ideas/sayli
Sayli
2024-07-09 15:53:44 +05:30
sayliraut
f1e148a335 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-09 13:46:20 +05:30
sayliraut
6f83144139 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-09 13:46:17 +05:30
sayliraut
dbf6d811fa notification 2024-07-09 13:46:03 +05:30
Sayli Raut
c6a24319d5 Merge pull request #277 from WDI-Ideas/sayli
Sayli
2024-07-09 13:45:42 +05:30
CodewithSayali
6a3925520d Merge pull request #276 from WDI-Ideas/sayaliP
Sayali p
2024-07-09 13:45:01 +05:30
sayaliparab
b1ac95669b Dashrecent 2024-07-09 13:39:51 +05:30
sayaliparab
cbec6a7c4b DashboardRecent 2024-07-09 13:39:11 +05:30
CodewithSayali
22980dce7f Merge pull request #275 from WDI-Ideas/sayaliP
Sayali p
2024-07-09 12:47:56 +05:30
sayaliparab
d71d0d9dbc RecentDash 2024-07-09 12:46:01 +05:30
sayaliparab
a6df2e54ec DashboardExcel 2024-07-08 20:14:08 +05:30
sayaliparab
10aa81cc08 dashoabrdExcel 2024-07-08 20:11:31 +05:30
sayliraut
8b83434189 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-08 19:47:37 +05:30
sayliraut
0903478fde change 2024-07-08 19:47:25 +05:30
Sayli Raut
55988aa60a Merge pull request #274 from WDI-Ideas/sayli
Sayli
2024-07-08 19:46:49 +05:30
sayliraut
4287299d72 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-08 16:40:29 +05:30
sayliraut
69aa9acba8 sales graph 2024-07-08 16:40:22 +05:30
Sayli Raut
25d89ceb25 Merge pull request #273 from WDI-Ideas/sayli
Sayli
2024-07-08 16:40:02 +05:30
sayliraut
644d7d4c20 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-08 15:56:10 +05:30
sayliraut
e0e63c4611 changes 2024-07-08 15:55:58 +05:30
Sayli Raut
29df0086a7 Merge pull request #272 from WDI-Ideas/sayli
Sayli
2024-07-08 15:55:24 +05:30
Hritikkk9
9816afe1f4 Merge pull request #271 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-08 15:48:27 +05:30
Hritikkk9
917d5f88db Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-08 15:47:47 +05:30
Hritikkk9
2fcd62d624 proration period updated 2024-07-08 15:47:35 +05:30
sayliraut
f861a43f5f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-08 14:52:37 +05:30
sayliraut
c6d92b8a39 dashboard recent transaction 2024-07-08 14:52:25 +05:30
Sayli Raut
10a71600d8 Merge pull request #270 from WDI-Ideas/sayli
Sayli
2024-07-08 14:51:54 +05:30
Hritikkk9
e79819252b Merge pull request #269 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-08 13:09:44 +05:30
Hritikkk9
b73d4dab68 subscription U 2024-07-08 13:08:01 +05:30
Hritikkk9
fb998f22ab subscription webhook updated solved 2024-07-08 13:06:59 +05:30
Hritikkk9
7273fd633a Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-08 13:06:02 +05:30
Hritikkk9
5b6186ede1 subscription webhook updated 2024-07-08 13:05:55 +05:30
CodewithSayali
f0967e4f57 Merge pull request #268 from WDI-Ideas/sayaliP
Sayali p
2024-07-08 12:17:48 +05:30
sayaliparab
8a8a97acb3 SubscriptionCancelled 2024-07-08 12:13:51 +05:30
sayaliparab
1f30bb524a SubscriptionC 2024-07-08 12:10:55 +05:30
sayliraut
2396db80ef changes 2024-07-05 19:48:08 +05:30
Sayli Raut
6f270d9ffb Merge pull request #267 from WDI-Ideas/sayli
Sayli
2024-07-05 19:47:31 +05:30
sayliraut
bdf9fc83d8 changes 2024-07-05 19:46:27 +05:30
Hritikkk9
baf8d1abf5 Merge pull request #266 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-05 19:36:39 +05:30
Hritikkk9
607811057f subscription with referral upda 2024-07-05 19:35:49 +05:30
Hritikkk9
d5bcebb79a subscription with referral updated 2024-07-05 19:32:58 +05:30
CodewithSayali
6298431efc Merge pull request #265 from WDI-Ideas/sayaliP
export
2024-07-05 17:13:25 +05:30
sayaliparab
5c7e54b944 export 2024-07-05 17:12:28 +05:30
CodewithSayali
ab11a08cb6 Merge pull request #264 from WDI-Ideas/sayaliP
Sayali p
2024-07-05 16:06:51 +05:30
sayaliparab
8db9c1b7f5 TotalSUbscribed 2024-07-05 16:05:53 +05:30
sayaliparab
591f0958c3 Totalsub 2024-07-05 16:05:18 +05:30
sayliraut
d1dad4f91a Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-05 15:03:03 +05:30
sayliraut
db5d52fa57 changes 2024-07-05 15:02:54 +05:30
Sayli Raut
be01fc8556 Merge pull request #263 from WDI-Ideas/sayli
Sayli
2024-07-05 15:02:22 +05:30
sayliraut
68798c435e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-05 13:00:01 +05:30
sayliraut
7543ede451 changes 2024-07-05 12:59:45 +05:30
Sayli Raut
4f62ee8939 Merge pull request #262 from WDI-Ideas/sayli
Sayli
2024-07-05 12:59:21 +05:30
CodewithSayali
3b382c3d60 Merge pull request #261 from WDI-Ideas/sayaliP
Sayali p
2024-07-04 19:27:30 +05:30
sayaliparab
d3f143d0c9 Restapp 2024-07-04 18:00:31 +05:30
sayaliparab
848d22d5f4 rest 2024-07-04 18:00:04 +05:30
CodewithSayali
b146116623 Merge pull request #260 from WDI-Ideas/sayaliP
Sayali p
2024-07-04 17:27:01 +05:30
sayaliparab
693bf46137 REport 2024-07-04 17:24:08 +05:30
sayaliparab
ad8feb4fae report 2024-07-04 17:23:21 +05:30
Sayli Raut
cbe292bb5a Merge pull request #259 from WDI-Ideas/sayli
Sayli
2024-07-04 13:38:13 +05:30
sayliraut
ccc255b0f2 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-04 13:38:53 +05:30
sayliraut
b7317bedd6 changes 2024-07-04 13:38:40 +05:30
sayliraut
9bc4c7f1f4 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-04 13:11:00 +05:30
sayliraut
c885ae5fd3 change 2024-07-04 13:10:51 +05:30
Sayli Raut
cdf002d677 Merge pull request #258 from WDI-Ideas/sayli
Sayli
2024-07-04 13:10:19 +05:30
sayliraut
7d856c368b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-04 13:04:53 +05:30
sayliraut
65d371748c change 2024-07-04 13:04:44 +05:30
Sayli Raut
daa9a59432 Merge pull request #257 from WDI-Ideas/sayli
Sayli
2024-07-04 13:04:36 +05:30
CodewithSayali
c6cfafc411 Merge pull request #256 from WDI-Ideas/sayaliP
Sayali p
2024-07-04 13:04:29 +05:30
sayaliparab
2c86e4feaa Export 2024-07-04 13:03:08 +05:30
sayaliparab
e0ff94c035 report 2024-07-04 13:02:23 +05:30
Sayli Raut
92bc5711d6 Merge pull request #255 from WDI-Ideas/sayli
Sayli
2024-07-04 11:34:41 +05:30
sayliraut
4983cca5ce Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-04 11:34:39 +05:30
sayliraut
a25f6306c3 Changes 2024-07-04 11:34:27 +05:30
CodewithSayali
cbf1a13230 Merge pull request #254 from WDI-Ideas/sayaliP
Sayali p
2024-07-03 19:42:56 +05:30
sayaliparab
7cdd769e45 RestExport 2024-07-03 19:41:47 +05:30
sayaliparab
c13004865d Export 2024-07-03 19:41:16 +05:30
CodewithSayali
301cc47ca0 Merge pull request #253 from WDI-Ideas/sayaliP
Sayali p
2024-07-03 19:32:10 +05:30
sayaliparab
f08a5b62b8 Restspecific 2024-07-03 19:31:08 +05:30
sayaliparab
cd77a330d9 exportSpecific 2024-07-03 19:30:35 +05:30
Hritikkk9
77268ae08a Merge pull request #252 from WDI-Ideas/HritikCheers
webhook commit
2024-07-03 19:21:35 +05:30
Hritikkk9
7c1337c21f webhook commit 2024-07-03 19:21:01 +05:30
sayliraut
cccaeef32c Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-03 18:43:50 +05:30
sayliraut
9ed108513e change 2024-07-03 18:43:39 +05:30
Sayli Raut
bc7f8c9dab Merge pull request #251 from WDI-Ideas/sayli
Sayli
2024-07-03 18:43:05 +05:30
Hritikkk9
6aecb9f399 Merge pull request #250 from WDI-Ideas/HritikCheers
webhook logic upd
2024-07-03 18:01:41 +05:30
Hritikkk9
4072c658b6 webhook logic upd 2024-07-03 18:01:09 +05:30
Hritikkk9
4828165a38 Merge pull request #249 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 17:59:41 +05:30
Hritikkk9
fec670310b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 17:59:08 +05:30
Hritikkk9
d9a28bfff2 webhook logic updated 2024-07-03 17:59:03 +05:30
Hritikkk9
2db71ff7c7 Merge pull request #248 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 17:53:46 +05:30
Hritikkk9
b6b8f5bf57 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 17:53:09 +05:30
Hritikkk9
76a6ba8dfa customer api updated 2024-07-03 17:53:03 +05:30
Hritikkk9
b2dbced98e Merge pull request #247 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 17:17:17 +05:30
Hritikkk9
adf8c27e38 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 17:16:11 +05:30
Hritikkk9
0ac4cb2118 webhhhookk ke 2024-07-03 17:16:07 +05:30
sayliraut
f7f87d07e0 changes 2024-07-03 17:08:20 +05:30
Sayli Raut
7b4723fe73 Merge pull request #246 from WDI-Ideas/sayli
changes
2024-07-03 17:07:57 +05:30
Hritikkk9
bf533dae9e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 17:02:28 +05:30
Sayli Raut
f25d8a7154 Merge pull request #245 from WDI-Ideas/sayli
changes
2024-07-03 16:57:51 +05:30
sayliraut
08e6eaf265 changes 2024-07-03 16:58:35 +05:30
Hritikkk9
59c9de87f2 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 16:46:45 +05:30
Hritikkk9
6f6e1ead22 webhhhookk kernalssj 2024-07-03 16:44:29 +05:30
Hritikkk9
4156c8968b Merge pull request #244 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 16:42:47 +05:30
Hritikkk9
ffe76b509f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 16:40:10 +05:30
Hritikkk9
8ec08aab03 webhhhookk kernalss 2024-07-03 16:40:04 +05:30
CodewithSayali
0ceeb6e59a Merge pull request #243 from WDI-Ideas/sayaliP
Sayali p
2024-07-03 16:35:44 +05:30
sayaliparab
9721378c66 ExcelReport 2024-07-03 16:34:41 +05:30
sayaliparab
dd5cb06b4c report 2024-07-03 16:24:22 +05:30
Hritikkk9
db6b8b7752 Merge pull request #242 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 16:16:07 +05:30
Hritikkk9
9838868b05 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 16:15:25 +05:30
Hritikkk9
32d5ff0edb webhhhookk kernal 2024-07-03 16:15:19 +05:30
Hritikkk9
c91c0a3129 Merge pull request #241 from WDI-Ideas/HritikCheers
webhhhookk
2024-07-03 16:07:32 +05:30
Hritikkk9
ae862c0b42 webhhhookk 2024-07-03 16:06:09 +05:30
Hritikkk9
995b2c14ce Merge pull request #240 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 15:59:40 +05:30
Hritikkk9
f9512d6b4b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 15:57:06 +05:30
Hritikkk9
550372628d webhhhookk 2024-07-03 15:56:58 +05:30
Hritikkk9
55920f17cf Merge pull request #239 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 15:32:17 +05:30
Hritikkk9
deeabe37c9 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 15:30:57 +05:30
Hritikkk9
2df39304d4 admin panel stripe u 2024-07-03 15:30:53 +05:30
Hritikkk9
736f323c37 Merge pull request #238 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 15:02:48 +05:30
Hritikkk9
acb2b9330d Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 15:02:00 +05:30
Hritikkk9
671add21ce admin panel stripe updated 2024-07-03 15:01:53 +05:30
Hritikkk9
c28c94b134 Merge pull request #237 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 13:40:47 +05:30
Hritikkk9
f4a50fc3f9 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 13:40:10 +05:30
Hritikkk9
3bc89966d4 webhook route reforma code added 2024-07-03 13:38:46 +05:30
sayliraut
a210958d5e change 2024-07-03 12:58:35 +05:30
Sayli Raut
cfd42368dc Merge pull request #236 from WDI-Ideas/sayli
Sayli
2024-07-03 12:58:26 +05:30
sayliraut
45d77ddae1 redeem logic 2024-07-03 12:55:55 +05:30
Hritikkk9
282c6d3574 Merge pull request #235 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 12:29:27 +05:30
Hritikkk9
eb868d9a5c Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 12:28:50 +05:30
Hritikkk9
17d43d109d webhook route updated 2024-07-03 12:28:39 +05:30
Hritikkk9
5e2cecc044 Merge pull request #234 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 12:09:01 +05:30
Hritikkk9
63d25fe75b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 12:07:22 +05:30
Hritikkk9
136fbf3a1b subscription page updated 2024-07-03 12:07:14 +05:30
Hritikkk9
a24fdf4b93 Merge pull request #233 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 11:28:14 +05:30
Hritikkk9
7f858f4402 webhook file updated twice 2024-07-03 11:27:40 +05:30
Hritikkk9
518218712b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 11:27:07 +05:30
Hritikkk9
cffe6d2191 webhook file updated 2024-07-03 11:27:02 +05:30
Hritikkk9
b222e681df Merge pull request #232 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 11:24:44 +05:30
Hritikkk9
8badd8d9a1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 11:24:05 +05:30
Hritikkk9
66c72206bd verify csrf token updated 2024-07-03 11:24:01 +05:30
Hritikkk9
572b6359d8 Merge pull request #231 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-03 11:12:52 +05:30
Hritikkk9
1b7b7baca1 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-03 11:12:22 +05:30
Hritikkk9
770d653b69 verify csrf token 2024-07-03 11:12:18 +05:30
Hritikkk9
5bcfa4417d Merge pull request #230 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-02 19:48:48 +05:30
Hritikkk9
ffabacb7f2 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-02 19:48:05 +05:30
Hritikkk9
8398e0b6fa debug updated 2024-07-02 19:47:53 +05:30
Hritikkk9
4cef472a93 Merge pull request #229 from WDI-Ideas/HritikCheers
debug tojen
2024-07-02 19:44:32 +05:30
Hritikkk9
bda8d33d85 debug tojen 2024-07-02 19:44:02 +05:30
Hritikkk9
346d420b18 Merge pull request #228 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-02 19:42:24 +05:30
Hritikkk9
16153f4f6b Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-02 19:41:52 +05:30
Hritikkk9
275ac3b8a8 debug 2024-07-02 19:41:47 +05:30
Hritikkk9
73c3b74cfa Merge pull request #227 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-02 19:40:24 +05:30
Hritikkk9
e92996fd34 debug 2024-07-02 19:39:59 +05:30
Hritikkk9
995882662b subscription page updated with errors 2024-07-02 19:37:45 +05:30
Hritikkk9
bdc8aa3b05 Merge pull request #226 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-02 19:33:19 +05:30
Hritikkk9
5099619777 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-02 19:32:24 +05:30
Hritikkk9
a254c0237d subscription page updated with errors 2024-07-02 19:32:12 +05:30
Hritikkk9
3bdd089cb5 Merge pull request #225 from WDI-Ideas/HritikCheers
subscription page updated 2
2024-07-02 19:23:46 +05:30
Hritikkk9
309b58a3d0 subscription page updated 2 2024-07-02 19:23:10 +05:30
Hritikkk9
0d19b8b329 Merge pull request #224 from WDI-Ideas/HritikCheers
Hritik cheers
2024-07-02 19:22:06 +05:30
Hritikkk9
869926ff94 subscription page updated 2024-07-02 19:21:42 +05:30
Hritikkk9
267d4db72a Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into HritikCheers 2024-07-02 19:20:33 +05:30
Hritikkk9
58b3f3b19c subscription page updated 2024-07-02 19:20:18 +05:30
CodewithSayali
4a177180de Merge pull request #223 from WDI-Ideas/sayaliP
Sayali p
2024-07-02 15:55:55 +05:30
sayaliparab
cf45241300 FaqCateg 2024-07-02 15:54:44 +05:30
sayaliparab
b41ef5ad20 Faqcat 2024-07-02 15:54:08 +05:30
CodewithSayali
e0824adb52 Merge pull request #222 from WDI-Ideas/sayaliP
Sayali p
2024-07-02 15:33:34 +05:30
sayaliparab
80a33133ca StateRedeem 2024-07-02 15:25:31 +05:30
sayaliparab
3003e10003 Redeem 2024-07-02 15:24:49 +05:30
sayliraut
a67beef1ad Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-01 19:30:07 +05:30
sayliraut
84f0d7bb9d restaurant time interval 2024-07-01 19:29:55 +05:30
Sayli Raut
d3a14a7eb1 Merge pull request #221 from WDI-Ideas/sayli
Sayli
2024-07-01 19:29:27 +05:30
sayliraut
3df356addf Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-01 15:03:16 +05:30
sayliraut
ce781fb822 bug fixing 2024-07-01 15:03:02 +05:30
Sayli Raut
72037a2832 Merge pull request #220 from WDI-Ideas/sayli
Sayli
2024-07-01 15:02:35 +05:30
sayliraut
115bb1a87e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-07-01 12:01:41 +05:30
Sayli Raut
ba6ec37b61 Merge pull request #219 from WDI-Ideas/sayli
Sayli
2024-07-01 12:01:36 +05:30
sayliraut
7cdda08edc change 2024-07-01 12:01:35 +05:30
Sayli Raut
c87448dea0 Merge pull request #218 from WDI-Ideas/sayli
changes
2024-06-30 21:12:05 +05:30
sayliraut
53f0068e2c changes 2024-06-30 21:11:10 +05:30
Sayli Raut
64acafcf43 Merge pull request #217 from WDI-Ideas/sayli
Sayli
2024-06-28 19:48:37 +05:30
sayliraut
bc7d8cb09e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-28 19:49:11 +05:30
sayliraut
9c69b246d2 time interval in state 2024-06-28 19:48:56 +05:30
Hritikkk9
dc2ecefbc0 Merge pull request #216 from WDI-Ideas/HritikCheers
Hritik cheers
2024-06-28 19:31:22 +05:30
Hritikkk9
5be9b18fb5 subscription updated 2024-06-28 19:30:31 +05:30
Hritikkk9
49c93ca960 new updated 2024-06-28 19:10:02 +05:30
Hritikkk9
13819cbb1a new updated 2024-06-28 19:09:04 +05:30
CodewithSayali
285cec097c Merge pull request #215 from WDI-Ideas/sayaliP
Sayali p
2024-06-28 13:26:45 +05:30
sayaliparab
e97e7bfac4 newCat 2024-06-28 13:25:43 +05:30
sayaliparab
13b1567003 Catnews 2024-06-28 13:25:12 +05:30
CodewithSayali
89ec831b04 Merge pull request #214 from WDI-Ideas/sayaliP
Sayali p
2024-06-28 12:43:49 +05:30
sayaliparab
0b542d0d05 RedeemCust 2024-06-28 12:42:59 +05:30
sayaliparab
15af51f691 customredeem 2024-06-28 12:42:25 +05:30
CodewithSayali
cb96bd9fb7 Merge pull request #213 from WDI-Ideas/sayaliP
Sayali p
2024-06-27 20:10:25 +05:30
sayaliparab
6f6594ef99 ConatctCat 2024-06-27 20:09:29 +05:30
sayaliparab
cb20bad55c conatctCat 2024-06-27 20:09:05 +05:30
CodewithSayali
c399927f68 Merge pull request #212 from WDI-Ideas/sayaliP
Sayali p
2024-06-27 20:06:23 +05:30
sayaliparab
080a52a2dc conatctCat 2024-06-27 20:05:38 +05:30
sayaliparab
396e185a1c contactCat 2024-06-27 20:04:54 +05:30
CodewithSayali
9b6005c3d4 Merge pull request #211 from WDI-Ideas/sayaliP
Sayali p
2024-06-27 16:40:02 +05:30
sayaliparab
1d68a3b15d REst 2024-06-27 16:35:55 +05:30
sayaliparab
6d25c9c025 Cust 2024-06-27 16:32:05 +05:30
Sayli Raut
384478997a Merge pull request #210 from WDI-Ideas/sayli
Sayli
2024-06-27 16:31:00 +05:30
sayliraut
250f3443f9 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-27 16:31:15 +05:30
sayliraut
3eb6dea23c restaurant module chnages 2024-06-27 16:31:01 +05:30
sayaliparab
a94f625134 Contact 2024-06-27 15:54:36 +05:30
CodewithSayali
30ec2635d6 Merge pull request #209 from WDI-Ideas/sayaliP
Sayali p
2024-06-27 15:30:07 +05:30
sayaliparab
d86913694c CustAr 2024-06-27 15:28:10 +05:30
sayaliparab
148b12c1c3 custo 2024-06-27 15:27:39 +05:30
CodewithSayali
de147e6824 Merge pull request #208 from WDI-Ideas/sayaliP
Sayali p
2024-06-27 13:22:04 +05:30
sayaliparab
3e5d345c15 CustDel 2024-06-27 13:19:48 +05:30
sayaliparab
e05b127ae2 CustomerDelete 2024-06-27 13:19:16 +05:30
CodewithSayali
87c1bd0d23 Merge pull request #207 from WDI-Ideas/sayaliP
Sayali p
2024-06-26 19:15:26 +05:30
sayaliparab
7eed026227 Locationalready 2024-06-26 19:14:02 +05:30
sayaliparab
0c9159099a location 2024-06-26 19:12:45 +05:30
sayliraut
a33c71d7a5 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-26 18:59:14 +05:30
sayliraut
4b97d1f7f7 change 2024-06-26 18:59:00 +05:30
Sayli Raut
4816cf3fe7 Merge pull request #206 from WDI-Ideas/sayli
Sayli
2024-06-26 18:58:58 +05:30
CodewithSayali
dd4dc34a3d Merge pull request #205 from WDI-Ideas/sayaliP
Sayali p
2024-06-26 12:50:49 +05:30
sayaliparab
d83916ca03 formCheck 2024-06-26 12:49:39 +05:30
sayaliparab
abbd4a0b44 check 2024-06-26 12:49:08 +05:30
CodewithSayali
9f36012595 Merge pull request #204 from WDI-Ideas/sayaliP
Sayali p
2024-06-26 12:41:54 +05:30
sayaliparab
678032067f Notify 2024-06-26 12:41:03 +05:30
sayaliparab
97a65c0a7b Notify 2024-06-26 12:40:29 +05:30
Sayli Raut
a687f958d1 Merge pull request #203 from WDI-Ideas/sayli
Sayli
2024-06-26 12:20:16 +05:30
sayliraut
e19da2e2c0 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-26 12:18:40 +05:30
sayliraut
4e2c5b766a category 2024-06-26 12:18:12 +05:30
Sayli Raut
435d36343a Merge pull request #202 from WDI-Ideas/sayli
Sayli
2024-06-25 16:39:39 +05:30
sayliraut
a65a3e27ad Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-25 16:39:28 +05:30
sayliraut
a8a1703ff9 changes 2024-06-25 16:39:13 +05:30
sayliraut
8f19297130 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-25 14:56:12 +05:30
sayliraut
ef271fabce change 2024-06-25 14:55:52 +05:30
Sayli Raut
709172b5a7 Merge pull request #201 from WDI-Ideas/sayli
Sayli
2024-06-25 14:55:40 +05:30
sayliraut
fa88f5cab6 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-25 13:29:27 +05:30
sayliraut
c2094a9064 change 2024-06-25 13:29:12 +05:30
Sayli Raut
721d341ca6 Merge pull request #200 from WDI-Ideas/sayli
Sayli
2024-06-25 13:29:11 +05:30
sayliraut
3c6161ada3 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-25 12:50:25 +05:30
sayliraut
66dabdfbde changes 2024-06-25 12:50:11 +05:30
Sayli Raut
f7dd226958 Merge pull request #199 from WDI-Ideas/sayli
Sayli
2024-06-25 12:49:58 +05:30
Sayli Raut
6db63a6cc1 Merge pull request #198 from WDI-Ideas/sayli
changes
2024-06-25 11:48:41 +05:30
sayliraut
9240217b2f changes 2024-06-25 11:48:32 +05:30
Sayli Raut
ed2be8bb48 Merge pull request #197 from WDI-Ideas/sayli
Sayli
2024-06-25 11:38:33 +05:30
sayliraut
eb92ed7559 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-25 11:38:23 +05:30
sayliraut
592e05b898 changes 2024-06-25 11:38:11 +05:30
sayliraut
88c3114f0e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-24 17:40:11 +05:30
sayliraut
3fb443a556 changes 2024-06-24 17:40:00 +05:30
Sayli Raut
c87927707b Merge pull request #196 from WDI-Ideas/sayli
Sayli
2024-06-24 17:39:48 +05:30
sayliraut
86b6fd79f7 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-24 16:25:55 +05:30
sayliraut
64a085b460 change 2024-06-24 16:25:43 +05:30
Sayli Raut
48330b4f9f Merge pull request #195 from WDI-Ideas/sayli
Sayli
2024-06-24 16:25:35 +05:30
sayliraut
39e3688cca Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-24 15:36:58 +05:30
sayliraut
9e9d9d24b7 changes in manage rules 2024-06-24 15:36:44 +05:30
Sayli Raut
b67d7edcf1 Merge pull request #194 from WDI-Ideas/sayli
Sayli
2024-06-24 15:36:43 +05:30
sayliraut
48755960a0 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-24 12:48:48 +05:30
Sayli Raut
922b5f8c24 Merge pull request #193 from WDI-Ideas/sayli
Sayli
2024-06-24 12:48:37 +05:30
sayliraut
4ebdd543c6 changes 2024-06-24 12:48:31 +05:30
sayliraut
b50566f298 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-24 12:43:25 +05:30
sayliraut
5d648386bc change 2024-06-24 12:43:11 +05:30
Sayli Raut
1c0c1df28f Merge pull request #192 from WDI-Ideas/sayli
Sayli
2024-06-24 12:43:02 +05:30
sayliraut
b1a19de33d change 2024-06-24 12:29:00 +05:30
Sayli Raut
497a5e7975 Merge pull request #191 from WDI-Ideas/sayli
change
2024-06-24 12:28:50 +05:30
CodewithSayali
41526aaeb0 Merge pull request #190 from WDI-Ideas/sayaliP
Sayali p
2024-06-21 17:43:44 +05:30
sayaliparab
bdb0d50b0e Privacy 2024-06-21 17:41:12 +05:30
sayaliparab
ab69cb22f7 privacy 2024-06-21 17:40:45 +05:30
CodewithSayali
ae0fe47740 Merge pull request #189 from WDI-Ideas/sayaliP
Sayali p
2024-06-21 15:17:20 +05:30
sayaliparab
fbd89d8d54 Restapp 2024-06-21 15:15:07 +05:30
sayaliparab
3f13fae1e9 Restapp 2024-06-21 15:14:35 +05:30
CodewithSayali
483456196b Merge pull request #188 from WDI-Ideas/sayaliP
Sayali p
2024-06-21 15:11:55 +05:30
sayaliparab
04d5fc1c9c privacy 2024-06-21 15:10:30 +05:30
sayaliparab
85da9014f5 Privacy 2024-06-21 15:09:13 +05:30
Sayli Raut
43fe7dd9b9 Merge pull request #187 from WDI-Ideas/sayli
Sayli
2024-06-21 15:06:00 +05:30
sayliraut
57971e3a2f Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-21 15:06:16 +05:30
sayliraut
8645b5ae6f change 2024-06-21 15:06:02 +05:30
CodewithSayali
cf571fb5d7 Merge pull request #186 from WDI-Ideas/sayaliP
Sayali p
2024-06-21 15:04:26 +05:30
sayaliparab
21865cd21c rule 2024-06-21 15:03:11 +05:30
sayaliparab
d18386a63c NewArticle 2024-06-21 15:00:05 +05:30
sayliraut
22a028c0f7 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-21 14:59:39 +05:30
Sayli Raut
fb9253b59a Merge pull request #185 from WDI-Ideas/sayli
Sayli
2024-06-21 14:59:32 +05:30
sayliraut
5553d62e89 change 2024-06-21 14:59:25 +05:30
sayliraut
9c2de05ee6 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-21 14:52:24 +05:30
Sayli Raut
50161b1a21 Merge pull request #184 from WDI-Ideas/sayli
Sayli
2024-06-21 14:52:23 +05:30
sayliraut
7637e358fb change 2024-06-21 14:52:08 +05:30
sayliraut
48bc42d9eb Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-20 19:36:23 +05:30
Sayli Raut
b8ad62d085 Merge pull request #183 from WDI-Ideas/sayli
Sayli
2024-06-20 19:36:20 +05:30
sayliraut
a11bfdbfcb change 2024-06-20 19:36:12 +05:30
sayliraut
7dbb6a4fcd Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-20 18:50:05 +05:30
Sayli Raut
e996f4b320 Merge pull request #182 from WDI-Ideas/sayli
Sayli
2024-06-20 18:50:04 +05:30
sayliraut
9a465b908e change 2024-06-20 18:49:52 +05:30
sayliraut
02b35a8892 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-20 18:42:53 +05:30
sayliraut
1ecc314e8e change 2024-06-20 18:42:40 +05:30
Sayli Raut
02d6094bec Merge pull request #181 from WDI-Ideas/sayli
Sayli
2024-06-20 18:42:39 +05:30
sayliraut
6982346e8e changes 2024-06-20 16:44:42 +05:30
Sayli Raut
ed900e4a22 Merge pull request #180 from WDI-Ideas/sayli
changes
2024-06-20 16:44:37 +05:30
CodewithSayali
e44078ae0c Merge pull request #179 from WDI-Ideas/sayaliP
Sayali p
2024-06-20 15:17:24 +05:30
sayaliparab
f45a05590e RestoFilter 2024-06-20 15:16:15 +05:30
sayaliparab
9720034748 restaurantFliter 2024-06-20 15:15:43 +05:30
Sayli Raut
0f30c071a0 Merge pull request #178 from WDI-Ideas/sayli
Sayli
2024-06-20 14:55:49 +05:30
sayliraut
3bdaeea0a9 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-20 14:56:04 +05:30
sayliraut
d5e968deaa changes 2024-06-20 14:55:50 +05:30
Sayli Raut
831c77dbde Merge pull request #177 from WDI-Ideas/sayli
Search restaurant API
2024-06-20 13:05:31 +05:30
sayliraut
2358f561bf Search restaurant API 2024-06-20 13:05:03 +05:30
Sayli Raut
0d11c2a76f Merge pull request #176 from WDI-Ideas/sayli
Sayli
2024-06-19 17:26:42 +05:30
sayliraut
64d91c6aa8 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-19 17:26:54 +05:30
sayliraut
47ea603c10 search state API 2024-06-19 17:26:37 +05:30
sayliraut
52f7299d6a Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-19 16:21:13 +05:30
Sayli Raut
e4c12c5fa9 Merge pull request #175 from WDI-Ideas/sayli
Sayli
2024-06-19 16:21:02 +05:30
sayliraut
bd81d002b7 notification changes 2024-06-19 16:20:52 +05:30
sayliraut
7af971cada Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-19 13:35:50 +05:30
Sayli Raut
f0db020b63 Merge pull request #174 from WDI-Ideas/sayli
Sayli
2024-06-19 13:35:40 +05:30
sayliraut
efeef736f9 change 2024-06-19 13:35:33 +05:30
sayliraut
15fa3454ff Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-19 13:24:04 +05:30
Sayli Raut
4fbcde8b07 Merge pull request #173 from WDI-Ideas/sayli
Sayli
2024-06-19 13:23:58 +05:30
sayliraut
7264174ede manage_rules 2024-06-19 13:23:51 +05:30
CodewithSayali
fb046fc536 Merge pull request #172 from WDI-Ideas/sayaliP
Sayali p
2024-06-19 12:54:01 +05:30
sayaliparab
7c9515d6de ContactHistory 2024-06-19 12:53:01 +05:30
sayaliparab
ea23da8aaf ContactHistroy 2024-06-19 12:52:16 +05:30
Sayli Raut
548dcb2ea4 Merge pull request #171 from WDI-Ideas/sayli
Sayli
2024-06-18 19:15:45 +05:30
sayliraut
478bb4582e Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-18 19:15:44 +05:30
sayliraut
c1cb9c37f0 changes 2024-06-18 19:15:31 +05:30
sayliraut
e1f8a46efa Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-18 17:54:49 +05:30
Sayli Raut
d831740511 Merge pull request #170 from WDI-Ideas/sayli
Sayli
2024-06-18 17:54:44 +05:30
sayliraut
c7a57cb115 changes 2024-06-18 17:54:33 +05:30
sayliraut
27f507aae7 Merge branch 'main' of https://github.com/WDI-Ideas/cheerstothe_season_laravel11 into sayli 2024-06-18 15:33:23 +05:30
Sayli Raut
12a80d1d59 Merge pull request #169 from WDI-Ideas/sayli
Sayli
2024-06-18 15:33:15 +05:30
sayliraut
ad9d9df3c0 change 2024-06-18 15:33:07 +05:30
181 changed files with 13671 additions and 4773 deletions

2
.gitignore vendored
View File

@@ -18,3 +18,5 @@ yarn-error.log
/.fleet
/.idea
/.vscode
composer.lock
composer.json

View File

@@ -8,7 +8,10 @@ use App\Models\IamPrincipal;
use Illuminate\Support\Facades\Log;
use Carbon\Carbon;
use App\Models\ManageRestaurant;
use App\Models\ManageState;
use App\Models\RedeemRestaurant;
use App\Models\RestaurantTimeInterval;
use App\Models\TimeInterval;
class ReinstateRestaurant extends Command
{
@@ -30,59 +33,72 @@ class ReinstateRestaurant extends Command
* Execute the console command.
*/
public function handle()
{
try {
$recordsToUpdate = RedeemRestaurant::where('is_redeem', 1)->get();
public function handle()
{
try {
$recordsToUpdate = RedeemRestaurant::where('is_redeem', 1)->get();
foreach ($recordsToUpdate as $record) {
//find restaurant
$managerestaurant = ManageRestaurant::where('id', $record->manage_restaurants_xid)->first();
foreach ($recordsToUpdate as $record) {
$managerestaurant = ManageRestaurant::where('id', $record->manage_restaurants_xid)->first();
$restTime = RestaurantTimeInterval::select('time_hours')->where('manage_restaurants_xid', $managerestaurant->id)->first();
// $stateTime = TimeInterval::select('time_hours')->where('manage_state_xid', $managerestaurant->state_xid)->first();
$customerData = IamPrincipal::where('id', $record->iam_principal_xid)->where('notification_status', 1)->where('principal_type_xid',3)->first(); //fetch customer
$restTimeHours = $restTime ? $restTime->time_hours : 0;
// $stateTimeHours = $stateTime ? $stateTime->time_hours : 0;
if ($managerestaurant && $managerestaurant->is_active == 1) {
$redeemDate = Carbon::parse($record->redeem_date);
$customerData = IamPrincipal::where('id', $record->iam_principal_xid)
->where('notification_status', 1)
->where('principal_type_xid', 3)
->first();
$fourHourPlusTimeOfRecord = $redeemDate->copy()->addHours(4);
if ($managerestaurant && $managerestaurant->is_active == 1) {
$redeemDate = Carbon::parse($record->redeem_date);
$currentTime = Carbon::now();
// Calculate the state time plus record time
// $stateHourPlusTimeOfRecord = $redeemDate->copy()->addHours($stateTimeHours);
// Log::info('state time' . $stateHourPlusTimeOfRecord);
if ($currentTime > $fourHourPlusTimeOfRecord) {
$record->update([
'is_redeem' => 0,
'redeem_date' => null,
'count' => $record->count + 1,
'is_redeemption_undone' => 0,
'redeemption_undone_date' => null,
]);
$restImage = ListingImageUrl('restaurant_images', $managerestaurant->image);
$title = "Your " . $managerestaurant->name . " Reinstate successfully";
$message = "Your " . $managerestaurant->name . " Reinstate successfully";
$content_type = 'Restaurant Reinstate';
$imageUrl = $restImage;
$currentTime = Carbon::now();
onesignalhelper::sendNotificationApi(
$customerData->one_signal_player_id,
$title,
$message,
$content_type,
$imageUrl,
$id = null
);
Log::info('Reinstate of record done at ' . now());
onesignalhelper::StoreNotificationDetails($customerData->id, $content_type, $title, $restImage);
}
}
}
Log::info('Reinstate task ran successfully at ' . now());
} catch (\Exception $e) {
Log::error('Reinstate function failed: ' . $e->getMessage());
}
}
// if ($currentTime > $stateHourPlusTimeOfRecord) {
// Only proceed if state time condition is met
$restHourPlusTimeOfRecord = $redeemDate->copy()->addHours(intval($restTimeHours));
Log::info('Restaurant time ' . $restHourPlusTimeOfRecord);
if ($currentTime > $restHourPlusTimeOfRecord) {
$record->update([
'is_redeem' => 0,
'count' => $record->count + 1,
'is_redeemption_undone' => 0,
'redeemption_undone_date' => null,
]);
$restImage = ListingImageUrl('restaurant_images', $managerestaurant->image);
$title = "Your " . $managerestaurant->name . " Reinstate successfully";
$message = "Your " . $managerestaurant->name . " Reinstate successfully";
$content_type = 'Restaurant Reinstate';
$imageUrl = $restImage;
onesignalhelper::sendNotificationApi(
$customerData->one_signal_player_id,
$title,
$message,
$content_type,
$imageUrl,
$id = null
);
Log::info('Reinstate of record done at ' . now());
onesignalhelper::StoreNotificationDetails($customerData->id, $content_type, $title, $restImage);
}
// }
}
}
} catch (\Exception $e) {
Log::error('Reinstate function failed: ' . $e->getMessage());
}
}
}

View File

@@ -0,0 +1,114 @@
<?php
namespace App\Console\Commands;
use App\Models\IamPrincipal;
use App\Models\NotificationDetails;
use Illuminate\Console\Command;
use Carbon\Carbon;
use Exception;
use DateTime;
use App\Helpers\onesignalhelper;
use App\Models\Subscriptions;
use Illuminate\Support\Facades\Log;
class SentScheduleNotification extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:sent-schedule-notification';
/**
* The console command description.
*
* @var string
*/
protected $description = 'It will send Recommendation to users Based on stored Data';
/**
* Execute the console command.
*/
public function handle()
{
$getAllPushNotifications = NotificationDetails::where('is_schedule', 1)
->where('is_active', 1)
->orderByDesc('id')
->get();
$currentDateTime = new DateTime();
foreach ($getAllPushNotifications as $inAppNotificationItem) {
$storedDateTime = new DateTime($inAppNotificationItem->delivery_schedule);
$currentTime = $currentDateTime->format('Y-m-d H:i');
$storedTime = $storedDateTime->format('Y-m-d H:i');
if ($currentTime == $storedTime) {
$title = $inAppNotificationItem->type;
$description = $inAppNotificationItem->description;
$imagePath = $inAppNotificationItem->image;
$stateIds = json_decode($inAppNotificationItem->state_ids, true);
$userType = $inAppNotificationItem->user_type;
if ($userType == 1) {
// Subscribed users
$iamPrincipals = Subscriptions::select('iam_principal_xid')
->where('next_payment_date', '>=', now())
->get();
$iamPrincipalIds = $iamPrincipals->pluck('iam_principal_xid');
$users = IamPrincipal::whereIn('id', $iamPrincipalIds)
->where('is_active', 1)
->where('notification_status', 1)
->where('principal_type_xid', 3)
->whereIn('state_xid', $stateIds)
->get();
} elseif ($userType == 2) {
// Unsubscribed users
$allPrincipalIds = IamPrincipal::where('principal_type_xid', 3)->pluck('id');
$subscribedIds = Subscriptions::select('iam_principal_xid')
->where('next_payment_date', '>=', now())
->pluck('iam_principal_xid');
$unsubscribedIds = $allPrincipalIds->diff($subscribedIds);
$users = IamPrincipal::whereIn('id', $unsubscribedIds)
->where('is_active', 1)
->where('notification_status', 1)
->whereIn('state_xid', $stateIds)
->get();
} elseif ($userType == 3) {
// Both subscribed and unsubscribed users
$users = IamPrincipal::where('is_active', 1)
->where('notification_status', 1)
->where('principal_type_xid', 3)
->whereIn('state_xid', $stateIds)
->get();
}
foreach ($users as $user) {
if ($user->one_signal_player_id) {
OneSignalHelper::sendNotificationApi(
$user->one_signal_player_id,
$title,
$description,
'Dashboard Notification',
$imagePath,
$id = null
);
Log::info("INAPP scheduled notification sent successfully to user ID: {$user->id}");
onesignalhelper::StoreNotificationDetails($user->id, 'Notification', $title, $imagePath);
$inAppNotificationItem->is_active = 0;
$inAppNotificationItem->save();
}
}
}
}
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromArray;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Carbon\Carbon;
class DashboardExportUser implements FromArray, WithHeadings
{
protected $data;
public function __construct(array $data)
{
$this->data = $data;
}
public function array(): array
{
return array_map(function ($transaction) {
return [
'ID' => $transaction['id'] ?? 'N/A',
'Customer Name' => ($transaction['iam_principal']['first_name'] ?? 'Deleted') . ' ' . ($transaction['iam_principal']['last_name'] ?? 'User'),
'Customer ID' => $transaction['iam_principal']['id'] ?? 'Deleted User',
'Amount' => '$' . number_format($transaction['amount'] ?? 0, 2),
'Product Name' => $transaction['subscription_product']['product_name'] ?? 'N/A',
'Product Details' => $transaction['subscription_product']['product_details'] ?? 'N/A',
'Subscription Status' => $transaction['status'] ?? 'Unknown',
'Subscription Period Start' => isset($transaction['current_period_start']) ? Carbon::parse($transaction['current_period_start'])->format('m/d/Y h:i A') : 'N/A',
'Subscription Period End' => isset($transaction['current_period_end']) ? Carbon::parse($transaction['current_period_end'])->format('m/d/Y h:i A') : 'N/A',
'Next Payment Date' => isset($transaction['next_payment_date']) ? Carbon::parse($transaction['next_payment_date'])->format('m/d/Y h:i A') : 'N/A',
];
}, $this->data);
}
public function headings(): array
{
return [
'ID',
'Customer Name',
'Customer ID',
'Amount',
'Product Name',
'Product Details',
'Subscription Status',
'Subscription Period Start',
'Subscription Period End',
'Next Payment Date'
];
}
}

View File

@@ -0,0 +1,64 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use App\Models\Subscriptions;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Illuminate\Support\Collection;
use Carbon\Carbon;
class DashboardSelectedExportUser implements FromCollection, WithHeadings
{
protected $ids;
public function __construct($ids)
{
$this->ids = $ids; // Expecting $ids to be an array
}
public function collection()
{
$selectedTransactions = Subscriptions::whereIn('id', $this->ids)
->with(['iamPrincipal', 'subscriptionProduct'])
->get()
->toArray();
$serial = 1;
$mappedTransactions = collect($selectedTransactions)->map(function ($transaction) use (&$serial) {
return [
'Sr No.' => $serial++, // Increment serial number
'Name' => ($transaction['iam_principal']['first_name'] ?? '') . ' ' . ($transaction['iam_principal']['last_name'] ?? ''),
'Customer Id' => $transaction['iam_principal']['id'] ?? '',
'Product Name' => $transaction['subscription_product']['product_name'] ?? '',
'Product Detail' => $transaction['subscription_product']['product_details'] ?? '',
'Amount' => $transaction['amount'],
'Payment Details' => $transaction['stripe_customer_id'],
'Subscription status' => $transaction['status'],
'Subscription Start Date' => Carbon::parse($transaction['current_period_start'])->format('m/d/Y h:i A'),
'Subscription End Date' => Carbon::parse($transaction['current_period_end'])->format('m/d/Y h:i A'),
'Next Payment Date' => Carbon::parse($transaction['next_payment_date'])->format('m/d/Y h:i A')
];
});
return new Collection($mappedTransactions);
}
public function headings(): array
{
return [
'Sr No.',
'Full Name',
'Customer Id',
'Product Name',
'Product Detail',
'Amount',
'Payment Details',
'Subscription status',
'Subscription Start Date',
'Subscription End Date',
'Next Payment Date'
];
}
}

View File

@@ -0,0 +1,184 @@
<?php
namespace App\Exports;
use App\Models\IamPrincipal;
use App\Models\RedeemRestaurant;
use App\Models\Subscriptions;
use App\Models\ReferralUsers;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
class ExportReports implements FromView
{
protected $reportType;
protected $states;
protected $startDate;
protected $endDate;
protected $restaurants;
public function __construct($reportType, $states, $startDate, $endDate, $restaurants = [])
{
$this->reportType = $reportType;
$this->states = $states;
$this->startDate = $startDate;
$this->endDate = $endDate;
$this->restaurants = $restaurants;
}
public function view(): View
{
$data = collect();
if ($this->reportType === 'Total Subscribed') {
$query = Subscriptions::query();
if (!empty($this->states)) {
$query->whereHas('iamPrincipal', function ($q) {
$q->whereIn('state_xid', $this->states);
});
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
// dd($data);
} elseif ($this->reportType === 'Total Users') {
$query = IamPrincipal::query()->where('principal_type_xid',3);
if (!empty($this->states)) {
$query->whereIn('state_xid', $this->states);
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
} elseif ($this->reportType === 'Redemptions') {
$query = RedeemRestaurant::with(['restaurant', 'customer'])->where('is_redeem', 0);
if (!empty($this->states)) {
$query->whereHas('customer', function ($q) {
$q->whereIn('state_xid', $this->states);
});
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
} elseif ($this->reportType === 'Redemptions for Specific Restaurants') {
$query = RedeemRestaurant::with('restaurant', 'customer');
if (!empty($this->restaurants)) {
$query->whereIn('manage_restaurants_xid', $this->restaurants);
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
} elseif ($this->reportType === 'Subscriptions Cancelled') {
$query = Subscriptions::query()->where('is_cancelled_subscription', 1);
if (!empty($this->states)) {
$query->whereHas('iamPrincipal', function ($q) {
$q->whereIn('state_xid', $this->states);
});
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
}
elseif ($this->reportType === 'Subscriptions Cancelled') {
$query = Subscriptions::with('iamPrincipal')->where('is_cancelled_subscription', 1);
if (!empty($this->states)) {
$query->whereHas('iamPrincipal', function ($q) {
$q->whereIn('state_xid', $this->states);
});
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
}
elseif ($this->reportType === 'Referrals Made') {
$query = ReferralUsers::query()
->with(['referredUser', 'referredUser.state'])
->whereHas('referredUser', function ($query) {
$query->whereIn('state_xid', $this->states);
});
if (!empty($this->startDate)) {
$query->whereDate('referred_date_time', '>=', $this->startDate);
}
if (!empty($this->endDate)) {
$query->whereDate('referred_date_time', '<=', $this->endDate);
}
$data = $query->get();
}
elseif ($this->reportType === 'Referees Joined') {
$query = ReferralUsers::query()
->with(['refeersUser', 'refeersUser.state'])
->whereHas('refeersUser', function ($query) {
$query->whereIn('state_xid', $this->states);
});
if (!empty($this->startDate)) {
$query->whereDate('referred_date_time', '>=', $this->startDate);
}
if (!empty($this->endDate)) {
$query->whereDate('referred_date_time', '<=', $this->endDate);
}
$data = $query->get();
}
return view('exports.reports', [
'data' => $data,
'reportType' => $this->reportType
]);
return $data;
}
}

View File

@@ -10,14 +10,23 @@ class FeedbakExport implements FromCollection, WithHeadings
{
public function collection()
{
return ManageFeedback::with(['principal', 'feedbackReaction'])->get()->map(function ($feedback) {
return ManageFeedback::with(['principal', 'feedbackReaction', 'restaurant'])->get()->map(function ($feedback) {
$feedbackType = 'N/A';
if ($feedback->is_app_feedback) {
$feedbackType = 'App Feedback';
} elseif ($feedback->is_restaurant_feedback) {
$feedbackType = 'Restaurant Feedback';
}
return [
'Customer Id' => $feedback->principal ? $feedback->principal->id : 'N/A',
'First Name' => $feedback->principal ? $feedback->principal->first_name : 'N/A',
'Last Name' => $feedback->principal ? $feedback->principal->last_name : 'N/A',
'Feedback Reaction' => $feedback->feedbackReaction ? $feedback->feedbackReaction->feedback_reaction_title : 'N/A',
'Comment' => $feedback->comment,
'Date Received' => $feedback->created_at,
'Date Received' => \Carbon\Carbon::parse($feedback->created_at)->format('m/d/Y'),
'Feedback Type' => $feedbackType,
'Restaurant Name' => $feedback->restaurant ? $feedback->restaurant->name : 'N/A',
];
});
}
@@ -30,7 +39,12 @@ class FeedbakExport implements FromCollection, WithHeadings
'Last Name',
'Feedback Reaction',
'Comment',
'Date Received'
'Date Received',
'App Feedback',
'Restaurant Feedback',
'Restaurant Name'
];
}
}

View File

@@ -0,0 +1,183 @@
<?php
namespace App\Exports;
use App\Models\IamPrincipal;
use App\Models\RedeemRestaurant;
use App\Models\Subscriptions;
use App\Models\ReferralUsers;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
class ReportExports implements FromView
{
protected $reportType;
protected $states;
protected $startDate;
protected $endDate;
protected $restaurants;
public function __construct($reportType, $states, $startDate, $endDate, $restaurants = [])
{
$this->reportType = $reportType;
$this->states = $states;
$this->startDate = $startDate;
$this->endDate = $endDate;
$this->restaurants = $restaurants;
}
public function view(): View
{
$data = collect();
if ($this->reportType === 'Total Subscribed') {
$query = Subscriptions::query();
if (!empty($this->states)) {
$query->whereHas('iamPrincipal', function ($q) {
$q->whereIn('state_xid', $this->states);
});
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
// dd($data);
} elseif ($this->reportType === 'Total Users') {
$query = IamPrincipal::query()->where('principal_type_xid',3);
if (!empty($this->states)) {
$query->whereIn('state_xid', $this->states);
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
} elseif ($this->reportType === 'Redemptions') {
$query = RedeemRestaurant::with(['restaurant', 'customer'])->where('is_redeem', 0);
if (!empty($this->states)) {
$query->whereHas('customer', function ($q) {
$q->whereIn('state_xid', $this->states);
});
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
} elseif ($this->reportType === 'Redemptions for Specific Restaurants') {
$query = RedeemRestaurant::with('restaurant', 'customer');
if (!empty($this->restaurants)) {
$query->whereIn('manage_restaurants_xid', $this->restaurants);
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
} elseif ($this->reportType === 'Subscriptions Cancelled') {
$query = Subscriptions::query()->where('is_cancelled_subscription', 1);
if (!empty($this->states)) {
$query->whereHas('iamPrincipal', function ($q) {
$q->whereIn('state_xid', $this->states);
});
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
}
elseif ($this->reportType === 'Subscriptions Cancelled') {
$query = Subscriptions::with('iamPrincipal')->where('is_cancelled_subscription', 1);
if (!empty($this->states)) {
$query->whereHas('iamPrincipal', function ($q) {
$q->whereIn('state_xid', $this->states);
});
}
if ($this->startDate) {
$query->whereDate('created_at', '>=', $this->startDate);
}
if ($this->endDate) {
$query->whereDate('created_at', '<=', $this->endDate);
}
$data = $query->get();
}
elseif ($this->reportType === 'Referrals Made') {
$query = ReferralUsers::query()
->with(['referredUser', 'referredUser.state'])
->whereHas('referredUser', function ($query) {
$query->whereIn('state_xid', $this->states);
});
if (!empty($this->startDate)) {
$query->whereDate('referred_date_time', '>=', $this->startDate);
}
if (!empty($this->endDate)) {
$query->whereDate('referred_date_time', '<=', $this->endDate);
}
$data = $query->get();
}
elseif ($this->reportType === 'Referees Joined') {
$query = ReferralUsers::query()
->with(['refeersUser', 'refeersUser.state'])
->whereHas('refeersUser', function ($query) {
$query->whereIn('state_xid', $this->states);
});
if (!empty($this->startDate)) {
$query->whereDate('referred_date_time', '>=', $this->startDate);
}
if (!empty($this->endDate)) {
$query->whereDate('referred_date_time', '<=', $this->endDate);
}
$data = $query->get();
}
return view('exports.report', [
'data' => $data,
'reportType' => $this->reportType
]);
}
}

View File

@@ -15,8 +15,9 @@ class RestaurantExport implements FromCollection, WithHeadings
public function collection()
{
return ManageRestaurant::select(
'id',
'name',
'description',
// 'description',
'phone_number',
'restaurant_id',
'address',
@@ -36,8 +37,9 @@ class RestaurantExport implements FromCollection, WithHeadings
public function headings(): array
{
return [
'Id',
'Restaurant Name',
'Description',
// 'Description',
'Phone Number',
'Restaurant Id',
'Address',

View File

@@ -27,8 +27,9 @@ class RestaurantExportSelected implements FromCollection, WithHeadings
$selected_restaurant = ManageRestaurant::whereIn('id', $selectedCareIds)
->orderBy('id', 'Desc')
->select(
'id',
'name',
'description',
// 'description',
'phone_number',
'restaurant_id',
'address',
@@ -50,8 +51,9 @@ class RestaurantExportSelected implements FromCollection, WithHeadings
public function headings(): array
{
return [
'Id',
'Restaurant Name',
'Description',
// 'Description',
'Phone Number',
'Restaurant Id',
'Address',

View File

@@ -5,56 +5,63 @@ namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use App\Models\IamPrincipal;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Illuminate\Support\Collection;
class customer_export implements FromCollection , WithHeadings
class customer_export implements FromCollection, WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
* @return \Illuminate\Support\Collection
*/
public function collection()
{
$customers = IamPrincipal::where('principal_type_xid', 3)
->with(['isSubscribed', 'state'])
->select(
'id',
'first_name',
'last_name',
'email_address',
'date_of_birth',
'state_xid',
'phone_number'
)
->get();
$serial = 1;
return $customers->map(function ($customer) use (&$serial) {
$subscription = $customer->isSubscribed->first();
$dateTime = now();
$formattedDateTime = $dateTime->format('Y-m-d H:i:s');
$isSubscribed = $subscription && $subscription->next_payment_date >= $formattedDateTime && $subscription->status == 'complete' ? 'Subscribed' : 'Unsubscribed';
public function collection(){
return IamPrincipal::where('principal_type_xid',3)
->select('first_name',
'last_name',
'email_address',
'date_of_birth',
'state_xid',
'phone_number'
)
->get()
->map(function ($customer) {
return [
'first_name' => $customer->first_name,
'last_name' => $customer->last_name,
'Sr No.' => $serial++, // Increment serial number
'id' => $customer->id,
'first_name' => $customer->first_name,
'last_name' => $customer->last_name,
'email_address' => $customer->email_address,
'date_of_birth'=> \Carbon\Carbon::parse($customer->date_of_birth)->format('m/d/Y'),
'state_xid' => $customer->state->name ?? '', // Access the state name and handle null
'phone_number' => $customer->phone_number,
'date_of_birth' => \Carbon\Carbon::parse($customer->date_of_birth)->format('m/d/Y'),
'state_name' => $customer->state->name ?? '', // Access the state name and handle null
'phone_number' => $customer->phone_number,
'subscription_status' => $isSubscribed, // Add the subscription status
];
});
}
//function header in excel
public function headings(): array
{
return [
'first_name',
'last_name',
'email_address',
'date_of_birth',
'state_name',
'phone_number'
// Function to provide the headings in Excel
public function headings(): array
{
return [
'Sr No.',
'User Id',
'First Name',
'Last Name',
'Email Address',
'Date of Birth',
'State Name',
'Phone Number',
'Subscription Status',
];
}
}

View File

@@ -25,10 +25,11 @@ class customer_export_selected implements FromCollection, WithHeadings
// Log the ids for debugging purposes
Log::info('Fetching data for IDs: ' . implode(',', $this->ids));
$selected_customer = IamPrincipal::whereIn('id', $this->ids)
->with('state:id,name') // Eager load the state relationship
$selected_customers = IamPrincipal::whereIn('id', $this->ids)
->with(['state:id,name', 'isSubscribed']) // Eager load the state and subscription relationships
->orderBy('id', 'desc')
->select(
'id',
'first_name',
'last_name',
'email_address',
@@ -36,33 +37,45 @@ class customer_export_selected implements FromCollection, WithHeadings
'state_xid',
'phone_number'
)
->get()
->map(function ($customer) {
return [
'first_name' => $customer->first_name,
'last_name' => $customer->last_name,
'email_address' => $customer->email_address,
'date_of_birth' => \Carbon\Carbon::parse($customer->date_of_birth)->format('m/d/Y'), // Format the date
'state_xid' => $customer->state->name ?? '', // Access the state name and handle null
'phone_number' => $customer->phone_number,
];
});
->get();
$serial = 1;
$mappedCustomers = $selected_customers->map(function ($customer) use (&$serial) {
$subscription = $customer->isSubscribed->first();
$dateTime = now();
$formattedDateTime = $dateTime->format('Y-m-d H:i:s');
$isSubscribed = $subscription && $subscription->next_payment_date >= $formattedDateTime && $subscription->status == 'complete' ? 'Subscribed' : 'Unsubscribed';
return [
'Sr No.' => $serial++, // Increment serial number
'id' => $customer->id,
'first_name' => $customer->first_name,
'last_name' => $customer->last_name,
'email_address' => $customer->email_address,
'date_of_birth' => \Carbon\Carbon::parse($customer->date_of_birth)->format('m/d/Y'), // Format the date
'state_xid' => $customer->state->name ?? '', // Access the state name and handle null
'phone_number' => $customer->phone_number,
'subscription_status' => $isSubscribed, // Add the subscription status
];
});
// Log the fetched data for debugging purposes
Log::info('Fetched customer data: ' . $selected_customer->toJson());
Log::info('Fetched customer data: ' . $mappedCustomers->toJson());
return new Collection($selected_customer);
return new Collection($mappedCustomers);
}
public function headings(): array
{
return [
'Sr No.',
'User Id',
'First Name',
'Last Name',
'Email Address',
'Date of Birth',
'State Name',
'Phone Number'
'Phone Number',
'Subscription Status' // Add the heading for subscription status
];
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use App\Models\IamPrincipal;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Illuminate\Support\Collection;
// class restaurant_export implements FromCollection, WithHeadings
// {
// /**
// * @return \Illuminate\Support\Collection
// */
// public function collection()
// {
// $restaurant_users = IamPrincipal::where('principal_type_xid', 4)
// ->with('restaurant')
// ->select(
// 'id',
// 'first_name',
// 'last_name',
// 'email_address',
// 'date_of_birth',
// 'state_xid',
// 'phone_number'
// )
// ->get();
// $serial = 1;
// return $restaurant_users->map(function ($restaurant_user) use (&$serial) {
// return [
// 'Sr No.' => $serial++, // Increment serial number
// 'id' =>$restaurant_user->id,
// 'first_name' => $restaurant_user->first_name,
// 'last_name' => $restaurant_user->last_name,
// 'email_address' => $restaurant_user->email_address,
// 'date_of_birth' => \Carbon\Carbon::parse($restaurant_user->date_of_birth)->format('m/d/Y'),
// 'state_xid' =>$restaurant_user->state->name ?? '', // Access the state name and handle null
// 'phone_number' => $restaurant_user->phone_number,
// ];
// });
// }
// // Function to provide the headings in Excel
// public function headings(): array
// {
// return [
// 'Sr No.',
// 'User Id',
// 'First Name',
// 'Last Name',
// 'Email Address',
// 'Date of Birth',
// 'State Name',
// 'Phone Number',
// ];
// }
// }
//
class restaurant_export implements FromCollection, WithHeadings
{
public function collection()
{
// Fetch restaurant users with their related restaurant roles and state
$restaurant_users = IamPrincipal::where('principal_type_xid', 4)
->with(['getresturant.restaurant', 'state'])
->get();
$serial = 1;
return $restaurant_users->flatMap(function ($restaurant_user) use (&$serial) {
return $restaurant_user->getresturant->map(function ($role) use (&$serial, $restaurant_user) {
return [
'Sr No.' => $serial++,
'User Id' => $restaurant_user->id,
'First Name' => $restaurant_user->first_name,
'Last Name' => $restaurant_user->last_name,
'Email Address' => $restaurant_user->email_address,
'Date of Birth' => \Carbon\Carbon::parse($restaurant_user->date_of_birth)->format('m/d/Y'),
// 'State Name' => $restaurant_user->state->name ?? '',
'Phone Number' => $restaurant_user->phone_number,
'Restaurant Name' => $role->restaurant->name ?? '',
'Restaurant Address' => $role->restaurant->address ?? '',
];
});
});
}
public function headings(): array
{
return [
'Sr No.',
'User Id',
'First Name',
'Last Name',
'Email Address',
'Date of Birth',
// 'State Name',
'Phone Number',
'Restaurant Name',
'Restaurant Address',
];
}
}

View File

@@ -0,0 +1,142 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use App\Models\IamPrincipal;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
// class restaurant_export_selected implements FromCollection, WithHeadings
// {
// protected $ids;
// public function __construct($ids)
// {
// $this->ids = is_array($ids) ? $ids : explode(',', $ids);
// }
// /**
// * @return \Illuminate\Support\Collection
// */
// public function collection()
// {
// Log::info('Fetching data for IDs: ' . implode(',', $this->ids));
// $selected_customers = IamPrincipal::whereIn('id', $this->ids)
// ->with('state:id,name')
// ->orderBy('id', 'desc')
// ->select(
// 'id',
// 'first_name',
// 'last_name',
// 'email_address',
// 'date_of_birth',
// 'state_xid',
// 'phone_number'
// )
// ->get();
// $serial = 1;
// $mappedCustomers = $selected_customers->map(function ($customer) use (&$serial) {
// return [
// 'Sr No.' => $serial++,
// 'id' => $customer->id,
// 'first_name' => $customer->first_name,
// 'last_name' => $customer->last_name,
// 'email_address' => $customer->email_address,
// 'date_of_birth' => \Carbon\Carbon::parse($customer->date_of_birth)->format('m/d/Y'),
// 'state_xid' => $customer->state->name ?? '',
// 'phone_number' => $customer->phone_number,
// ];
// });
// Log::info('Fetched customer data: ' . $mappedCustomers->toJson());
// return new Collection($mappedCustomers);
// }
// public function headings(): array
// {
// return [
// 'Sr No.',
// 'User Id',
// 'First Name',
// 'Last Name',
// 'Email Address',
// 'Date of Birth',
// 'State Name',
// 'Phone Number'
// ];
// }
// }
class restaurant_export_selected implements FromCollection, WithHeadings
{
protected $ids;
public function __construct($ids)
{
$this->ids = is_array($ids) ? $ids : explode(',', $ids);
}
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
Log::info('Fetching data for IDs: ' . implode(',', $this->ids));
$selected_customers = IamPrincipal::whereIn('id', $this->ids)
->with(['state', 'getresturant.restaurant'])
->orderBy('id', 'desc')
->select(
'id',
'first_name',
'last_name',
'email_address',
'date_of_birth',
'state_xid',
'phone_number'
)
->get();
$serial = 1;
$mappedCustomers = $selected_customers->flatMap(function ($customer) use (&$serial) {
return $customer->getresturant->map(function ($role) use (&$serial, $customer) {
return [
'Sr No.' => $serial++,
'User Id' => $customer->id,
'First Name' => $customer->first_name,
'Last Name' => $customer->last_name,
'Email Address' => $customer->email_address,
'Date of Birth' => \Carbon\Carbon::parse($customer->date_of_birth)->format('m/d/Y'),
// 'State Name' => optional($customer->state)->name ?? 'NA',
'Phone Number' => $customer->phone_number,
'Restaurant Name' => optional($role->restaurant)->name ?? 'NA',
'Restaurant Address' => optional($role->restaurant)->address ?? 'NA',
];
});
});
Log::info('Fetched customer data: ' . $mappedCustomers->toJson());
return new Collection($mappedCustomers);
}
public function headings(): array
{
return [
'Sr No.',
'User Id',
'First Name',
'Last Name',
'Email Address',
'Date of Birth',
// 'State Name',
'Phone Number',
'Restaurant Name',
'Restaurant Address'
];
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\Customer_API;
namespace App\Http\Controllers\APIs\Customer_API;
use App\Http\Controllers\Controller;
use App\Services\APIs\CustomerAPIs\AuthServices;
@@ -101,7 +101,7 @@ class AuthController extends Controller
}
},
],
'phone_number' => 'required|min:10',
'phone_number' => 'required|numeric|min:10',
// 'address_line1' => 'required|max:50',
'state_xid' => 'required',
@@ -164,7 +164,7 @@ class AuthController extends Controller
function ($attribute, $value, $fail) {
$existingUser = IamPrincipal::where('email_address', $value)->where('principal_type_xid', 3)->whereNull('deleted_at')->exists();
if (!$existingUser) {
$fail('The selected email address is invalid.');
$fail('Entered e-mail address is not in our system.');
}
},
],
@@ -269,4 +269,20 @@ class AuthController extends Controller
return response()->json(__('something_went_wrong'), 500);
}
}
/**
* Created By : Sayli Raut
* Created at : 19 June 2024
* Use : Search State.
*/
public function searchState(Request $request)
{
try {
return $this->AuthServices->searchState($request);
} catch (\Exception $ex) {
Log::error("Login API Failed: " . $ex->getMessage());
return jsonResponseWithErrorMessage(__('error_message.something_went_wrong'), 500);
}
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\Customer_API;
namespace App\Http\Controllers\APIs\Customer_API;
use App\Http\Controllers\Controller;
use App\Services\APIs\CustomerAPIs\CMSApiServices;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\Customer_API;
namespace App\Http\Controllers\APIs\Customer_API;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Log;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\Customer_API;
namespace App\Http\Controllers\APIs\Customer_API;
use App\Http\Controllers\Controller;
use App\Models\IamPrincipal;
@@ -12,6 +12,8 @@ use Carbon\Carbon;
use Tymon\JWTAuth\Facades\JWTAuth;
use Illuminate\Support\Facades\Session;
use Illuminate\Http\Request;
use App\Models\Subscriptions;
use Stripe\Subscription;
class CustomerControllerApi extends Controller
{
@@ -168,7 +170,42 @@ class CustomerControllerApi extends Controller
if ($token) {
$iamPrincipalId = $token['sub'];
$deleteUser = IamPrincipal::find($iamPrincipalId);
$stripeSecret = (config('constants.subscription.stripe_secret_key'));
// $stripeSecret = env('STRIPE_SECRET');
$stripe = new \Stripe\StripeClient($stripeSecret);
$userId = $iamPrincipalId;
// dd($id,$stripeSecret);
$getSubscriptionData = Subscriptions::where('iam_principal_xid', $userId)->where('subscription_status', 'active')->first();
if ($getSubscriptionData) {
$subscriptionId = $getSubscriptionData->subscription_id;
$cancelledSubscription = $stripe->subscriptions->update(
$subscriptionId,
['cancel_at_period_end' => true]
);
$subscriptionFromDatabase = Subscriptions::where('subscription_id', $subscriptionId)->first();
$subscriptionFromDatabase->cancelled_at = date('Y-m-d H:i:s', $cancelledSubscription->canceled_at);
$subscriptionFromDatabase->subscription_status = $cancelledSubscription->status;
$subscriptionFromDatabase->is_cancelled_subscription = 1;
$subscriptionFromDatabase->status = "cancelled";
$subscriptionFromDatabase->save();
$getSubscription = $stripe->subscriptions->retrieve($subscriptionFromDatabase->subscription_id, []);
$getSubscribeCustomer = $stripe->customers->retrieve(
$subscriptionFromDatabase->stripe_customer_id,
[]
);
}
$deleteUser = IamPrincipal::find($userId);
$deleteUser->one_signal_player_id = null;
$deleteUser->save();
@@ -187,4 +224,28 @@ class CustomerControllerApi extends Controller
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
/**
* Created By : sayli Raut
* Created at : 15 July 2024
* Use : To get user subscription status.
*/
public function CheckSubscription()
{
try {
$token = readHeaderToken();
if ($token) {
$customerIamId = $token['sub'];
$response = $this->CustomerApiServices->CheckSubscription($customerIamId);
return jsonResponseWithSuccessMessageApi(__('auth.data_fetched_successfully'), ['is_subscribed' => $response], 200);
} else {
return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
}
} catch (Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\Customer_API;
namespace App\Http\Controllers\APIs\Customer_API;
use App\Http\Controllers\Controller;
use App\Models\FeedbackReaction;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\Customer_API;
namespace App\Http\Controllers\APIs\Customer_API;
use Illuminate\Support\Facades\Log;
use App\Helpers\onesignalhelper;
use Illuminate\Support\Facades\Validator;
@@ -24,7 +24,7 @@ class NotificationController extends Controller
$page = $request->query('page', 1);
if ($customerIamId) {
$notificationsData = NotificationDetails::where('principal_xid', $customerIamId)->orderBy('id', 'Desc')->get();
$notificationsData = NotificationDetails::where('principal_xid', $customerIamId)->where('is_active', 1)->orderBy('id', 'Desc')->get();
$totalItems = $notificationsData->count();
$totalPages = ceil($totalItems / $perPage);

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\Customer_API;
namespace App\Http\Controllers\APIs\Customer_API;
use App\Http\Controllers\Controller;
use App\Services\APIs\CustomerAPIs\RestaurantApiServices;
@@ -171,7 +171,7 @@ class RestaurantControllerApi extends Controller
}
}
/**
/**
* Created By : Sayli Raut
* Created at : 04 June 2024
* Use : To redeem restaurant.
@@ -198,4 +198,26 @@ class RestaurantControllerApi extends Controller
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
/**
* Created By : Sayli Raut
* Created at : 20 June 2024
* Use : To search from restaurant.
*/
public function searchRestaurant(Request $request)
{
try {
$token = readHeaderToken();
if ($token) {
$customerIamId = $token['sub'];
return $this->RestaurantApiServices->searchRestaurant($customerIamId, $request);
} else {
return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
}
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
}

View File

@@ -0,0 +1,64 @@
<?php
namespace App\Http\Controllers\APIs\Customer_API;
use App\Http\Controllers\Controller;
use App\Services\APIs\CustomerAPIs\RulesApiServices;
use Illuminate\Support\Facades\Log;
use Illuminate\Http\Request;
class RulesControllerAPI extends Controller
{
protected $RulesApiServices;
public function __construct(RulesApiServices $RulesApiServices)
{
$this->RulesApiServices = $RulesApiServices;
}
/**
* Created By : sayli Raut
* Created at : 19 June 2024
* Use : To get voucher rules and regulation.
*/
public function getVoucherRules()
{
try {
$token = readHeaderToken();
if ($token) {
$customerIamId = $token['sub'];
$response = $this->RulesApiServices->getVoucherRules();
return jsonResponseWithSuccessMessageApi(__('success.data_fetched_successfully'), $response, 200);
} else {
return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
}
} catch (\Exception $e) {
Log::error('Voucher rules get data controller function failed: ' . $e->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
/**
* Created By : sayli Raut
* Created at : 22 Jully 2024
* Use : To get referral rules and regulation.
*/
public function getReferralRules()
{
try {
$token = readHeaderToken();
if ($token) {
$customerIamId = $token['sub'];
$response = $this->RulesApiServices->getReferralRules();
return jsonResponseWithSuccessMessageApi(__('success.data_fetched_successfully'), $response, 200);
} else {
return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
}
} catch (\Exception $e) {
Log::error('Referral rules get data controller function failed: ' . $e->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
}

View File

@@ -0,0 +1,351 @@
<?php
namespace App\Http\Controllers\APIs\Customer_API;
use App\Helpers\onesignalhelper;
use App\Http\Controllers\Controller;
use App\Models\IamPrincipal;
use App\Models\ReferralUsers;
use App\Models\SubscriptionProducts;
use App\Models\Subscriptions;
use Illuminate\Http\Request;
use Stripe\Event;
use Stripe\Stripe;
use Carbon\Carbon;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\DB;
use DateTime;
class StripeWebhookController extends Controller
{
//
public function getWebhook(Request $request)
{
// dd("ssssss",$request);
Log::info('Stripe Webhook Received= in getWebhook ');
}
public function handleWebhook(Request $request)
{
Log::info("webhook At line 1");
// Verify the webhook signature for security
$secret = config('constants.subscription.webhook_secret'); // Your webhook secret key
$payload = $request->getContent();
$sigHeader = $request->header('Stripe-Signature');
$event = null;
try {
$event = Event::constructFrom(
json_decode($payload, true),
$sigHeader,
config('constants.subscription.webhook_secret')
);
} catch (\UnexpectedValueException $e) {
// Invalid payload
return response()->json(['error' => 'Invalid payload'], 400);
} catch (\Stripe\Exception\SignatureVerificationException $e) {
// Signature verification failed
return response()->json(['error' => 'Signature verification failed'], 400);
}
// $stripeSecret = config('services.stripe.key');
$stripeSecret = (config('constants.subscription.stripe_secret_key'));
Log::info("webhook called");
$stripe = new \Stripe\StripeClient($stripeSecret);
if ($event->type === 'checkout.session.completed') {
try {
DB::beginTransaction();
// Handle successful subscription payment
// You can access event data like $event->data->object
// Session::flush();
$session = $event->data->object;
$metadata = $session->metadata;
if ($metadata == null || empty($metadata)) {
return response('Webhook Metadata received at null ', 200);
}
$userId = $metadata->userId;
$userEmail = $metadata->userEmail;
$subscriptionProductId = $metadata->subscriptionProductXid;
$isReferralSubscription = $metadata->is_referral_subscription;
$isCustomReferralCodeApplied = $metadata->isCustomReferralCodeApplied;
$referralUserId = $metadata->referral_user_id;
if ($isReferralSubscription == 1 && $isCustomReferralCodeApplied == 0) {
//who has refer the Subscription to Current user
Log::info("Referral User Subscription Updating Function Starts");
$referralUserSubscriptionData = Subscriptions::where('iam_principal_xid', $referralUserId)->where('subscription_status', '=', 'active')->first();
// $stripe->subscriptions->update(
// $referralUserSubscriptionData->subscription_id,
// ['proration_behavior' => 'none']
// );
if ($referralUserSubscriptionData && $referralUserSubscriptionData->is_cancelled_subscription == 0) {
//update subscription add 30 days trial period to this subscription
$nextPaymentDate = $referralUserSubscriptionData->next_payment_date;
// we are setting next payment date based on REFERRAL .. IF USER HAS NOT REFERRED YET.. then it will take next_payment_date
//Otherwise IT need to take THE LAST REFERRED DATA
// $userLastReferredDate = ReferralUsers::where('iam_principal_xid',$referralUserId)->last();
$userLastReferredDate = ReferralUsers::where('iam_principal_xid', $referralUserId)
->orderBy('referred_date_time', 'desc')
->first();
if ($userLastReferredDate) {
Log::info("trial date added for multiple time");
$date = new DateTime($referralUserSubscriptionData->next_payment_date);
// $date = new DateTime($nextPaymentDate);
$date->modify('+30 days');
} else {
$date = new DateTime($nextPaymentDate);
}
$newDate = $date->format('Y-m-d H:i:s');
Log::info("new Date = ");
Log::info($newDate);
$timestampForReferralUser = $date->getTimestamp();
Log::info($timestampForReferralUser);
$updateSubscription = $stripe->subscriptions->update(
$referralUserSubscriptionData->subscription_id,
['trial_end' => $timestampForReferralUser]
);
$SubscriptionObject = $stripe->subscriptions->retrieve($referralUserSubscriptionData->subscription_id, []);
$upcoming_invoice = $stripe->invoices->upcoming([
'subscription' => $referralUserSubscriptionData->subscription_id, // use retrieved id from subscription
]);
Log::info("UPCOMING INVOICE");
Log::info($upcoming_invoice);
$referralUserSubscriptionData->current_period_start = date('Y-m-d H:i:s', $SubscriptionObject->current_period_start);
$referralUserSubscriptionData->current_period_end = date('Y-m-d H:i:s', $SubscriptionObject->current_period_end);
$referralUserSubscriptionData->next_payment_date = date('Y-m-d H:i:s', $upcoming_invoice->next_payment_attempt);
$referralUserSubscriptionData->next_invoice_amount = $upcoming_invoice->amount_due / 100;
$referralUserSubscriptionData->save();
Log::info("Referral User Subscription Updated with Referral");
//updated the Referral Users Subscription.
}
}
$subscriptionProductData = SubscriptionProducts::where('id', $subscriptionProductId)->first();
//checkout store in db
$subscriptionData = $stripe->checkout->sessions->retrieve($session->id, []);
$SubscriptionObject = $stripe->subscriptions->retrieve($subscriptionData->subscription, []);
//update proration behavior
// $stripe->subscriptions->update(
// $subscriptionData->subscription,
// ['proration_behavior' => 'none']
// );
//update proration behavior
$priceObject = $stripe->prices->retrieve($SubscriptionObject->plan->id, []);
$amountSubtotalDollars = $subscriptionData->amount_total / 100;
// Log::info('Subscription has been started ');
$subscriptionObjectFromInvoice = $stripe->subscriptions->retrieve($subscriptionData->subscription, []);
$upcoming_invoice = $stripe->invoices->upcoming([
'subscription' => $subscriptionData->subscription, // use retrieved id from subscription
]);
$id = Subscriptions::updateOrCreate(
['iam_principal_xid' => $userId,
'subscription_product_xid' => $subscriptionProductId],
[
'subscription_id' => $subscriptionData->subscription,
'amount' => $amountSubtotalDollars,
'stripe_customer_id' => $subscriptionData->customer,
'subscription_status' => $subscriptionObjectFromInvoice->status,
'current_period_start' => date('Y-m-d H:i:s', $SubscriptionObject->current_period_start),
'current_period_end' => date('Y-m-d H:i:s', $SubscriptionObject->current_period_end),
'status' => 'complete',
'next_payment_date' => date('Y-m-d H:i:s', $upcoming_invoice->next_payment_attempt),
'next_invoice_amount' => $upcoming_invoice->amount_due / 100
]
);
if ($isReferralSubscription == 1 && $isCustomReferralCodeApplied == 1) {
Log::info("new User Subscription Updating Function Starts");
//update Current User subscription to add 30 days additional to their subscription end
$SubscriptionObject = $stripe->subscriptions->retrieve($subscriptionData->subscription, []);
$newUserSubscriptionDetails = Subscriptions::where('iam_principal_xid', $userId)
->where('subscription_product_xid', $subscriptionProductId)->first();
$nextPaymentDate = $newUserSubscriptionDetails->next_payment_date;
$date = new DateTime($nextPaymentDate);
// $date->modify('+30 days');
$newDate = $date->format('Y-m-d H:i:s');
Log::info("new Date = ");
Log::info($newDate);
$timestampForReferralUser = $date->getTimestamp();
Log::info(" Updating Function Starts");
$updateSubscription = $stripe->subscriptions->update(
$newUserSubscriptionDetails->subscription_id,
['trial_end' => $timestampForReferralUser]
);
Log::info(" Updating Function END");
$SubscriptionObject = $stripe->subscriptions->retrieve($newUserSubscriptionDetails->subscription_id, []);
$upcoming_invoice = $stripe->invoices->upcoming([
'subscription' => $newUserSubscriptionDetails->subscription_id, // use retrieved id from subscription
]);
$newUserSubscriptionDetails->current_period_start = date('Y-m-d H:i:s', $SubscriptionObject->current_period_start);
$newUserSubscriptionDetails->current_period_end = date('Y-m-d H:i:s', $SubscriptionObject->current_period_end);
$newUserSubscriptionDetails->next_payment_date = date('Y-m-d H:i:s', $upcoming_invoice->next_payment_attempt);
$newUserSubscriptionDetails->next_invoice_amount = $upcoming_invoice->amount_due / 100;
$newUserSubscriptionDetails->save();
Log::info("new User Subscription Updated with Referral");
Log::info("Creating entry in Referral User table");
Log::info($referralUserId);
Log::info($userId);
Log::info($isCustomReferralCodeApplied);
ReferralUsers::create([
'iam_principal_xid' => $referralUserId, //Referral User Xid
'referred_user_xid' => $userId, // new user Id
'referred_date_time' => Carbon::now(),
'isCustomReferralCodeApplied' =>$isCustomReferralCodeApplied
]);
Log::info("Created entry in Referral User table");
}
$getUserData = IamPrincipal::where('id', $userId)->first();
$title = "Congratulations your subscription is now active";
$message = $getUserData->first_name . " has subscribed for " . $subscriptionProductData->product_name;
$content_type = "new_subscription";
onesignalhelper::sendNotificationApi($getUserData->one_signal_player_id, $title, $message, $content_type, $image = null, $id = null);
Log::info('Subscription Taken Successfully by ');
DB::commit();
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage());
// return response()->json(['error' => __('something_went_wrong')], 500);
Log::error('Customer Subscription Checkout session function failed: ' . $e->getMessage() . $e->getLine());
DB::rollBack();
}
//end
}
if ($event->type === 'invoice.payment_succeeded') {
try {
DB::beginTransaction();
$invoice = $event->data->object;
$metadata = $invoice->metadata;
//
$productID = $invoice->lines->data[0]->price->product;
$subscriptionProductData = SubscriptionProducts::where('stripe_product_id', $productID)->first();
$customerID = $invoice->customer;
$subscriptionId = $invoice->lines->data[0]->subscription;
$subscriptionObject = $stripe->subscriptions->retrieve($subscriptionId, []);
$upcoming_invoice = $stripe->invoices->upcoming([
'subscription' => $subscriptionId, // use retrieved id from subscription
]);
$isCustomerStoredInSubscriptionTable = Subscriptions::where('stripe_customer_id', $customerID)->first();
if ($isCustomerStoredInSubscriptionTable == null) {
return response('Webhook received at null ', 200);
}
$subscriptionInDatabase = Subscriptions::where('stripe_customer_id', $customerID)->where('subscription_id', $subscriptionId)->where('is_cancelled_subscription', 0)->first();
$subscriptionInDatabase->subscription_status = $subscriptionObject->status;
$subscriptionInDatabase->current_period_end = date('Y-m-d H:i:s', $upcoming_invoice->next_payment_attempt);
$subscriptionInDatabase->status = 'complete';
$subscriptionInDatabase->next_payment_date = date('Y-m-d H:i:s', $upcoming_invoice->next_payment_attempt);
$subscriptionInDatabase->save();
$iamPrincialData = IamPrincipal::where('id', $subscriptionInDatabase->iam_principal_xid)->first();
$title = "Congratulations your Subscription has been Renewed";
$message = $iamPrincialData->first_name . " has subscribed for " . $subscriptionProductData->product_name;
$content_type = "recurring_subscription";
onesignalhelper::sendNotificationApi($iamPrincialData->one_signal_player_id, $title, $message, $content_type, $image = null, $id = null);
Log::info("Recurring Subscription has been Updated");
DB::commit();
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage());
// return response()->json(['error' => __('something_went_wrong')], 500);
DB::rollBack();
Log::error('Customer Subscription Invoice payment function failed:' . $e->getMessage());
}
// write your code here
// after successful event this actions will be taken
//hritik code
}
return response('Webhook received', 200);
}
}

View File

@@ -0,0 +1,438 @@
<?php
namespace App\Http\Controllers\APIs\Customer_API;
use App\Http\Controllers\Controller;
use App\Models\CustomReferralCode;
use App\Models\Faq;
use App\Models\IamPrincipal;
use App\Models\SubscriptionProducts;
use App\Models\Subscriptions;
use App\Services\APIs\CustomerAPIs\RulesApiServices;
use Illuminate\Support\Facades\Log;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Redirect;
class SubscriptionController extends Controller
{
//created by; Hritik
//On - 28th June ,2024
//use - to get Data of User in Webview and show list of product
public function mySubscription(Request $request)
{
try {
$token = readHeaderToken();
$getCustomToken = CustomReferralCode::where('is_active',1)->first();
// $token = true;
// dd($token, Session::get('vendorToken'));
if ($token) {
// $user_id = 104;
$user_id = $token['sub'];
$dateTime = now();
$formattedDateTime = $dateTime->format('Y-m-d H:i:s');
$isSubscribedUser = Subscriptions::where('iam_principal_xid', $user_id)
->where('next_payment_date', '>=', $formattedDateTime)
->first();
$userData = IamPrincipal::where('id', $user_id)->first();
// $request['iam_principal_id'] = $user_id;
$products = SubscriptionProducts::where('is_active', '1')->get();
if ($isSubscribedUser) {
return view("Admin.pages.subscriptions.my-subscription", compact('user_id', 'userData', 'isSubscribedUser', 'products'));
}
$productList = SubscriptionProducts::where('is_active', 1)->first();
$faqs = Faq::where('faq_category_id',3)->where('is_active','1')->get(); //getting only subscription faqS
return view('Admin.pages.subscriptions.list-of-products', compact('productList', 'userData','faqs','getCustomToken'));
} else {
return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
}
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'));
}
}
//created by; Hritik
//On - 28th June ,2024
//use - to get Data of User in Webview and show list of product
public function listOfProduct(Request $request)
{
try {
$productList = SubscriptionProducts::where('is_active', 1)->first();
return view('Admin.pages.subscriptions.list-of-products', compact('productList'));
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'));
}
}
//created by; Hritik
//On - 02th July ,2024
//use - to Create Subscription Product & price for Monthly
public function createStripeProduct(Request $request)
{
try {
DB::beginTransaction();
$stripeSecret = (config('constants.subscription.stripe_secret_key'));
// $stripeSecret = env('STRIPE_SECRET');
$stripe = new \Stripe\StripeClient($stripeSecret);
// dd($stripeSecret,$stripe,$request->all());
$validator = $this->validateSubscriptionsproductForm($request);
if ($validator->fails()) {
$validationErrors = $validator->errors()->all();
Log::error("Stripe subscriptions plan validation error: " . implode(", ", $validationErrors));
return jsonResponseWithErrorMessageApi($validationErrors, 203);
}
$id = SubscriptionProducts::create([
'product_name' => $request->product_name,
'product_value' => $request->product_value,
'product_details' => $request->product_details,
]);
$productCreate = $stripe->products->create([
'name' => $request->product_name,
]);
$updateCreatedPlan = SubscriptionProducts::where('id', $id->id)->update([
'stripe_product_id' => $productCreate->id
]);
$totalPrice = $request->product_value;
if ($totalPrice && $totalPrice != 0 && $totalPrice != null) {
$productPrice1 = $stripe->prices->create([
'unit_amount' => $totalPrice * 100,
// amount entered by Admin (in cents)
'currency' => 'usd',
'recurring' => ['interval' => 'month'],
'product' => $productCreate->id,
'nickname' => 'Monthly Price',
]);
$updateCreatedPlan = SubscriptionProducts::where('id', $id->id)->update([
'stripe_price_id' => $productPrice1->id
]);
}
DB::commit();
return jsonResponseWithSuccessMessage(__('success.save_data'), 200);
} catch (\Exception $ex) {
DB::rollBack();
Log::error('Favourite Restaurant service failed: ' . $ex->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
//update trial Period
public function updateTrialPeriod(Request $request)
{
try {
DB::beginTransaction();
$stripeSecret = config('constants.subscription.stripe_secret_key');
$validator = Validator::make(
$request->all(),
[
'stripe_id' => 'required',
'timestamp_to_update' => 'required',
]
);
if ($validator->fails()) {
$validationErrors = $validator->errors()->all();
Log::error("Stripe subscriptions plan validation error: " . implode(", ", $validationErrors));
return jsonResponseWithErrorMessageApi($validationErrors, 203);
}
// $stripeSecret = env('STRIPE_SECRET');
$stripe = new \Stripe\StripeClient($stripeSecret);
// dd($stripeSecret,$stripe,$request->all());
$stripeId = $request->stripe_id;
$timestamp = $request->timestamp_to_update;
$updateSubscription = $stripe->subscriptions->update(
$stripeId,
['trial_end' => $timestamp] //8 RD aUG
);
//8 sept
// 13th aug
DB::commit();
return jsonResponseWithSuccessMessage('success.save_data', $updateSubscription);
} catch (\Exception $ex) {
DB::rollBack();
Log::error('Favourite Restaurant service failed: ' . $ex->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
public function validateSubscriptionsproductForm(Request $request)
{
return Validator::make(
$request->all(),
[
'product_name' => 'required',
'product_value' => 'required',
'product_details' => 'required',
]
);
}
//created by; Hritik
//On - 02th July ,2024
//use - to Create Subscription
public function subscriptionToPlan(Request $request)
{
try {
$isCustomReferralCodeApplied = 0;
$customReferralCode = CustomReferralCode::where('referral_code', $request->referral_code_to_check)->where('is_active',1)->first();
if($customReferralCode && $customReferralCode->referral_code &&
$customReferralCode->referral_code == $request->referral_code_to_check){
$isCustomReferralCodeApplied = 1;
}else{
$isCustomReferralCodeApplied = 0;
}
$isReferralSubscription = 0;
$referralUserId = $request->referral_user_id;
if ($referralUserId && $referralUserId != null) {
$isReferralSubscription = 1;
} else {
$isReferralSubscription = 0;
}
$userId = $request->user_id;
$subscriptionProductXid = $request->subscription_product_xid;
$stripeSecret = (config('constants.subscription.stripe_secret_key'));
$stripe = new \Stripe\StripeClient($stripeSecret);
// $taxId = (config('services.stripe.tax_id'));
$userData = IamPrincipal::where('id', $userId)->first();
if ($userData) {
$subscriptionPlan = SubscriptionProducts::where('id', $subscriptionProductXid)->first();
if ($subscriptionPlan && $subscriptionPlan->stripe_price_id && $subscriptionPlan->stripe_price_id != null) {
$checkout = $stripe->checkout->sessions->create([
'customer_email' => $userData->email_address,
'line_items' => [
[
'price' => $subscriptionPlan->stripe_price_id,
'quantity' => 1,
// 'tax_rates'=>[$taxId],
],
],
'mode' => 'subscription',
// 'allow_promotion_codes' => true,
// 'tax_id_collection' => ['enabled' => true],
'metadata' => [
'userId' => $userData->id,
'userEmail' => $userData->email_address,
'subscriptionProductXid' => $subscriptionProductXid,
'is_referral_subscription' => $isReferralSubscription,
'referral_user_id' => $referralUserId,
'isCustomReferralCodeApplied'=> $isCustomReferralCodeApplied
],
'success_url' => route('thankyou'),
// 'cancel_url' => "http://localhost/cheerstothe_season_2_o/my-subscription-page",
]);
return Redirect::away($checkout->url);
//note:-for now i am just sending the cveonly=0 and lmacve=1 for reference .'&lmacve=1&cveonly=0'
} else {
return redirect()->back()->with(['error' => "Something went wrong while subscription!"]);
}
}
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'));
// return redirect()->back()->with(['error' => "Something went wrong while subscription!" . $e->getMessage()]);
}
}
public function thankyou(Request $request)
{
return view('Admin.pages.subscriptions.thank-you');
}
//created by; Hritik
//On - 28th May ,2024
//use - To cancel the subscription of user on end of subscription end period
public function cancelSubscription(Request $request)
{
try {
DB::beginTransaction();
$stripeSecret = (config('constants.subscription.stripe_secret_key'));
// $stripeSecret = env('STRIPE_SECRET');
$stripe = new \Stripe\StripeClient($stripeSecret);
$userId = $request->iam_principal_xid;
// dd($request->all(),$stripeSecret);
$getSubscriptionData = Subscriptions::where('iam_principal_xid', $userId)->where('subscription_status', 'active')->first();
$subscriptionId = $getSubscriptionData->subscription_id;
$cancelledSubscription = $stripe->subscriptions->update(
$subscriptionId,
['cancel_at_period_end' => true]
);
$subscriptionFromDatabase = Subscriptions::where('subscription_id', $subscriptionId)->first();
$subscriptionFromDatabase->cancelled_at = date('Y-m-d H:i:s', $cancelledSubscription->canceled_at);
$subscriptionFromDatabase->subscription_status = $cancelledSubscription->status;
$subscriptionFromDatabase->is_cancelled_subscription = 1; //2 for cancelled
$subscriptionFromDatabase->status = "cancelled";
$subscriptionFromDatabase->save();
$getSubscription = $stripe->subscriptions->retrieve($subscriptionFromDatabase->subscription_id, []);
$getSubscribeCustomer = $stripe->customers->retrieve(
$subscriptionFromDatabase->stripe_customer_id,
[]
);
DB::commit();
return redirect()->route('cancel-subscription-thank-you');
} catch (\Exception $e) {
DB::rollBack();
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return redirect()->back()->with(['error' => "Something went wrong while cancelling subscription!" . $e->getMessage()]);
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
/**
* Created By : Hritik
* Created at : 05 Jult 2024
* Use : To get Cancel Subscription Success page.
*/
public function cancelSubscriptionThankYou(Request $request)
{
return view('Admin.pages.subscriptions.cancel-thank-you');
}
/**
* Created By : Hritik
* Created at : 05 Jult 2024
* Use : To Apply Referral Code and return the User Id.
*/
public function applyReferralCode(Request $request)
{
try {
$referralCode = $request->input('referral_code');
$currentUserId = $request->input('current_iam_principal_xid');
$code = IamPrincipal::where('referral_code', $referralCode)->where('id', '!=', $currentUserId)->where('principal_type_xid', 3)->first();
$customCode = CustomReferralCode::where('is_active',1)->where('referral_code',$referralCode)->first();
if ($code ) {
return response()->json(['success' => true, 'message' => 'Successfully applied referral code!', 'referralUserId' => $code->id ,'referral_code'=>$referralCode]);
} else if( $customCode) {
return response()->json(['success' => true, 'message' => 'Successfully applied referral code!', 'referralUserId' => 2 ,'referral_code'=>$referralCode]); //2 is admin Id //need to change when principal typr_xid = 1
}else{
return response()->json(['success' => false, 'message' => 'Invalid referral code.']);
}
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'));
}
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\RestaurantApi;
namespace App\Http\Controllers\APIs\RestaurantApi;
use App\Http\Controllers\Controller;
use App\Services\APIs\RestaurantService\RedeemApiService;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\RestaurantApi;
namespace App\Http\Controllers\APIs\RestaurantApi;
use App\Services\APIs\RestaurantService\RestAuthApiService;
use Illuminate\Support\Facades\Log;
@@ -127,9 +127,9 @@ class RestAuthApiController extends Controller
'string',
'email',
function ($attribute, $value, $fail) {
$existingUser = IamPrincipal::where('email_address', $value)->where('principal_type_xid', 4)->whereNull('deleted_at')->exists();
$existingUser = IamPrincipal::where('email_address', $value)->where('principal_type_xid', 4)->where('is_active', 1)->whereNull('deleted_at')->exists();
if (!$existingUser) {
$fail('The selected email address is invalid.');
$fail('Entered e-mail address is not in our system..');
}
},
],

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\RestaurantApi;
namespace App\Http\Controllers\APIs\RestaurantApi;
use App\Services\APIs\RestaurantService\RestCMSService;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\RestaurantApi;
namespace App\Http\Controllers\APIs\RestaurantApi;
use App\Models\NotificationDetails;
use Illuminate\Support\Facades\Validator;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin\APIs\RestaurantApi;
namespace App\Http\Controllers\APIs\RestaurantApi;
use Tymon\JWTAuth\Facades\JWTAuth;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Validator;
@@ -98,10 +98,10 @@ class RestaurantControllerApi extends Controller
'phone_number' => 'required',
'address' => 'required',
'bio' => 'required',
'try_on_1' => 'required',
'try_on_2' => 'required',
'try_on_3' => 'required',
'try_on_4' => 'required',
'try_on_1' => 'required|max:18',
'try_on_2' => 'required|max:18',
'try_on_3' => 'required|max:18',
'try_on_4' => 'required|max:18',

View File

@@ -3,10 +3,18 @@
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\CustomReferralCode;
use Illuminate\Http\Request;
use App\Models\IamPrincipal;
use Illuminate\Support\Facades\DB;
use App\Models\ManageRestaurant;
use App\Models\Subscriptions;
use Carbon\Carbon;
use App\Exports\DashboardExportUser;
use App\Exports\DashboardSelectedExportUser;
use App\Models\ReferralUsers;
use Illuminate\Support\Facades\Log;
use Maatwebsite\Excel\Facades\Excel;
class DashboardController extends Controller
@@ -17,14 +25,57 @@ class DashboardController extends Controller
* Use : To show the dashboard.
*/
// public function showDashboard(){
// return view('Admin.dashboard');
// }
public function showDashboard()
{
// Monthly data
$dailyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("DATE(created_at) as date"))
->whereBetween('created_at', [now()->subDays(7), now()]) // Fetch data for the last 7 days
->groupBy(DB::raw("DATE(created_at)"))
->orderBy(DB::raw("DATE(created_at)"))
->pluck('count', 'date')
->toArray();
$customReferralCode = CustomReferralCode::where('is_active', 1)->first();
$start_date = now()->subDays(7)->startOfDay();
$end_date = now()->endOfDay();
$formattedDailyData = [];
while ($start_date <= $end_date) {
$formattedDailyData[$start_date->format('Y-m-d')] = $dailyData[$start_date->format('Y-m-d')] ?? 0;
$start_date->addDay();
}
$defaultData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month"))
->whereYear('created_at', date('Y'))
->groupBy(DB::raw("MONTH(created_at)"))
->orderBy(DB::raw("MONTH(created_at)"))
->pluck('count', 'month')
->toArray();
$months = range(1, 12);
$formattedDefaultData = [];
foreach ($months as $month) {
$formattedDefaultData[$month] = $defaultData[$month] ?? 0;
}
$quarterlyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter"))
->whereYear('created_at', date('Y'))
->groupBy(DB::raw("QUARTER(created_at)"))
->orderBy(DB::raw("QUARTER(created_at)"))
->pluck('count', 'quarter')
->toArray();
for ($i = 1; $i <= 4; $i++) {
$quarterlyData[$i] = $quarterlyData[$i] ?? 0;
}
ksort($quarterlyData);
$yearlyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year"))
->groupBy(DB::raw("YEAR(created_at)"))
->pluck('count', 'year')
->toArray();
$dataMonthlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month"))
->where('principal_type_xid', 3)
->whereYear('created_at', date('Y'))
@@ -33,20 +84,16 @@ class DashboardController extends Controller
->pluck('count', 'month')
->toArray();
$dataMonthlyWithType4 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month"))
->where('principal_type_xid', 4)
$dataMonthlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month"))
->whereYear('created_at', date('Y'))
->groupBy(DB::raw("MONTH(created_at)"))
->orderBy(DB::raw("MONTH(created_at)"))
->pluck('count', 'month')
->toArray();
// Fill missing months with zeros
$months = range(1, 12);
$dataMonthlyWithType3 = array_replace(array_fill_keys($months, 0), $dataMonthlyWithType3);
$dataMonthlyWithType4 = array_replace(array_fill_keys($months, 0), $dataMonthlyWithType4);
// Quarterly data
$dataQuarterlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter"))
->where('principal_type_xid', 3)
->groupBy(DB::raw("QUARTER(created_at)"))
@@ -54,8 +101,7 @@ class DashboardController extends Controller
->pluck('count', 'quarter')
->toArray();
$dataQuarterlyWithType4 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter"))
->where('principal_type_xid', 4)
$dataQuarterlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter"))
->groupBy(DB::raw("QUARTER(created_at)"))
->orderBy(DB::raw("QUARTER(created_at)"))
->pluck('count', 'quarter')
@@ -66,31 +112,302 @@ class DashboardController extends Controller
$dataQuarterlyWithType3 = array_replace(array_fill_keys($quarters, 0), $dataQuarterlyWithType3);
$dataQuarterlyWithType4 = array_replace(array_fill_keys($quarters, 0), $dataQuarterlyWithType4);
// Yearly data
$dataYearlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year"))
->where('principal_type_xid', 3)
->groupBy(DB::raw("YEAR(created_at)"))
->pluck('count', 'year')
->toArray();
$dataYearlyWithType4 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year"))
->where('principal_type_xid', 4)
$dataYearlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year"))
->groupBy(DB::raw("YEAR(created_at)"))
->pluck('count', 'year')
->toArray();
$customerCount = IamPrincipal::where('principal_type_xid', '=', 3)->count();
$customerCount = IamPrincipal::where('principal_type_xid', 3)->count();
$restaurantCount = ManageRestaurant::where('is_active', 1)->count();
$formattedDateTime = now()->format('Y-m-d H:i:s');
return view('Admin.dashboard', compact(
'customerCount',
'restaurantCount',
'dataMonthlyWithType3',
'dataMonthlyWithType4',
'dataQuarterlyWithType3',
'dataQuarterlyWithType4',
'dataYearlyWithType3',
'dataYearlyWithType4'
));
$recent_transactions = Subscriptions::with('subscription')
->orderBy('id', 'desc')
->get();
$formatted_transactions = $recent_transactions->map(function ($transaction) {
return [
'id' => $transaction->id,
'subscription' => $transaction->subscription ? [
'first_name' => $transaction->subscription->first_name,
'last_name' => $transaction->subscription->last_name,
'id' => $transaction->subscription->id,
] : null,
'amount' => $transaction->amount,
'subscription_id' => $transaction->subscription_id,
'stripe_customer_id' => $transaction->stripe_customer_id,
'status' => $transaction->status,
'current_period_start' => $transaction->current_period_start ? Carbon::parse($transaction->current_period_start)->format('m/d/Y') : null,
'current_period_end' => $transaction->current_period_end ? Carbon::parse($transaction->current_period_end)->format('m/d/Y') : null,
'next_payment_date' => $transaction->next_payment_date ? Carbon::parse($transaction->next_payment_date)->format('m/d/Y') : null,
];
})->toArray();
$response = ReferralUsers::with(['referredUser', 'refeersUser'])->latest()->get()->toArray();
$referralData = [];
foreach ($response as $item) {
$principalId = $item['iam_principal_xid'];
if (!isset($referralData[$principalId])) {
$referralData[$principalId] = [
'referred_user' => $item['referred_user'],
'refeers_users' => []
];
}
// Add the refeers_user to the respective principalId
if (isset($item['refeers_user'])) {
$referralData[$principalId]['refeers_users'][] = $item['refeers_user'];
}
}
return view(
'Admin.dashboard',
compact(
'customReferralCode',
'customerCount',
'restaurantCount',
'dataMonthlyWithType3',
'dataMonthlyWithType4',
'dataQuarterlyWithType3',
'dataQuarterlyWithType4',
'dataYearlyWithType3',
'dataYearlyWithType4',
'formatted_transactions',
'dailyData',
'formattedDailyData',
'defaultData',
'formattedDefaultData',
'quarterlyData',
'yearlyData',
'referralData'
)
);
}
/*
Created By : Hritik
Created at : 02 Aug 2024
Use : To Store or Update Custom Referral Code
*/
public function createOrUpdateReferralCode(Request $request)
{
try {
// dd($request->all());
DB::beginTransaction();
if($request->id){
CustomReferralCode::where('id', $request->id)->update([
'referral_code' => $request->referral_code,
]);
}else{
CustomReferralCode::create([
'referral_code' => $request->referral_code,
]);
}
DB::commit();
return response()->json(['status_code' => 200]);
} catch (\Exception $e) {
DB::rollBack();
Log::error('Storing Referral Code function failed: ' . $e->getMessage());
return response()->json(['error' => 'Something went wrong while storing Data.', 'status_code' => 500], 500);
}
}
/*
Created By : Sayali Parab
Created at : 08 July 2024
Use : To Get Excel.
*/
// public function exportRecentTransactions(Request $request)
// {
// try {
// if ($request->has('all_id')) {
// $recentTransaction = Subscriptions::with('subscription')->get()->toArray();
// return Excel::download(new DashboardExportUser($recentTransaction), 'recent_transactions.xlsx');
// }
// $ids = $request->input('selected_id');
// $fileName = 'selected_customer_transaction_data.xlsx';
// return Excel::download(new DashboardSelectedExportUser($ids), $fileName);
// } catch (\Exception $e) {
// return response()->json(['error' => 'Export failed. Something went wrong.'], 500);
// }
// }
public function exportRecentTransactions(Request $request)
{
try {
if ($request->has('all_id')) {
$recentTransaction = Subscriptions::with(['iamPrincipal', 'subscriptionProduct'])->get()->toArray();
return Excel::download(new DashboardExportUser($recentTransaction), 'recent_transactions.xlsx');
}
$ids = $request->input('selected_id');
if (!is_array($ids)) {
$ids = explode(',', $ids);
}
$fileName = 'selected_customer_transaction_data.xlsx';
return Excel::download(new DashboardSelectedExportUser($ids), $fileName);
} catch (\Exception $e) {
Log::error("Export Failed " . $e->getMessage());
return response()->json(['error' => 'Export failed. Something went wrong.'], 500);
}
}
/*
Created By : Sayali parab
Created at : 07 June 2024
Use : To get the page.
*/
public function index()
{
$referralCodes = CustomReferralCode::orderBy('id', 'desc')->get();
// return $location;
return view('Admin.pages.manage_referral_codes.index', compact('referralCodes'));
}
/*
Created By : Sayali parab
Created at : 07 June 2024
Use : To store the location.
*/
public function store(Request $request)
{
// dd($request);
$request->validate([
'referral_code' => 'required|string|max:15',
]);
try {
if (CustomReferralCode::where('referral_code', $request->referral_code)->exists()) {
return response()->json(['success' => false, 'error' => 'Referral Code name already exists', 'status' => 422]);
}
// new location
$storeCode = new CustomReferralCode();
$storeCode->referral_code = $request->referral_code;
$storeCode->save();
return response()->json(['success' => true, 'status' => 200]);
} catch (\Exception $e) {
return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
}
}
/*
Created By : Sayali parab
Created at : 07 June 2024
Use : To change status.
*/
public function change_referral_code_status(Request $request)
{
try {
// dd($request->all());
DB::beginTransaction();
$status = CustomReferralCode::find($request->referral_id);
$status->is_active = $request->status;
$status->save();
// return response()->json(['status' => 200]);
DB::commit();
return jsonResponseWithSuccessMessage(__('success.update_data'));
} catch (\Exception $e) {
Log::error("Update Status function Load Failed " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
/*
Created By : Sayali parab
Created at : 07 June 2024
Use : To delete location.
*/
public function delete_referral_code($id)
{
try {
DB::beginTransaction();
$passport = CustomReferralCode::find($id);
$passport->delete();
DB::commit();
return response()->json(['success' => true, 'status' => 200]);
} catch (\Exception $e) {
DB::rollBack();
Log::error("delete_location function Load Failed " . $e->getMessage());
return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]);
}
}
/*
Created By : Sayali parab
Created at : 07 June 2024
Use : To update location.
*/
public function update_referral_code(Request $request)
{
try {
DB::beginTransaction();
// Find the location data
$updateReferralCode = CustomReferralCode::find($request->id);
if (!$updateReferralCode) {
return response()->json(['success' => false, 'error' => 'Referral Code not found', 'status' => 404]);
}
// Update the location data
$updateReferralCode->referral_code = $request->referral_code;
$updateReferralCode->save();
DB::commit();
return response()->json(['success' => true, 'message' => __('success.update_data'), 'status' => 200]);
} catch (\Exception $e) {
DB::rollBack();
Log::error("Failed to update Code: " . $e->getMessage());
return response()->json(['success' => false, 'error' => __('auth.something_went_wrong'), 'status' => 500]);
}
}
}

View File

@@ -30,6 +30,7 @@ class FaqController extends Controller
public function index()
{
$data = $this->faqServices->viewfaq();
// return $data;
return view('Admin.pages.manage_cms.manage_faq.manage_faq')->with($data);
}
/**

View File

@@ -75,7 +75,7 @@ class LoginController extends Controller
*/
public function add_forgot_password(Request $request)
{
$user = DB::table('iam_principal')->where('email_address', $request->email)->first();
$user = DB::table('iam_principal')->where('email_address', $request->email)->where('principal_type_xid', 1)->first();
if (!$user) {
return jsonResponseWithErrorMessage(__('auth.email'), 404);
}

View File

@@ -22,12 +22,13 @@ class ManageContactUsController extends Controller
$isReply = $request->query('is_reply');
if ($isReply == 1) {
$queries = ManageContactUs::with('customer')->where('is_reply', 1)->orderBy('id','asc')->get();
$queries = ManageContactUs::with('customer')->where('is_reply', 1)->orderBy('id','desc')->get();
} elseif ($isReply == 0 && $isReply != null) {
$queries = ManageContactUs::with('customer')->where('is_reply', 0)->orderBy('id','asc')->get();
$queries = ManageContactUs::with('customer')->where('is_reply', 0)->orderBy('id','desc')->get();
} else {
$queries = ManageContactUs::with('customer')->orderBy('id','asc')->get();
$queries = ManageContactUs::with('customer')->orderBy('id','desc')->get();
}
// return $queries;
return view('Admin.pages.manage_contact_us.manage_contact', compact('queries'));
}
@@ -36,36 +37,37 @@ class ManageContactUsController extends Controller
* Created at : 10 June 2024
* Use : To send reply.
*/
public function sendReply(Request $request)
{
if (!$request->user_id || $request->user_id == null) {
return response()->json(['error' => 'User not found'], 404);
}
$userId = $request->user_id;
$query = ManageContactus::find($userId);
if (!$query) {
return response()->json(['error' => 'Query not found'], 404);
}
$request->validate([
'reply_message' => 'required|string',
]);
$query->reply_message = $request->input('reply_message');
$query->is_reply = true;
$query->save();
try {
Mail::to($query->email)->send(new \App\Mail\ReplyMail($query));
} catch (\Exception $e) {
return response()->json(['error' => 'Failed to send email', 'message' => $e->getMessage()], 500);
}
return response()->json(['message' => 'Reply sent successfully']);
}
/**

View File

@@ -16,6 +16,7 @@ use App\Exports\CustomerExportSelected;
use App\Models\ManageRestaurant;
use App\Models\ManageState;
use App\Models\RedeemRestaurant;
use App\Models\Subscriptions;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Barryvdh\DomPDF\PDF as DomPDFPDF;
@@ -37,18 +38,28 @@ class ManageCustomerController extends Controller
public function index()
{
try {
// Eager load the state relationship for all customers
$customers = IamPrincipal::where('principal_type_xid', 3)
->with('state')
$customers = IamPrincipal::with(['isSubscribed', 'state'])
->where('principal_type_xid', 3)
->orderBy('created_at', 'desc')
->get();
$dateTime = now();
$formattedDateTime = $dateTime->format('Y-m-d H:i:s');
foreach ($customers as $customer) {
$customer->is_subscribed = $customer->isSubscribed->contains(function ($subscription) use ($formattedDateTime) {
return $subscription->status == 'complete' && $subscription->next_payment_date >= $formattedDateTime;
});
}
return view('Admin.pages.manage_users.manage_customer.customer', compact('customers'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
/*
Created By : Sayali Parab
Created at : 28 May 2024
@@ -56,13 +67,14 @@ class ManageCustomerController extends Controller
*/
public function view_customer($id)
{
try {
$customers_data = IamPrincipal::with('state','contactMessages')->findOrFail($id);
$customers_data = IamPrincipal::with('state', 'contactMessages', 'isSubscribed')->findOrFail($id);
if ($customers_data->contactMessages->isEmpty()) {
Log::info('No contact messages found for customer with ID: ' . $id);
}
if ($customers_data->isSubscribed->isEmpty()) {
Log::info('No payment history found for customer with ID: ' . $id);
}
// return $customers_data;
return view('Admin.pages.manage_users.manage_customer.view_customer_details', compact('customers_data'));
} catch (Exception $e) {
@@ -222,44 +234,45 @@ class ManageCustomerController extends Controller
}
}
/*
/*
Created By : Sayali Parab
Created at : 28 May 2024
Use : To Get Excel.
*/
public function exportSelectedCustomer(Request $request)
{
try {
if ($request->has('all_id')) {
return Excel::download(new customer_export, 'Passport_data.xlsx');
return Excel::download(new customer_export, 'customer_data.xlsx');
}
$ids = $request->selected_id;
if (empty($ids)) {
return response()->json(['error' => 'No IDs provided for export.'], 400);
}
Log::info("Selected IDs for export: " . $ids);
$fileName = 'selected_customer_data.xlsx';
Log::info("Attempting to export selected customers to file: " . $fileName);
return Excel::download(new customer_export_selected($ids), $fileName);
} catch (\Exception $e) {
Log::error('Export failed: ' . $e->getMessage());
return response()->json(['error' => 'Export failed. Something went wrong.'], 500);
}
}
/*
/*
Created By : Sayali Parab
Created at : 28 May 2024
Use : To Deleted Data Restore.
@@ -297,4 +310,113 @@ class ManageCustomerController extends Controller
return response()->json(['error' => __('auth.something_went_wrong')], 500);
}
}
/*
Created By : Sayali parab
Created at : 27 June 2024
Use : To delete customer details.
*/
public function deleteCustomerUser($id)
{
try {
DB::beginTransaction();
$stripeSecret = (config('constants.subscription.stripe_secret_key'));
// $stripeSecret = env('STRIPE_SECRET');
$stripe = new \Stripe\StripeClient($stripeSecret);
$userId = $id;
// dd($id,$stripeSecret);
$getSubscriptionData = Subscriptions::where('iam_principal_xid', $userId)->where('subscription_status', 'active')->first();
if ($getSubscriptionData) {
$subscriptionId = $getSubscriptionData->subscription_id;
$cancelledSubscription = $stripe->subscriptions->update(
$subscriptionId,
['cancel_at_period_end' => true]
);
$subscriptionFromDatabase = Subscriptions::where('subscription_id', $subscriptionId)->first();
$subscriptionFromDatabase->cancelled_at = date('Y-m-d H:i:s', $cancelledSubscription->canceled_at);
$subscriptionFromDatabase->subscription_status = $cancelledSubscription->status;
$subscriptionFromDatabase->is_cancelled_subscription = 1;
$subscriptionFromDatabase->status = "cancelled";
$subscriptionFromDatabase->save();
$getSubscription = $stripe->subscriptions->retrieve($subscriptionFromDatabase->subscription_id, []);
$getSubscribeCustomer = $stripe->customers->retrieve(
$subscriptionFromDatabase->stripe_customer_id,
[]
);
}
$deleteCustomer = IamPrincipal::find($userId);
$deleteCustomer->delete();
DB::commit();
return response()->json(['sucess' => true, 'status' => 200]);
} catch (Exception $e) {
DB::rollBack();
Log::error("delete_passport function Load Failed " . $e->getMessage());
return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]);
}
}
public function unsubscibed($id)
{
try {
DB::beginTransaction();
$stripeSecret = (config('constants.subscription.stripe_secret_key'));
// $stripeSecret = env('STRIPE_SECRET');
$stripe = new \Stripe\StripeClient($stripeSecret);
$userId = $id;
// dd($id,$stripeSecret);
$getSubscriptionData = Subscriptions::where('iam_principal_xid', $userId)->where('subscription_status', 'active')->first();
$subscriptionId = $getSubscriptionData->subscription_id;
$cancelledSubscription = $stripe->subscriptions->update(
$subscriptionId,
['cancel_at_period_end' => true]
);
$subscriptionFromDatabase = Subscriptions::where('subscription_id', $subscriptionId)->first();
$subscriptionFromDatabase->cancelled_at = date('Y-m-d H:i:s', $cancelledSubscription->canceled_at);
$subscriptionFromDatabase->subscription_status = $cancelledSubscription->status;
$subscriptionFromDatabase->is_cancelled_subscription = 1;
$subscriptionFromDatabase->status = "cancelled";
$subscriptionFromDatabase->save();
$getSubscription = $stripe->subscriptions->retrieve($subscriptionFromDatabase->subscription_id, []);
$getSubscribeCustomer = $stripe->customers->retrieve(
$subscriptionFromDatabase->stripe_customer_id,
[]
);
DB::commit();
return response()->json(['success' => true, 'status' => 200]);
} catch (Exception $e) {
DB::rollBack();
Log::error("delete_passport function Load Failed " . $e->getMessage());
return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]);
}
}
}

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\ManageState;
use App\Models\TimeInterval;
use Illuminate\Http\Request;
use Exception;
use Illuminate\Support\Facades\Log;
@@ -17,9 +18,11 @@ class ManageLocationController extends Controller
Created at : 07 June 2024
Use : To get the page.
*/
public function index()
{
$location = ManageState::orderBy('id', 'asc')->get();
$location = ManageState::with('timeInterval')->orderBy('id', 'asc')->get();
// return $location;
return view('Admin.pages.manage_states.manage_states', compact('location'));
}
/*
@@ -31,8 +34,11 @@ class ManageLocationController extends Controller
public function store(Request $request)
{
// dd($request);
$request->validate([
'location_name' => 'required|string|max:255'
'location_name' => 'required|string|max:255',
'timeHours' => 'required|numeric|min:1',
'timeInterval' => 'required|in:day,week,month'
]);
try {
@@ -40,11 +46,19 @@ class ManageLocationController extends Controller
return response()->json(['success' => false, 'error' => 'Location name already exists', 'status' => 422]);
}
// new location
$location = new ManageState();
$location->name = $request->location_name;
$location->save();
// time interval
$timeInterval = new TimeInterval();
$timeInterval->manage_state_xid = $location->id;
$timeInterval->time_hours = $request->timeHours;
$timeInterval->time_interval = $request->timeInterval;
$timeInterval->quantity = $request->timeQuantity;
$timeInterval->save();
return response()->json(['success' => true, 'status' => 200]);
} catch (\Exception $e) {
return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
@@ -52,6 +66,8 @@ class ManageLocationController extends Controller
}
/*
Created By : Sayali parab
Created at : 07 June 2024
@@ -107,24 +123,57 @@ class ManageLocationController extends Controller
Created at : 07 June 2024
Use : To update location.
*/
public function update(Request $request)
{
try {
DB::beginTransaction();
$location_data = ManageState::find($request->id);
$location_data->name = $request->location_name;
$location_data->save();
public function update_location(Request $request)
{
try {
DB::beginTransaction();
DB::commit();
return jsonResponseWithSuccessMessage(__('success.update_data'));
} catch (Exception $e) {
DB::rollBack();
Log::error("Failed to update location: " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// Find the location data
$location_data = ManageState::find($request->id);
if (!$location_data) {
return response()->json(['success' => false, 'error' => 'Location not found', 'status' => 404]);
}
// Update the location data
$location_data->name = $request->location_name;
$location_data->save();
// Update or create the TimeInterval data
$timeInterval = TimeInterval::where('manage_state_xid', $request->input('id'))->first();
if ($timeInterval) {
// Update existing record
$timeInterval->update([
'manage_state_xid' => $request->input('id'),
'time_hours' => $request->input('time_hours'),
'time_interval' => $request->input('time_interval'),
'quantity' => $request->input('quantity'),
]);
} else {
// Create new record
TimeInterval::create([
'manage_state_xid' => $request->input('id'),
'time_hours' => $request->input('time_hours'),
'time_interval' => $request->input('time_interval'),
'quantity' => $request->input('quantity'),
]);
}
DB::commit();
return response()->json(['success' => true, 'message' => __('success.update_data'), 'status' => 200]);
} catch (Exception $e) {
DB::rollBack();
Log::error("Failed to update location: " . $e->getMessage());
return response()->json(['success' => false, 'error' => __('auth.something_went_wrong'), 'status' => 500]);
}
}
}

View File

@@ -78,49 +78,8 @@ class ManageNewsAndArticlesController extends Controller
}
}
// public function update(Request $request)
// {
// try {
// $update_news_article = NewsArticle::find($request->article_id);
// $update_news_article->name = $request->input('article_name');
// // dd( $update_news_article->name);
// $update_news_article->description = $request->input('article_dis');
// // dd($update_news_article->description);
// // if ($request->hasFile('article_image')) {
// // if ($update_news_article->image) {
// // Storage::disk('public')->delete($update_news_article->image);
// // }
// // $uploadedFile = $request->file('article_image');
// // $extension = $uploadedFile->getClientOriginalExtension();
// // $filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
// // $path = $uploadedFile->storeAs('uploads/news_article', $filename, 'public');
// // $update_news_article->image = $path;
// // }
// if ($request->hasFile('article_thmb')) {
// if ($update_news_article->image) {
// Storage::disk('public')->delete($update_news_article->thumbnail_image);
// }
// $uploadedFile = $request->file('article_thmb');
// $extension = $uploadedFile->getClientOriginalExtension();
// $filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
// $path = $uploadedFile->storeAs('uploads/news_article_thumb', $filename, 'public');
// $update_news_article->thumbnail_image = $path;
// }
// $update_news_article->save();
// // dd( $update_news_article);
// return response()->json(['success' => true,'status'=>200]);
// } catch (\Exception $e) {
// return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
// }
// }
/**
* Created By : sayali parab
* Created at : 27 May 2024
@@ -133,9 +92,7 @@ class ManageNewsAndArticlesController extends Controller
$update_news_article = NewsArticle::find($request->article_id);
$update_news_article->name = $request->input('article_name');
$update_news_article->description = $request->input('article_dis');
$update_news_article->news_articles_category_xid = $request->input('category_xid');
if ($request->hasFile('article_thmb')) {
if ($update_news_article->image) {
@@ -197,90 +154,38 @@ class ManageNewsAndArticlesController extends Controller
* Created at : 28 May 2024
* Use : To insert.
*/
// public function insert(Request $request)
// {
// try {
// // Validate the incoming request
// // $request->validate([
// // // 'article_name' => 'required|string',
// // // 'article_des' => 'required|string',
// // 'article_thmb' => 'required|image|mimes:jpeg,png,jpg,gif|max:2048',
// // 'category' => 'required|string', // Assuming 'category' is the field for category selection
// // ]);
// DB::beginTransaction();
// // Handle thumbnail image upload
// if ($request->hasFile('article_thmb')) {
// $uploadedFile = $request->file('article_thmb');
// $filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
// $path = $uploadedFile->storeAs('uploads/news_article_thumb', $filename, 'public');
// }
// // Handle the image upload
// if ($request->hasFile('article_image')) {
// $image = $request->file('article_image');
// $imageName = date('YmdHi') . '_' . str_replace(' ', '',$image->getClientOriginalName());
// $image_path= $image->storeAs('uploads/news_article_image', $imageName, 'public');
// }
// // Create a new instance of NewsArticle model and populate it with data
// $blog = NewsArticle::create([
// 'name' => $request->input('article_name'),
// 'description' => $request->input('article_des'),
// 'news_articles_category_xid' => $request->input('category'),
// 'thumbnail_image' => $path, // Set thumbnail image path
// 'image'=> $image_path
// ]);
// // dd( $blog);
// DB::commit();
// return response()->json([
// 'success' => true,
// 'status' => 200,
// 'message' => 'News article added successfully',
// ]);
// } catch (\Exception $exception) {
// DB::rollBack();
// // Log the exception for further analysis
// Log::error('Error in insert method: ' . $exception->getMessage() . ' at ' . $exception->getFile() . ':' . $exception->getLine());
// // Return an error response
// return response()->json(['error' => 'Failed to add news article'], 500);
// }
// }
public function insert(Request $request)
{
try {
$blog = new NewsArticle;
$blog->name = $request->input('article_name');
$blog->description = $request->input('article_des');
$blog->news_articles_category_xid = $request->input('category');
public function insert(Request $request)
{
if ($request->hasFile('article_image')) {
$uploadedFile = $request->file('article_image');
$extension = $uploadedFile->getClientOriginalExtension();
$filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
$path = $uploadedFile->storeAs('uploads/news_article', $filename, 'public');
$blog->image = $path;
try {
$blog = new NewsArticle;
$blog->name = $request->input('article_name');
$blog->description = $request->input('article_des');
$blog->news_articles_category_xid = $request->input('category');
if ($request->hasFile('article_image')) {
$uploadedFile = $request->file('article_image');
$extension = $uploadedFile->getClientOriginalExtension();
$filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
$path = $uploadedFile->storeAs('uploads/news_article', $filename, 'public');
$blog->image = $path;
}
if ($request->hasFile('article_thmb')) {
$uploadedFile = $request->file('article_thmb');
$extension = $uploadedFile->getClientOriginalExtension();
$filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
$path = $uploadedFile->storeAs('uploads/news_article_thumb', $filename, 'public');
$blog->thumbnail_image = $path;
}
$blog->save();
return response()->json(['success' => true, 'status' => 200]);
} catch (\Exception $e) {
// Handle the exception, you can log it or return an error response
return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
}
if ($request->hasFile('article_thmb')) {
$uploadedFile = $request->file('article_thmb');
$extension = $uploadedFile->getClientOriginalExtension();
$filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
$path = $uploadedFile->storeAs('uploads/news_article_thumb', $filename, 'public');
$blog->thumbnail_image = $path;
}
$blog->save();
return response()->json(['success' => true,'status'=>200]);
} catch (\Exception $e) {
// Handle the exception, you can log it or return an error response
return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
}
}
}

View File

@@ -10,6 +10,7 @@ use Exception;
use Illuminate\Support\Facades\Log;
use App\Helpers\onesignalhelper;
use App\Models\ManageState;
use App\Models\Subscriptions;
use Illuminate\Support\Facades\DB;
class ManageNotificationsController extends Controller
@@ -25,24 +26,30 @@ class ManageNotificationsController extends Controller
if ($activeQuery == 4) { // for customer
$notifications = NotificationDetails::with('Notification')
->where('is_active', 1)
->where('is_schedule', 0)
->whereHas('Notification', function ($query) {
$query->where('principal_type_xid', 3);
})
->latest()
->take(12)
->get();
// return $notifications;
} else if ($activeQuery == 3) { // for restaurant
$notifications = NotificationDetails::with('Notification')
->where('is_active', 1)
->where('is_schedule', 0)
->whereHas('Notification', function ($query) {
$query->where('principal_type_xid', 4);
})
->latest()
->take(12)
->get();
// return $notifications;
} else {
$notificationsOfType3 = NotificationDetails::with('Notification')
->where('is_active', 1)
->where('is_schedule', 0)
->whereHas('Notification', function ($query) {
$query->where('principal_type_xid', 3);
})
@@ -51,6 +58,8 @@ class ManageNotificationsController extends Controller
->get();
$notificationsOfType4 = NotificationDetails::with('Notification')
->where('is_active', 1)
->where('is_schedule', 0)
->whereHas('Notification', function ($query) {
$query->where('principal_type_xid', 4);
})
@@ -60,14 +69,15 @@ class ManageNotificationsController extends Controller
$notifications = $notificationsOfType3->merge($notificationsOfType4);
}
$scheduledNotifications = NotificationDetails::where('is_schedule', 1)->where('is_active', 1)->orderByDesc('id')->get();
return view('Admin.pages.manage_notification.manage_notification', compact('notifications'));
return view('Admin.pages.manage_notification.manage_notification', compact('notifications', 'scheduledNotifications'));
}
/**
* Created By : Sayli Raut
* Created at : 10 June 2024
* Use : To view notification details.s
* Use : To view add notification.
*/
public function add()
{
@@ -78,11 +88,11 @@ class ManageNotificationsController extends Controller
/**
* Created By : Sayli Raut
* Created at : 10 June 2024
* Use : To add notification .
* Use : To store notification .
*/
public function store_notificaton_data(Request $request)
public function store_notification_data(Request $request)
{
// dd($request);
try {
$request->validate([
'image' => 'required|image|mimes:jpeg,png,jpg,gif|max:2048',
@@ -90,75 +100,147 @@ class ManageNotificationsController extends Controller
DB::beginTransaction();
if (isset($request->image)) {
$image = $request->image;
$image_db = null;
} else {
$image = null;
$image_db = $request->image;
$imagePath = null;
if ($request->hasFile('image')) {
$image = $request->file('image');
$imagePath = saveSingleImageWithoutCrop($image, 'notification_images');
$imagePath = ListingImageUrl('notification_images', $imagePath);
}
$tnormalImage = saveSingleImageWithoutCrop($image, 'notification_images', $image_db);
$imagePath = ListingImageUrl('notification_images', $tnormalImage);
$allCustomerOneSignalIds = IamPrincipal::where('is_active', 1)
$states = $request->states;
$dateTime = now();
$formattedDateTime = $dateTime->format('Y-m-d H:i:s');
$iamPrincipals = Subscriptions::select('iam_principal_xid')
->where('next_payment_date', '>=', $formattedDateTime)
->get();
$iamPrincipalIds = $iamPrincipals->pluck('iam_principal_xid');
$subscribe = IamPrincipal::whereIn('id', $iamPrincipalIds)
->where('is_active', 1)
->where('notification_status', 1)
->where('principal_type_xid', 3)
->where('state_xid', $request->state)
->pluck('id');
->whereIn('state_xid', $states)
->get();
$allRestaurantOneSignalIds = IamPrincipal::where('is_active', 1)
->where('notification_status', 1)
->where('principal_type_xid', 3)
->where('state_xid', $request->state)
->pluck('id');
$scheduled = false;
// Find the remaining user data
$UserData = IamPrincipal::whereIn('id', $allCustomerOneSignalIds)->get();
$title = $request->title;
$message = $request->description;
$content_type = 'Notification';
$imageUrl = $imagePath;
// FOR all customer
if ($request->user_type == 1) {
foreach ($UserData as $customerIdItem) {
if ($customerIdItem->one_signal_player_id) {
onesignalhelper::sendNotificationApi(
$customerIdItem->one_signal_player_id,
$title,
$message,
$content_type,
$imageUrl,
$id = null
);
$allCustomerOneSignalIds = $subscribe->pluck('id');
$UserData = IamPrincipal::whereIn('id', $allCustomerOneSignalIds)->get();
if ($request->schedule_radio1 == 1 && $request->schedule_date) {
NotificationDetails::create([
'user_type' => $request->user_type,
'description' => $request->description,
'type' => $request->title,
'image' => $imagePath,
'date_added' => $request->schedule_date,
'is_schedule' => 1,
'delivery_schedule' => $request->schedule_date,
'state_ids' => json_encode($states),
]);
$scheduled = true;
} else {
foreach ($UserData as $customerIdItem) {
if ($customerIdItem->one_signal_player_id) {
onesignalhelper::sendNotificationApi(
$customerIdItem->one_signal_player_id,
$request->title,
$request->description,
'Dashboard Notification',
$imagePath,
$id = null
);
}
onesignalhelper::StoreNotificationDetails($customerIdItem->id, 'Notification', $request->title, $imagePath);
}
onesignalhelper::StoreNotificationDetails($customerIdItem->id, $content_type, $title, $imagePath);
}
} elseif ($request->user_type == 2) {
$allPrincipalIds = IamPrincipal::where('principal_type_xid', 3)->pluck('id');
$subscribedIds = Subscriptions::select('iam_principal_xid')
->where('next_payment_date', '>=', $formattedDateTime)
->pluck('iam_principal_xid');
$unsubscribedIds = $allPrincipalIds->diff($subscribedIds);
$unsubscribedPrincipals = IamPrincipal::whereIn('id', $unsubscribedIds)
->where('is_active', 1)
->where('notification_status', 1)
->whereIn('state_xid', $states)
->get();
$allRestaurantOneSignalIds = $unsubscribedPrincipals->pluck('id');
$restaurantData = IamPrincipal::whereIn('id', $allRestaurantOneSignalIds)->get();
foreach ($restaurantData as $restIdItem) {
if ($restIdItem->one_signal_player_id) {
onesignalhelper::sendNotificationApi(
$restIdItem->one_signal_player_id,
$title,
$message,
$content_type,
$imageUrl,
$id = null
);
if ($request->schedule_radio1 == 1 && $request->schedule_date) {
NotificationDetails::create([
'user_type' => $request->user_type,
'description' => $request->description,
'type' => $request->title,
'image' => $imagePath,
'date_added' => $request->schedule_date,
'is_schedule' => 1,
'delivery_schedule' => $request->schedule_date,
'state_ids' => json_encode($states),
]);
$scheduled = true;
} else {
foreach ($restaurantData as $restaurantsData) {
if ($restaurantsData->one_signal_player_id) {
onesignalhelper::sendNotificationApi(
$restaurantsData->one_signal_player_id,
$request->title,
$request->description,
$request->title,
$imagePath,
$id = null
);
}
onesignalhelper::StoreNotificationDetails($restaurantsData->id, 'Notification', $request->title, $imagePath);
}
}
} elseif ($request->user_type == 3) {
$userQuery = IamPrincipal::where('is_active', 1)
->where('notification_status', 1)
->where('principal_type_xid', 3)
->whereIn('state_xid', $states);
$allUserOneSignalIds = $userQuery->pluck('id');
$UserData = IamPrincipal::whereIn('id', $allUserOneSignalIds)->get();
if ($request->schedule_radio1 == 1 && $request->schedule_date) {
NotificationDetails::create([
'user_type' => $request->user_type,
'description' => $request->description,
'type' => $request->title,
'image' => $imagePath,
'date_added' => $request->schedule_date,
'is_schedule' => 1,
'delivery_schedule' => $request->schedule_date,
'state_ids' => json_encode($states),
]);
$scheduled = true;
} else {
foreach ($UserData as $CustomerData) {
if ($CustomerData->one_signal_player_id) {
onesignalhelper::sendNotificationApi(
$CustomerData->one_signal_player_id,
$request->title,
$request->description,
'Dashboard Notification',
$imagePath,
$id = null
);
}
onesignalhelper::StoreNotificationDetails($CustomerData->id, 'Notification', $request->title, $imagePath);
}
onesignalhelper::StoreNotificationDetails($restIdItem->id, $content_type, $title, $imagePath);
}
}
DB::commit();
return jsonResponseWithSuccessMessage(__('success.save_data'));
if ($scheduled) {
return jsonResponseWithSuccessMessage(__('success.save_data_scheduled'));
} else {
return jsonResponseWithSuccessMessage(__('success.save_data_immediate'));
}
} catch (Exception $e) {
DB::rollBack();
Log::error("Notification send Failed " . $e->getMessage());
@@ -170,11 +252,51 @@ class ManageNotificationsController extends Controller
/**
* Created By : Sayli Raut
* Created at : 10 June 2024
* Use : To view notification details.s
* Use : To view notification detail.
*/
public function view($id)
{
$notification = NotificationDetails::with('notification')->findOrFail($id);
return view('Admin.pages.manage_notification.manage_notifications_view', compact('notification'));
}
public function edit($id)
{
$edit_notification = NotificationDetails::findOrFail($id);
$states = ManageState::where('is_active', 1)->get();
return view('Admin.pages.manage_notification.manage_notification_edit', compact('edit_notification', 'states'));
}
public function update(Request $request)
{
try {
$notification = NotificationDetails::findOrFail($request->id);
$notification->type = $request->type;
$notification->description = $request->description;
$notification->delivery_schedule = $request->delivery_schedule;
if ($request->hasFile('image')) {
$image = $request->file('image');
$imagePath = saveSingleImageWithoutCrop($image, 'notification_images');
$imagePath = ListingImageUrl('notification_images', $imagePath);
$notification->image = $imagePath;
}
$notification->user_type = $request->user_type;
$notification->state_ids = json_encode($request->state_ids);
$notification->save();
return jsonResponseWithSuccessMessage(__('success.save_data_scheduled'));
} catch (Exception $e) {
DB::rollBack();
Log::error("Notification update Failed " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function delete($id)
{
$data = NotificationDetails::find($id)->delete();
return redirect()->back()->with('success', '');
}
}

View File

@@ -0,0 +1,64 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\ManageReferralRule;
use Illuminate\Http\Request;
class ManageReferralController extends Controller
{
/**
* Created By : sayali parab
* Created at : 22 July 2024
* Use : To view Rules page.
*/
public function index()
{
$referral_rule = ManageReferralRule::all()->toArray();
return view('Admin.pages.manage_rule.manage_referral', compact('referral_rule'));
}
/**
* Created By : sayali parab
* Created at : 22 July 2024
* Use : To edit Rules.
*/
public function editReferral($id)
{
$referral_rule = ManageReferralRule::find($id);
// dd($referral_rule);
return view('Admin.pages.manage_rule.manage_referral_edit', compact('referral_rule'));
}
public function updateReferral(Request $request)
{
$validated = $request->validate([
'how_it_works' => 'required',
'rules' => 'required',
'what_is_referral' => 'required',
]);
$howItWorks = base64_decode($request->input('how_it_works'));
$rules = base64_decode($request->input('rules'));
$whatIsReferral = base64_decode($request->input('what_is_referral'));
$update = ManageReferralRule::find($request->rule_id);
$update->how_it_works= $howItWorks;
$update->rules = $rules;
$update->what_is_referral= $whatIsReferral;
$update->save();
return response()->json(['success' => true, 'status' => 200]);
}
}

View File

@@ -4,12 +4,84 @@ namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\ManageState;
use Illuminate\Support\Facades\Log;
use Maatwebsite\Excel\Facades\Excel;
use App\Exports\ReportExports;
use App\Models\ManageRestaurant;
use App\Models\ReferralUsers;
use App\Exports\ExportReports;
use Carbon\Carbon;
class ManageReportsController extends Controller
{
public function index(){
return view('Admin.pages.manage_reports.manage_reports');
/**
* Created By : sayali parab
* Created at : 03 July 2024
* Use : To get manage report page.
*/
public function index()
{
try {
$states = ManageState::all();
$restaurants = ManageRestaurant::all();
return view('Admin.pages.manage_reports.manage_reports', compact('states', 'restaurants'));
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
/**
* Created By : sayali parab
* Created at : 03 July 2024
* Use : To download the excel.
*/
public function exportReport(Request $request)
{
// dd($request->all());
$reportType = $request->input('reportType');
$states = $request->input('states');
$restaurants = $request->input('restaurants', []);
$startDate = \Carbon\Carbon::parse( $request->startDate)->format('Y-m-d');
$endDate = \Carbon\Carbon::parse( $request->endDate)->format('Y-m-d');
// Set the file name based on the report type
$fileName = 'reports.xlsx'; // default file name
if ($reportType == 'Total Subscribed') {
$fileName = 'total_subscribed_report.xlsx';
} elseif ($reportType == 'Total Users') {
$fileName = 'total_users_report.xlsx';
} elseif ($reportType == 'Redemptions') {
$fileName = 'redemptions_report.xlsx';
} elseif ($reportType == 'Redemptions for Specific Restaurants') {
$fileName = 'redemptions_specific_restaurants_report.xlsx';
} elseif ($reportType == 'Subscriptions Cancelled') {
$fileName = 'subscriptions_cancelled_report.xlsx';
} elseif ($reportType == 'Referrals Made') {
$fileName = 'referrals_made_report.xlsx';
} elseif ($reportType == 'Referees Joined') {
$fileName = 'referees_joined_report.xlsx';
}
try {
return Excel::download(new ExportReports($reportType, $states, $startDate, $endDate, $restaurants), $fileName);
} catch (\Exception $e) {
Log::error('Export failed: ' . $e->getMessage());
Log::error('Stack trace: ' . $e->getTraceAsString());
return response()->json(['error' => 'Export failed. Something went wrong.'], 500);
}
}
}

View File

@@ -11,6 +11,9 @@ use Illuminate\Http\Request;
use Exception;
use App\Helpers\onesignalhelper;
use App\Models\IamPrincipal;
use App\Models\ManageState;
use App\Models\RestaurantClosedHour;
use App\Models\RestaurantTimeInterval;
use Illuminate\Support\Facades\Log;
use Maatwebsite\Excel\Facades\Excel;
use Illuminate\Support\Facades\DB;
@@ -27,11 +30,11 @@ class ManageRestrauntController extends Controller
$activeQuery = $request->query('active');
if ($activeQuery == 1) {
$restaurant = ManageRestaurant::where('is_active', 1)->latest()->get();
$restaurant = ManageRestaurant::with('state')->where('is_active', 1)->latest()->get();
} else if ($activeQuery == 0 && $activeQuery != null) {
$restaurant = ManageRestaurant::where('is_active', 0)->latest()->get();
$restaurant = ManageRestaurant::with('state')->where('is_active', 0)->latest()->get();
} else {
$restaurant = ManageRestaurant::latest()->get();
$restaurant = ManageRestaurant::with('state')->latest()->get();
}
return view('Admin.pages.manage_restaurants.manage_restaurants', compact('restaurant'));
}
@@ -44,7 +47,8 @@ class ManageRestrauntController extends Controller
*/
public function add()
{
return view('Admin.pages.manage_restaurants.add_restaurant');
$state = ManageState::with('timeInterval')->where('is_active', 1)->get()->toArray();
return view('Admin.pages.manage_restaurants.add_restaurant', compact('state'));
}
@@ -69,7 +73,6 @@ class ManageRestrauntController extends Controller
// Creating the restaurant
$restaurant = new ManageRestaurant();
$restaurant->name = $request->input('name');
$restaurant->description = $request->input('description');
$restaurant->image = $imagePath;
$restaurant->restaurant_id = $request->input('rest_id');
$restaurant->address = $request->input('address');
@@ -78,23 +81,43 @@ class ManageRestrauntController extends Controller
$restaurant->longtitude = $request->input('longitude');
$restaurant->exclusion = $request->input('exclusion');
$restaurant->phone_number = $request->input('phone_number');
$restaurant->state_xid = $request->input('state_xid');
$restaurant->try_on_1 = $request->input('try_on_1');
$restaurant->try_on_2 = $request->input('try_on_2');
$restaurant->try_on_3 = $request->input('try_on_3');
$restaurant->try_on_4 = $request->input('try_on_4');
$restaurant->save();
foreach ($request->input('operating_hours') as $day => $hours) {
OperatingHour::create([
'manage_restaurant_xid' => $restaurant->id,
// Storing operating hours
// foreach ($request->input('operating_hours') as $day => $hours) {
// OperatingHour::create([
// 'manage_restaurant_xid' => $restaurant->id,
// 'day_of_week' => $day,
// 'start_time' => $hours['start_time'],
// 'end_time' => $hours['end_time']
// ]);
// }
// Storing restaurant time interval
$restTimeInterval = new RestaurantTimeInterval();
$restTimeInterval->manage_restaurants_xid = $restaurant->id;
$restTimeInterval->time_hours = $request->timeHours;
$restTimeInterval->time_interval = $request->timeInterval;
$restTimeInterval->quantity = $request->timeQuantity;
$restTimeInterval->save();
if($request->filled('day_of_week')){
foreach ($request->day_of_week as $index => $day) {
RestaurantClosedHour::create([
'restaurant_id' => $restaurant->id,
'day_of_week' => $day,
'start_time' => $hours['start_time'],
'end_time' => $hours['end_time']
'start_time' => $request->start_time[$index],
'end_time' => $request->end_time[$index],
]);
}
}
// Sending notifications
$imagePath = ListingImageUrl('restaurant_images', $restaurant->image);
$allCustomerOneSignalIds = IamPrincipal::select('id', 'one_signal_player_id')->where('is_active', 1)->where('notification_status', 1)->where('principal_type_xid', 3)->get();
$title = "New " . $restaurant->name . " is added";
$message = "New Restaurant is Now Live.";
@@ -115,7 +138,6 @@ class ManageRestrauntController extends Controller
onesignalhelper::StoreNotificationDetails($customerIdItem->id, $content_type, $title, $imagePath);
}
DB::commit();
return jsonResponseWithSuccessMessage(__('success.save_data'));
} catch (Exception $e) {
@@ -126,6 +148,7 @@ class ManageRestrauntController extends Controller
}
/*
Created By : Sayli Raut
Created at : 29 May 2024
@@ -134,15 +157,22 @@ class ManageRestrauntController extends Controller
public function edit_restaurant(Request $request, $id)
{
try {
$operating_hours = OperatingHour::where('manage_restaurant_xid', $id)->get()->keyBy('day_of_week');
$restaurantItem = ManageRestaurant::where('id', $id)->first();
// $operating_hours = OperatingHour::where('manage_restaurant_xid', $id)->get()->keyBy('day_of_week');
$restaurantItem = ManageRestaurant::with('timeInterval')->where('id', $id)->first();
$restaurantClosedTime = RestaurantClosedHour::with('restaurant')->where('restaurant_id', $id)->get();
$timeInterval = $restaurantItem->timeInterval->first();
$state = ManageState::where('is_active', 1)->get()->toArray();
$restaurantItem['image'] = ListingImageUrl('restaurant_images', $restaurantItem['image']);
return view(
'Admin.pages.manage_restaurants.edit_restaurant',
compact(
'restaurantItem',
'operating_hours'
// 'operating_hours',
'state',
'timeInterval',
'restaurantClosedTime'
)
);
} catch (Exception $e) {
@@ -151,6 +181,7 @@ class ManageRestrauntController extends Controller
}
}
/*
Created By : Sayli Raut
Created at : 29 May 2024
@@ -177,6 +208,7 @@ class ManageRestrauntController extends Controller
$restaurant->address = $request->input('location_name');
$restaurant->exclusion = $request->input('exclusion');
$restaurant->phone_number = $request->input('phone_number');
$restaurant->state_xid = $request->input('state_xid');
$restaurant->latitude = $request->input('latitude');
$restaurant->longtitude = $request->input('longitude');
$restaurant->bio = $request->input('bio');
@@ -186,24 +218,32 @@ class ManageRestrauntController extends Controller
$restaurant->try_on_4 = $request->input('try_on_4');
$restaurant->save();
foreach ($request->input('operating_hours') as $day => $hours) {
$operatingHour = OperatingHour::where('manage_restaurant_xid', $restaurant->id)
->where('day_of_week', $day)
->first();
$timeInterval = RestaurantTimeInterval::where('manage_restaurants_xid', $restaurant->id)->first();
if ($operatingHour) {
// Update existing record
$operatingHour->update([
'start_time' => $hours['start_time'],
'end_time' => $hours['end_time']
]);
} else {
// Create new record
OperatingHour::create([
'manage_restaurant_xid' => $restaurant->id,
if ($timeInterval) {
$timeInterval->update([
'time_hours' => $request->input('timeHours'),
'time_interval' => $request->input('timeInterval'),
'quantity' => $request->input('timeQuantity'),
]);
} else {
RestaurantTimeInterval::create([
'manage_restaurants_xid' => $restaurant->id,
'time_hours' => $request->input('timeHours'),
'time_interval' => $request->input('timeInterval'),
'quantity' => $request->input('timeQuantity'),
]);
}
$closedTime = RestaurantClosedHour::where('restaurant_id', $restaurant->id)->delete();
if ($request->day_of_week) {
foreach ($request->day_of_week as $index => $day) {
RestaurantClosedHour::create([
'restaurant_id' => $request->id,
'day_of_week' => $day,
'start_time' => $hours['start_time'],
'end_time' => $hours['end_time']
'start_time' => $request->start_time[$index],
'end_time' => $request->end_time[$index],
]);
}
}
@@ -220,6 +260,9 @@ class ManageRestrauntController extends Controller
/*
Created By : Sayli Raut
Created at : 29 May 2024

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\ManageRule;
use Illuminate\Http\Request;
class ManageRulesController extends Controller
{
/**
* Created By : sayli Raut
* Created at : 19 June 2024
* Use : To view Rules page.
*/
public function index()
{
$data = ManageRule::all()->toArray();
return view('Admin.pages.manage_rule.manage_rule', compact('data'));
}
/**
* Created By : sayli Raut
* Created at : 19 June 2024
* Use : To edit Rules.
*/
public function edit($id)
{
$data = ManageRule::find($id);
return view('Admin.pages.manage_rule.manage_rules_edit', compact('data'));
}
/**
* Created By : sayli Raut
* Created at : 19 June 2024
* Use : To update Rules.
*/
public function update(Request $request)
{
$validated = $request->validate([
'whats_inside' => 'required',
'rules' => 'required',
]);
$whatsInside = base64_decode($request->input('whats_inside'));
$rules = base64_decode($request->input('rules'));
$update = ManageRule::find($request->rule_id);
$update->whats_inside = $whatsInside;
$update->rules = $rules;
$update->save();
return response()->json(['success' => true, 'status' => 200]);
}
}

View File

@@ -11,15 +11,20 @@ use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Exception;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Carbon\Carbon;
use Illuminate\Support\Facades\Mail;
use App\Mail\Add_Subadmin;
class ManageSubAdminController extends Controller
{
public function index(){
public function index()
{
$sub_admins_module = ManageModule::latest()->get();
$sub_admins_data = IamPrincipal::where('principal_type_xid', 2)->latest()->get();
return view('Admin.pages.manage_users.manage_sub_admin.manage_subadmin',compact('sub_admins_data','sub_admins_module'));
return view('Admin.pages.manage_users.manage_sub_admin.manage_subadmin', compact('sub_admins_data', 'sub_admins_module'));
}
public function create()
@@ -29,23 +34,40 @@ class ManageSubAdminController extends Controller
return view('Admin.pages.manage_users.manage_sub_admin.create', compact('sub_admins_module'));
}
public function store_subadmin(Request $request)
{
/*
/*
Created By : shailesh Gupta
Created at : 29 May 2024
Use : To store sub admin form and email
*/
public function store_subadmin(Request $request)
{
// Validation rules
$rules = [
'sub_admin_email' => 'required|string|email|max:100|unique:iam_principal,email_address,NULL,id,principal_type_xid,2',
];
// Custom error messages
$messages = [
'sub_admin_email.required' => 'Please enter this field',
'sub_admin_email.email' => 'Please enter a valid email address',
'sub_admin_email.unique' => 'This email is already registered',
];
$validator = Validator::make($request->all(), $rules, $messages);
if ($validator->fails()) {
return response()->json(['errors' => $validator->errors()], 422);
}
try {
// DB::beginTransaction();
DB::beginTransaction();
$sub_admin = new IamPrincipal();
$sub_admin->first_name = $request->input('sub_admin_name');
$sub_admin->last_name=$request->input('sub_admin_lname');
$sub_admin->last_name = $request->input('sub_admin_lname');
$sub_admin->user_name = 'sub_admin';
$sub_admin->principal_type_xid = 2;
$sub_admin->principal_source_xid = Auth::guard('admin')->user()->principal_source_xid;
@@ -53,39 +75,36 @@ class ManageSubAdminController extends Controller
$sub_admin->password = bcrypt($request->input('password'));
$sub_admin->save();
$moduleIds = $request->input('module_id');
foreach ($moduleIds as $moduleId) {
$sub_admin_permission = new ManageModuleLink;
$sub_admin_permission->principal_xid = $sub_admin->id;
$sub_admin_permission->manage_modules_xid = $moduleId;
$sub_admin_permission->save();
}
$mailData =[
'username'=>$request->input('sub_admin_name'),
'password'=>$request->input('password'),
$mailData = [
'username' => $request->input('sub_admin_name'),
'password' => $request->input('password'),
];
Mail::to($sub_admin->email_address)->send(new Add_Subadmin($mailData));
// Mail::to($sub_admin->email_address)->send(new Add_Subadmin($mailData));
$mail = Mail::to($request->input('sub_admin_email'))->send(new Add_Subadmin($mailData));
// dd($mail);
// DB::commit();
DB::commit();
return jsonResponseWithSuccessMessage(__('success.save_data'));
// return response()->json(['status'=>200]);
// return $voucher_data;
} catch (Exception $e) {
DB::rollBack();
Log::error("restaurant Store Page Load Failed " . $e->getMessage());
Log::error("Store Subadmin Page Load Failed: " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function edit($id)
{
// dd($id);
@@ -127,36 +146,63 @@ class ManageSubAdminController extends Controller
Use : To update sub admin form.
*/
try {
$userId = $request->sub_admin_id;
$user = IamPrincipal::findOrFail($userId); // Fetch the user to update
$rules = [
'sub_admin_email' => [
'required',
'string',
'email',
'max:100',
Rule::unique('iam_principal', 'email_address')
->ignore($userId) // Ignore the current user's ID
->whereNull('deleted_at') // Ensure the record is not soft-deleted
],
];
$messages = [
'sub_admin_email.required' => 'Please enter this field',
'sub_admin_email.email' => 'Please enter a valid email address',
'sub_admin_email.unique' => 'This email is already registered',
];
$validator = Validator::make($request->all(), $rules, $messages);
if ($validator->fails()) {
return response()->json(['errors' => $validator->errors()], 422);
}
DB::beginTransaction();
$sub_admin = IamPrincipal::find($request->sub_admin_id);
$sub_admin->user_name = 'sub_admin';
$sub_admin->first_name = $request->input('sub_admin_name');
$sub_admin->last_name = $request->input('sub_admin_lname');
$sub_admin->principal_type_xid = 2;
$sub_admin->principal_source_xid = Auth::guard('admin')->user()->principal_source_xid;
$sub_admin->email_address = $request->input('sub_admin_email');
// $sub_admin->password = bcrypt($request->input('password'));
$sub_admin->save();
// Update user details
$user->user_name = 'sub_admin';
$user->first_name = $request->input('sub_admin_name');
$user->last_name = $request->input('sub_admin_lname');
$user->principal_type_xid = 2;
$user->principal_source_xid = Auth::guard('admin')->user()->principal_source_xid;
$user->email_address = $request->input('sub_admin_email');
// Uncomment and set the password if needed
// $user->password = bcrypt($request->input('password'));
$user->save();
// Update module links
ManageModuleLink::where('principal_xid', $user->id)->delete();
$moduleIds = $request->input('module_id');
// dd($moduleIds);
$update_module = ManageModuleLink::where('principal_xid', $sub_admin->id)->delete();
foreach ($moduleIds as $moduleId) {
$sub_admin_permission = new ManageModuleLink;
$sub_admin_permission->principal_xid = $sub_admin->id;
$sub_admin_permission->principal_xid = $user->id;
$sub_admin_permission->manage_modules_xid = $moduleId;
$sub_admin_permission->save();
}
DB::commit();
return jsonResponseWithSuccessMessage(__('success.save_data'));
// return $voucher_data;
} catch (Exception $e) {
DB::rollBack();
Log::error("restaurant Store Page Load Failed " . $e->getMessage());
Log::error("Update Sub Admin Failed: " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
@@ -188,6 +234,4 @@ class ManageSubAdminController extends Controller
$test = ManageModuleLink::where('principal_xid', $testing_admin_id)->get('manage_modules_xid')->toArray();
return response()->json(['success' => true, 'data' => $test]);
}
}

View File

@@ -9,17 +9,7 @@ use App\Models\PrivacyPolicy;
class PrivacyPolicyController extends Controller
{
// public function index(){
// return view('Admin.pages.manage_cms.manage_privacy.manage_privacy');
// }
// public function index(){
// $view_privacy_policy = PrivacyPolicy::get()->toArray();
// // dd($view_privacy_policy);
// return view('Admin.pages.manage_cms.manage_privacy.manage_privacy');
// }
/**
/**
* Created By : sayali parab
* Created at : 29 May 2024
* Use : To get privacy policy page.
@@ -77,3 +67,4 @@ class PrivacyPolicyController extends Controller
}
}

View File

@@ -41,7 +41,7 @@ class ReferralCodeController extends Controller
}
} catch (Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'));
}
}
}

View File

@@ -10,7 +10,10 @@ use App\Models\IamPrincipal;
use App\Models\ManageRestaurant;
use App\Mail\RestUserApproval;
use App\Models\IamPrincipalRestaurantRole;
use Maatwebsite\Excel\Facades\Excel;
use App\Exports\restaurant_export;
use App\Exports\restaurant_export_selected;
use App\Mail\RestUserDisapproval;
use Illuminate\Support\Facades\Mail;
@@ -22,10 +25,10 @@ class RestaurantAppController extends Controller
/**
* Created By : sayali parab
* Created at : 03 June 2024
* Use : To get restaturant user.
*/
* Created By : sayali parab
* Created at : 03 June 2024
* Use : To get restaturant user.
*/
public function index_restraunt_users(Request $request)
{
@@ -51,12 +54,12 @@ class RestaurantAppController extends Controller
->orderBy('created_at', 'desc')
->get();
}
// return $restaurant_users;
foreach ($restaurant_users as $user) {
$restaurantIds = $user->getresturant->pluck('restaurant_xid')->toArray();
$user->restaurants = ManageRestaurant::whereIn('id', $restaurantIds)
->select('id','restaurant_id', 'name', 'image', 'address', 'latitude', 'longtitude')
->select('id', 'restaurant_id', 'name', 'image', 'address', 'latitude', 'longtitude')
->get();
// Optionally, if you want to format the images as in the previous example
@@ -76,22 +79,37 @@ class RestaurantAppController extends Controller
/**
* Created By : sayali parab
* Created at : 03 June 2024
* Use : To change the status restaturant user.
*/
// public function change_rest_user_status(Request $request)
// {
// try {
// DB::beginTransaction();
// $status = IamPrincipal::find($request->rest_user_id);
// $status->is_active = $request->status;
// // Generate a random password
// $randomPassword = \Str::random(8); // Adjust the length as per your requirements
// // Set the password
// $status->password = bcrypt($randomPassword); // Make sure to hash the password
// // Generate a random password if status is 1 (approved)
// if ($request->status == 1) {
// $randomPassword = \Str::random(8); // Adjust the length as per your requirements
// $status->password = bcrypt($randomPassword); // Make sure to hash the password
// } else {
// $status->deleted_by_admin = 1;
// $detail = [
// 'first_name' => $status->first_name,
// 'last_name' => $status->last_name,
// 'email' => $status->email_address,
// ];
// Mail::to($status->email_address)->send(new RestUserDisapproval($detail));
// }
// $status->save();
// if ($request->status == 1) {
// // Fetch user data based on user ID
// $user = IamPrincipal::find($request->rest_user_id);
@@ -117,11 +135,7 @@ class RestaurantAppController extends Controller
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// }
// }
/**
* Created By : sayali parab
* Created at : 03 June 2024
* Use : To change the status restaturant user.
*/
public function change_rest_user_status(Request $request)
{
try {
@@ -133,50 +147,52 @@ class RestaurantAppController extends Controller
if ($request->status == 1) {
$randomPassword = \Str::random(8); // Adjust the length as per your requirements
$status->password = bcrypt($randomPassword); // Make sure to hash the password
// Send approval email
$data = [
'first_name' => $status->first_name,
'last_name' => $status->last_name,
'email' => $status->email_address,
'password' => $randomPassword, // Pass the random password to the email template
];
Mail::to($status->email_address)->send(new RestUserApproval($data));
} else {
$status->deleted_by_admin = 1;
$detail = [
'first_name'=> $status->first_name,
'last_name' => $status->last_name,
'email'=> $status->email_address,
];
Mail::to($status->email_address)->send(new RestUserDisapproval($detail));
}
$status->save();
if ($request->status == 1) {
// Fetch user data based on user ID
$user = IamPrincipal::find($request->rest_user_id);
if ($user) {
// Send email only if user exists
$data = [
'first_name' => $user->first_name,
'last_name' => $user->last_name,
'email' => $user->email_address,
'password' => $randomPassword, // Pass the random password to the email template
];
Mail::to($user->email_address)->send(new RestUserApproval($data));
}
}
DB::commit();
return jsonResponseWithSuccessMessage(__('success.update_data'));
return response()->json(['success' => true]);
} catch (Exception $e) {
DB::rollBack();
Log::error("Update Status function Load Failed " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
return response()->json(['success' => false, 'message' => __('auth.something_went_wrong')], 500);
}
}
/**
* Created By : sayali parab
* Created at : 03 June 2024
* Use : To view restaturant user.
*/
* Created By : sayali parab
* Created at : 03 June 2024
* Use : To view restaturant user.
*/
public function view_rest($id)
{
try {
$restdata = IamPrincipalRestaurantRole::with('restaurant','customer')->where('principal_xid', $id)->first();
$restdata = IamPrincipalRestaurantRole::with('restaurant', 'customer')->where('principal_xid', $id)->first();
// return $restdata;
return view('Admin.pages.manage_users.restaurants_app.view_restaurant_users', compact('restdata'));
@@ -189,10 +205,10 @@ class RestaurantAppController extends Controller
/**
* Created By : sayali parab
* Created at : 03 June 2024
* Use : To edit restaturant user.
*/
* Created By : sayali parab
* Created at : 03 June 2024
* Use : To edit restaturant user.
*/
public function edit_Restaurant($id)
{
@@ -205,67 +221,12 @@ class RestaurantAppController extends Controller
}
}
// public function updateRest(Request $request)
// {
// try {
// DB::beginTransaction();
// $rest_data = IamPrincipal::where('id', $request->rest_id)->first();
// $rest_data->first_name = $request->input('name');
// $rest_data->last_name = $request->input('last_name');
// $rest_data->phone_number = $request->input('phone');
// $rest_data->email_address = $request->input('email_id');
// $rest_data->save();
// DB::commit();
// return jsonResponseWithSuccessMessage(__('success.update_data'));
// } catch (Exception $e) {
// DB::rollBack();
// Log::error("updateCustomerNewsArticle Services Page Load Failed " . $e->getMessage());
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// }
// }
// public function updateRest(Request $request)
// {
// try {
// DB::beginTransaction();
// $rest_data = IamPrincipal::find($request->input('rest_id'));
// if (!$rest_data) {
// throw new Exception('Restaurant not found.');
// }
// $rest_data->first_name = $request->input('restaurant_name');
// $rest_data->description = $request->input('restaurant_des');
// $rest_data->phone_number = $request->input('restaurant_phone');
// $rest_data->email_address = $request->input('restaurant_email');
// $rest_data->location = $request->input('restaurant_loc');
// $rest_data->bio = $request->input('restaurant_bio');
// if ($request->hasFile('restaurant_image')) {
// $imagePath = $request->file('restaurant_image')->store('images', 'public');
// $rest_data->image_path = $imagePath;
// }
// $rest_data->save();
// DB::commit();
// return response()->json(['message' => __('success.update_data')], 200);
// } catch (Exception $e) {
// DB::rollBack();
// Log::error("Update Restaurant Failed: " . $e->getMessage());
// return response()->json(['message' => __('auth.something_went_wrong')], 500);
// }
// }
/**
* Created By : sayali parab
* Created at : 04 June 2024
* Use : To update restaturant user.
*/
* Created By : sayali parab
* Created at : 04 June 2024
* Use : To update restaturant user.
*/
public function updateRest(Request $request)
{
@@ -298,10 +259,10 @@ class RestaurantAppController extends Controller
}
/**
* Created By : sayali parab
* Created at : 04 June 2024
* Use : To delete restaturant user.
*/
* Created By : sayali parab
* Created at : 04 June 2024
* Use : To delete restaturant user.
*/
public function deleteRestaurantsUsers($id)
{
@@ -322,10 +283,10 @@ class RestaurantAppController extends Controller
}
/**
* Created By : sayali parab
* Created at : 04 June 2024
* Use : To archieve restaturant user.
*/
* Created By : sayali parab
* Created at : 04 June 2024
* Use : To archieve restaturant user.
*/
public function archive_restaturant()
{
@@ -339,10 +300,10 @@ class RestaurantAppController extends Controller
}
/**
* Created By : sayali parab
* Created at : 04 June 2024
* Use : To unarchieve restaturant user.
*/
* Created By : sayali parab
* Created at : 04 June 2024
* Use : To unarchieve restaturant user.
*/
public function unarchive_rest($id)
{
@@ -360,4 +321,41 @@ class RestaurantAppController extends Controller
return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]);
}
}
/*
Created By : Sayali Parab
Created at : 17 july 2024
Use : To Get Excel.
*/
public function exportSelectedrestaurantApp(Request $request)
{
try {
if ($request->has('all_id')) {
return Excel::download(new restaurant_export, 'restaurant_user_data.xlsx');
}
// $ids = $request->selected_id;
// dd($ids);
$ids = $request->input('selected_id');
if (empty($ids)) {
return response()->json(['error' => 'No IDs provided for export.'], 400);
}
Log::info("Selected IDs for export: " . $ids);
$fileName = 'selected_restaurantusers_data.xlsx';
Log::info("Attempting to export selected customers to file: " . $fileName);
return Excel::download(new restaurant_export_selected($ids), $fileName);
} catch (\Exception $e) {
Log::error('Export failed: ' . $e->getMessage());
return response()->json(['error' => 'Export failed. Something went wrong.'], 500);
}
}
}

View File

@@ -5,13 +5,11 @@ use App\Models\IamPrincipal;
use Illuminate\Support\Facades\Session;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Cache;
use Tymon\JWTAuth\Facades\JWTAuth;
use GuzzleHttp\Client;
use Illuminate\Support\Facades\Log;
/**
* Created By : sayli raut
* Created at : 24 Jan 2024
* Use : Json response with success message for API
*/
if (!function_exists('jsonResponseWithSuccessMessageApi')) {
function jsonResponseWithSuccessMessageApi($message, $data = [], $statusCode = 200)
{
@@ -32,11 +30,7 @@ if (!function_exists('jsonResponseWithSuccessMessageApi')) {
}
}
/**
* Created By : sayli raut
* Created at : 24 jan 2024
* Use : Json response with error message for API
*/
if (!function_exists('jsonResponseWithErrorMessageApi')) {
function jsonResponseWithErrorMessageApi($errorMessage, $statusCode = 500)
{
@@ -56,11 +50,29 @@ if (!function_exists('jsonResponseWithErrorMessageApi')) {
}
}
/**
* Created by : sayli raut
* Created at : 24 Jan 2024
* Use : To return error json response for admin
*/
if (!function_exists('jsonResponseWithDataErrorMessageApi')) {
function jsonResponseWithDataErrorMessageApi($errorMessage, $data = [], $statusCode = 406)
{
// Set the HTTP status code
http_response_code($statusCode);
// Prepare the response array
$response = [
'status' => 'error',
'status_code' => $statusCode,
'message' => $errorMessage,
'data' => $data,
];
return response()->json($response, $statusCode);
// Stop further execution (optional)
exit();
}
}
if (!function_exists('jsonResponseWithErrorMessage')) {
function jsonResponseWithErrorMessage($errorMessage)
{
@@ -75,11 +87,7 @@ if (!function_exists('jsonResponseWithErrorMessage')) {
}
}
/**
* Created by : sayli raut
* Created at : 24 Jan 2024
* Use : To return success json response for admin
*/
if (!function_exists('jsonResponseWithSuccessMessage')) {
function jsonResponseWithSuccessMessage($message, $data = [])
{
@@ -98,11 +106,7 @@ if (!function_exists('jsonResponseWithSuccessMessage')) {
}
}
/**
* Created by : Pradyumn Dwivedi
* Created On : 11-May-2022
* Uses: This function will be used to full search data in api.
*/
if (!function_exists('fullSearchQuery')) {
function fullSearchQuery($query, $word, $columns)
{
@@ -116,11 +120,7 @@ if (!function_exists('fullSearchQuery')) {
}
}
/**
* Created by : sayli raut
* Created at : 24 Feb 2024
* Use : To check and validate to customer token
*/
if (!function_exists('readHeaderToken')) {
function readHeaderToken()
{
@@ -143,11 +143,7 @@ if (!function_exists('readHeaderToken')) {
}
}
/**
* Created by : sayli raut
* Created at : 24 jan 2024
* Use : To check and validate login restaurant user token
*/
if (!function_exists('readRestHeaderToken')) {
function readRestHeaderToken()
{
@@ -168,17 +164,145 @@ if (!function_exists('readRestHeaderToken')) {
if (!function_exists('generateOTP')) {
function generateOTP()
{
// Define the length of the OTP
$otpLength = 4;
function generateOTP()
{
// Define the length of the OTP
$otpLength = 4;
// Generate a random OTP with $otpLength digits
$otp = '';
for ($i = 0; $i < $otpLength; $i++) {
$otp .= rand(0, 9);
// Generate a random OTP with $otpLength digits
$otp = '';
for ($i = 0; $i < $otpLength; $i++) {
$otp .= rand(0, 9);
}
return $otp;
}
return $otp;
}
}
/**
* Created by : Hritik RD
* Created at : 12 July 2024
* Use : To Get Opening hours of Restaurant By NAME based on Google Maps using Google Places APIs
*/
if (!function_exists('getOpeningHoursOfRestaurant')) {
function getOpeningHoursOfRestaurant($restaurantName)
{
$googlePlaceApiKey = config('constants.googlePlaces.api_key'); // Your webhook secret key
// dd($googlePlaceApiKey);
$client = new Client();
$url = 'https://maps.googleapis.com/maps/api/place/findplacefromtext/json';
$response = $client->get($url, [
'query' => [
'fields' => 'place_id',
'input' => $restaurantName,
'inputtype' => 'textquery',
'key' => $googlePlaceApiKey
]
]);
$placeData = json_decode($response->getBody(), true);
if (isset($placeData['candidates'][0]['place_id'])) {
$placeId = $placeData['candidates'][0]['place_id'];
// return $placeId;
} else {
$placeId = "N/A";
// return response()->json($placeId);
return $placeId;
}
// $placeId = 'ChIJT3dpYcy35zsRLxY5KTTMqhU'; // You can also pass this as a parameter if needed
$client = new Client();
$url = 'https://maps.googleapis.com/maps/api/place/details/json';
$response = $client->get($url, [
'query' => [
'fields' => 'name,rating,formatted_phone_number,opening_hours',
'place_id' => $placeId,
'key' => $googlePlaceApiKey
]
]);
$data = json_decode($response->getBody(), true);
if (isset($data['result']['opening_hours']['weekday_text'])) {
$hours = $data['result']['opening_hours']['weekday_text'];
// return response()->json(['place_id' => $placeId]);
} else {
$hours = "N/A";
}
return $hours;
// dd($data);
// return response()->json($data);
}
if (!function_exists('getOperatingHours')) {
function getOperatingHours($placeName, $address)
{
$client = new Client();
$googlePlaceApiKey = config('constants.googlePlaces.api_key');
$cacheKey = 'restaurant_hours_' . $placeName;
$cacheKeyIsRestaurantOpen = 'is_restaurant_open_now_' . $placeName;
if (Cache::has($cacheKey)) {
return [
'operating_hours' => Cache::get($cacheKey),
'is_open_now' => Cache::get($cacheKeyIsRestaurantOpen),
];
}
try {
// Get place_id
$placeResponse = $client->get('https://maps.googleapis.com/maps/api/place/findplacefromtext/json', [
'query' => [
'fields' => 'place_id',
'input' => $placeName . ' ' . $address,
'inputtype' => 'textquery',
'key' => $googlePlaceApiKey
]
]);
$placeData = json_decode($placeResponse->getBody(), true);
if (isset($placeData['candidates'][0]['place_id'])) {
$placeId = $placeData['candidates'][0]['place_id'];
// Get operating hours
$detailResponse = $client->get('https://maps.googleapis.com/maps/api/place/details/json', [
'query' => [
'fields' => 'opening_hours',
'place_id' => $placeId,
'key' => $googlePlaceApiKey
]
]);
$detailData = json_decode($detailResponse->getBody(), true);
if (isset($detailData['result']['opening_hours']['weekday_text'])) {
$hours = $detailData['result']['opening_hours']['weekday_text'];
$isOpenNow = $detailData['result']['opening_hours']['open_now'];
Cache::put($cacheKey, $hours, now()->addHours(2));
Cache::put($cacheKeyIsRestaurantOpen, $isOpenNow, now()->addHours(2));
return [
'operating_hours' => $hours,
'is_open_now' => $isOpenNow,
];
}
}
} catch (\Exception $e) {
Log::error('Restaurant Get service failed : ' . $e->getMessage());
}
return [
'operating_hours' => "N/A",
'is_open_now' => false,
];
}
}
}

View File

@@ -21,19 +21,19 @@ class onesignalhelper
'contents' => ['en' => $message],
'headings' => ['en' => $title],
'content_available' => true,
'data' => [
'content_type' => $content_type,
'id' => $id,
],
// 'data' => [
// 'content_type' => $content_type,
// 'id' => $id,
// ],
'big_picture' => $imageUrl,
'external_id' => [$playerId]
// 'external_id' => [$playerId],
// 'authorization' => env('ONE_SIGNAL_AUTHORIZE')
];
$result = OneSignal::sendPush($fields, null ,env('ONE_SIGNAL_APP_ID'));
Log::info("Notification sending To " . $playerId);
Log::info($result);
}
@@ -66,13 +66,6 @@ class onesignalhelper
try {
$currentUtcTime = Carbon::now();
// $data = new NotificationDetails();
// $data->principal_xid = $customerId;
// $data->type = $type;
// $data->date_added = $currentUtcTime;
// $data->description = $description;
// $data->save();
$newRecord = NotificationDetails::create([
'principal_xid' => $customerId,
'type' => $type,
@@ -81,7 +74,9 @@ class onesignalhelper
'image' => $imagePath,
]);
Log::info('success'. $newRecord);
} catch (\Exception $e) {
Log::info('error'. $e);
// Return response in case of error
return response()->json([
'status' => 500,

View File

@@ -34,7 +34,7 @@ class Kernel extends HttpKernel
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
// \App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
@@ -43,6 +43,14 @@ class Kernel extends HttpKernel
\Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'webhook' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// Do not include the VerifyCsrfToken middleware here
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
];
/**

View File

@@ -18,7 +18,7 @@ class CheckStatus
{
$admin = auth()->guard('admin')->user();
Log::info($admin);
// Log::info($admin);
if ($admin && $admin->is_active == 1 && ($admin->principal_type_xid == 1 || $admin->principal_type_xid == 2)) {
return $next($request);
} else {

View File

@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Session;
use Tymon\JWTAuth\Exceptions\JWTException;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Support\Facades\Log;
class CustomerJwtMiddleware
{
@@ -32,9 +33,14 @@ class CustomerJwtMiddleware
$user = JWTAuth::setToken($token)->authenticate();
// Check if authentication was successful and user type is correct
if (!$user || $user->principal_type_xid !== 3) {
if (!$user || $user->principal_type_xid != 3) {
return response()->json(['status' => 'error', 'status_code' => 401, 'message' => 'Unauthorized access'], 401);
}
Session::flash('vendorToken', $token);
} catch (JWTException $e) {

View File

@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Session;
use Symfony\Component\HttpFoundation\Response;
use Tymon\JWTAuth\Exceptions\JWTException;
use Tymon\JWTAuth\Facades\JWTAuth;
use Illuminate\Support\Facades\Log;
class RestaurantJwtMiddleware
{
/**
@@ -35,7 +35,7 @@ class RestaurantJwtMiddleware
$user = JWTAuth::setToken($token)->authenticate();
// Check if the user is of restaurant type
if (!$user ||$user->principal_type_xid !== 4) {
if (!$user ||$user->principal_type_xid != 4) {
return response()->json(['status' => 'error', 'status_code' => 401, 'message' => 'Unauthorized access'], 401);
}

View File

@@ -12,6 +12,9 @@ class VerifyCsrfToken extends Middleware
* @var array<int, string>
*/
protected $except = [
//
'stripe/webhook',
'stripe-webhooks',
'/stripe/webhook',
'/stripe-webhooks'
];
}

View File

@@ -0,0 +1,68 @@
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use GuzzleHttp\Client;
use Illuminate\Support\Facades\Cache;
class FetchOperatingHours implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*/
protected $restaurantName;
protected $googlePlaceApiKey;
public function __construct($restaurantName, $googlePlaceApiKey)
{
$this->restaurantName = $restaurantName;
$this->googlePlaceApiKey = $googlePlaceApiKey;
}
public function handle()
{
// $client = new Client();
// $url = 'https://maps.googleapis.com/maps/api/place/findplacefromtext/json';
// $response = $client->get($url, [
// 'query' => [
// 'fields' => 'place_id',
// 'input' => $this->restaurantName,
// 'inputtype' => 'textquery',
// 'key' => $this->googlePlaceApiKey
// ]
// ]);
// $placeData = json_decode($response->getBody(), true);
// if (isset($placeData['candidates'][0]['place_id'])) {
// $placeId = $placeData['candidates'][0]['place_id'];
// $url = 'https://maps.googleapis.com/maps/api/place/details/json';
// $response = $client->get($url, [
// 'query' => [
// 'fields' => 'opening_hours',
// 'place_id' => $placeId,
// 'key' => $this->googlePlaceApiKey
// ]
// ]);
// $data = json_decode($response->getBody(), true);
// if (isset($data['result']['opening_hours']['weekday_text'])) {
// $hours = $data['result']['opening_hours']['weekday_text'];
// Cache::put('restaurant_hours_' . $this->restaurantName, $hours, now()->addHours(24));
// } else {
// Cache::put('restaurant_hours_' . $this->restaurantName, "N/A", now()->addHours(24));
// }
// } else {
// Cache::put('restaurant_hours_' . $this->restaurantName, "N/A", now()->addHours(24));
// }
}
}

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Mail;
use App\Models\IamPrincipal;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class AccountRegister extends Mailable
{
use Queueable, SerializesModels;
public $restaurantuser;
public $restaurantName;
/**
* Create a new message instance.
*
* @param IamPrincipal $restaurantuser
* @param string $restaurantName
* @return void
*/
public function __construct(IamPrincipal $restaurantuser, $restaurantName)
{
$this->restaurantuser = $restaurantuser;
$this->restaurantName = $restaurantName;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('Admin.pages.mail.account_register');
}
/**
* Get the message envelope.
*
* @return \Illuminate\Mail\Mailables\Envelope
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'New Account Registration Details',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
}

View File

@@ -56,6 +56,6 @@ class Add_Subadmin extends Mailable
public function build()
{
// $otp = $this->otp;
return $this->subject('OTP From Cheers to the Session')->view('mail.subadmin');
return $this->subject('OTP From Cheers to the Season')->view('mail.subadmin');
}
}

View File

@@ -0,0 +1,57 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class RestUserDisapproval extends Mailable
{
use Queueable, SerializesModels;
public $detail;
/**
* Create a new message instance.
*/
public function __construct($detail)
{
$this->detail = $detail;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Rest User Disapproval',
);
}
/**
* Get the message content definition.
*/
public function build()
{
$detail = $this->detail;
// dd($data);
return $this->subject('Rest User Approval')
->view('Admin.pages.mail.rest_user_disapproval', ["content" => $detail]);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
}

View File

@@ -0,0 +1,17 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CustomReferralCode extends Model
{
use HasFactory;
use SoftDeletes;
protected $table = 'custom_referral_code';
protected $guarded = [];
}

View File

@@ -13,6 +13,7 @@ use App\Models\admin\ManageFeedback;
use App\Models\ManageModuleLink;
use App\Models\ManageModule;
use App\Models\OrderedPassport;
use App\Models\ReferralUsers;
class IamPrincipal extends Authenticatable implements JWTSubject
@@ -24,6 +25,7 @@ class IamPrincipal extends Authenticatable implements JWTSubject
// protected $dates = ['deleted_at'];
protected $fillable = [
'id',
'one_signal_player_id',
'first_name',
'last_name',
@@ -67,32 +69,7 @@ class IamPrincipal extends Authenticatable implements JWTSubject
// protected $fillable =
// [
// 'principal_type_xid',
// 'principal_source_xid',
// 'user_name',
// 'password_hash',
// 'pin',
// 'first_name',
// 'last_name',
// 'gender',
// 'date_of_birth',
// 'phone_number',
// 'other_phone_number',
// 'email_address',
// 'address_line1',
// 'address_line2',
// 'city_xid',
// 'state_xid',
// 'country_xid',
// 'post_code',
// 'last_login_datetime',
// 'profile_photo',
// 'referral_code',
// 'description',
// 'is_active'
// ];
public function getJWTIdentifier()
{
@@ -192,4 +169,13 @@ class IamPrincipal extends Authenticatable implements JWTSubject
{
return $this->hasMany(ManageContactus::class, 'principal_xid', 'id');
}
public function isSubscribed()
{
return $this->hasMany(Subscriptions::class, 'iam_principal_xid', 'id');
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ManageReferralRule extends Model
{
use HasFactory;
protected $table='manage_referral_rules';
protected $fillable=[
'id ',
'title',
'message',
'created_at',
'updated_at'
];
}

View File

@@ -22,7 +22,7 @@ class ManageRestaurant extends Model
protected $fillable = [
'short_id', 'name', 'description', 'restaurant_id', 'address', 'image', 'bio',
'try_on_1', 'try_on_2', 'try_on_3', 'try_on_4', 'exclusion', 'latitude', 'longitude',
'is_active', 'created_by', 'modified_by', 'phone_number'
'is_active', 'created_by', 'modified_by', 'phone_number','time_hours','max_numb_day','max_numb_week','max_numb_month'
];
protected static function boot()
@@ -55,5 +55,15 @@ class ManageRestaurant extends Model
}
public function timeInterval()
{
return $this->hasMany(RestaurantTimeInterval::class, 'manage_restaurants_xid', 'id');
}
public function closedRestaurant()
{
return $this->hasMany(RestaurantClosedHour::class, 'restaurant_id', 'id');
}
}

18
app/Models/ManageRule.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ManageRule extends Model
{
use HasFactory;
protected $table = 'manage_rules';
protected $fillable = [
'message'
];
}

View File

@@ -23,6 +23,12 @@ class ManageState extends Model
'deleted_at',
'created_at',
'updated_at',
'state_xid',
];
public function timeInterval()
{
return $this->hasMany(TimeInterval::class, 'manage_state_xid', 'id');
}
}

View File

@@ -11,7 +11,7 @@ class NotificationDetails extends Model
protected $table = "notification_details";
protected $fillable = [
'id',
'principal_xid', 'type', 'description', 'image', 'date_added'
'principal_xid', 'type', 'description', 'image', 'date_added','is_schedule','delivery_schedule','is_active', 'user_type', 'state_ids'
];
protected $guarded = [];
@@ -20,4 +20,9 @@ class NotificationDetails extends Model
{
return $this->belongsTo(IamPrincipal::class, 'principal_xid', 'id');
}
protected $casts = [
'state_ids' => 'array',
];
}

View File

@@ -18,6 +18,7 @@ class RedeemRestaurant extends Model
'count',
'redeem_date',
'is_redeemption_undone',
'state_xid',
'redeemption_undone_date',
'created_at',
'updated_at'

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use app\Models\IamPrincipal;
class ReferralUsers extends Model
{
use HasFactory;
use SoftDeletes;
protected $table = 'referral_users';
protected $guarded = [];
public function referredUser()
{
return $this->belongsTo(IamPrincipal::class, 'iam_principal_xid', 'id');
}
public function refeersUser()
{
return $this->belongsTo(IamPrincipal::class, 'referred_user_xid', 'id');
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class RestaurantClosedHour extends Model
{
use HasFactory;
protected $table = 'restaurant_closed_hours';
protected $fillable = ['restaurant_id', 'day_of_week', 'start_time', 'end_time'];
public function restaurant()
{
return $this->belongsTo(ManageRestaurant::class);
}
}

View File

@@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class RestaurantTimeInterval extends Model
{
use HasFactory;
protected $table = 'resaurant_time_intervals';
protected $fillable = [
'manage_restaurants_xid',
'time_hours',
'time_interval',
'is_active',
'quantity'
];
}

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SubscriptionProducts extends Model
{
use HasFactory;
protected $table = 'subscription_products';
protected $guarded = [];
protected $fillable =[
'id',
'product_name',
'product_value',
'product_details',
'stripe_product_id',
'stripe_price_id',
'is_active',
'deleted_at',
'created_by',
'modified_by',
'created_at',
'updated_at'
];
}

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Subscriptions extends Model
{
use HasFactory;
protected $table = 'subscriptions';
protected $guarded = [];
public function subscription()
{
return $this->belongsTo(IamPrincipal::class, 'iam_principal_xid', 'id');
}
public function iamPrincipal()
{
return $this->belongsTo(IamPrincipal::class, 'iam_principal_xid', 'id');
}
public function subscriptionProduct()
{
return $this->belongsTo(SubscriptionProducts::class, 'subscription_product_xid', 'id');
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class TimeInterval extends Model
{
use HasFactory;
protected $table = 'time_intervals';
protected $fillable = [
'manage_state_xid',
'time_hours',
'time_interval',
'is_active',
'quantity'
];
}

View File

@@ -25,7 +25,7 @@ class RouteServiceProvider extends ServiceProvider
public function boot(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
return Limit::perMinute(150)->by($request->user()?->id ?: $request->ip());
});
$this->routes(function () {

View File

@@ -54,11 +54,16 @@ class AuthServices
DB::beginTransaction();
do {
$referral_code = \Str::random(10);
$referral_code = strtoupper($this->generateRandomString(10));
} while (IamPrincipal::where('referral_code', $referral_code)->exists());
if ($request->one_signal_player_id == "null") {
$playerId = null;
} else {
$playerId = $request->one_signal_player_id;
}
$user = IamPrincipal::create([
'one_signal_player_id' => $request->one_signal_player_id,
'one_signal_player_id' => $playerId,
'first_name' => $request->first_name,
'last_name' => $request->last_name,
'email_address' => $request->email_address,
@@ -89,10 +94,6 @@ class AuthServices
}
public function login($request)
{
try {
@@ -118,8 +119,14 @@ class AuthServices
Log::error('Customer Login Failed');
return jsonResponseWithErrorMessageApi(__('auth.authentication_failed'), 403);
}
Log::info($request->one_signal_player_id );
if ($request->one_signal_player_id == "null") {
$playerId = null;
} else {
$playerId = $request->one_signal_player_id;
}
$isExistEmail->one_signal_player_id = $request->one_signal_player_id;
$isExistEmail->one_signal_player_id = $playerId;
$isExistEmail->save();
$response = [
'iam_principal_xid' => $isExistEmail->id,
@@ -310,4 +317,36 @@ class AuthServices
return jsonResponseWithErrorMessageApi(__('auth.authentication_failed'), 403);
}
}
public function searchState($request)
{
try {
$searchQuery = $request->input('search_data');
$query = ManageState::select('id', 'name')->where('is_active', 1);
if ($searchQuery) {
$query->where(function ($q) use ($searchQuery) {
$q->where('name', 'like', '%' . $searchQuery . '%');
});
}
$restaurants = $query->get();
return jsonResponseWithSuccessMessageApi(__('auth.data_fetched_successfully'), $restaurants, 200);
} catch (\Exception $e) {
Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage());
return response()->json(__('something_went_wrong'), 500);
}
}
function generateRandomString($length = 10)
{
$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
}

View File

@@ -123,6 +123,11 @@ class CMSApiServices
->get()
->toArray();
$data['restaurant'] = Termsandconditions::select('id', 'message')
->where('category_xid', '2')
->get()
->toArray();
return $data;
} catch (Exception $ex) {
Log::error('Terms and condition Get service failed : ' . $ex->getMessage());

View File

@@ -34,7 +34,7 @@ class ContactUsApiServices
//response data
Log::info('Contact form data Created successfully');
return jsonResponseWithSuccessMessageApi(__('success.save_data'), [], 201);
return jsonResponseWithSuccessMessageApi(__('success.message_sent'), [], 201);
} else {
Log::error('Contact not found in addVendorContactForm.');
return jsonResponseWithErrorMessageApi(__('auth.validation_failed'), 403);

View File

@@ -3,6 +3,7 @@
namespace App\Services\APIs\CustomerAPIs;
use App\Models\IamPrincipal;
use App\Models\Subscriptions;
use Exception;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Log;
@@ -27,13 +28,21 @@ class CustomerApiServices
'referral_code'
)->find($user->id);
$dateTime = now();
$formattedDateTime = $dateTime->format('Y-m-d H:i:s');
$isSubscribedUser = Subscriptions::where('iam_principal_xid', $customerIamId)
->where('next_payment_date', '>=', $formattedDateTime)
->exists();
if ($data->profile_photo) {
$data->profile_photo = ListingImageUrl('profile_image', $data->profile_photo);;
$data->profile_photo = ListingImageUrl('profile_image', $data->profile_photo);
} else {
$data->profile_photo = asset('public/assets/img/blankProfile.png');
}
// $data['voucher_redeemed'] = MyPassportVoucher::where([['iam_principal_xid', $customerIamId], ['is_redeem', 1]])->count();
$data->is_subscribed = $isSubscribedUser;
return $data;
} catch (Exception $ex) {
Log::error('Customer Get data service failed : ' . $ex->getMessage());
@@ -42,6 +51,7 @@ class CustomerApiServices
}
public function updateUserProfileDetailService($customerIamId, $request)
{
try {
@@ -59,33 +69,28 @@ class CustomerApiServices
$data->profile_photo = $tnormalImage;
$data->save();
DB::commit();
}
if ($request->has('date_of_birth')) {
$data->date_of_birth = $request->date_of_birth;
$data->save();
DB::commit();
}
if ($request->has('first_name')) {
$data->first_name = $request->first_name;
$data->save();
DB::commit();
}
if ($request->has('last_name')) {
$data->last_name = $request->last_name;
$data->save();
DB::commit();
}
if ($request->has('phone_number')) {
$data->phone_number = $request->phone_number;
$data->save();
DB::commit();
}
if ($request->has('email_address')) {
@@ -139,10 +144,20 @@ class CustomerApiServices
}
}
public function CheckSubscription($customerIamId)
{
try {
$dateTime = now();
$formattedDateTime = $dateTime->format('Y-m-d H:i:s');
$isSubscribedUser = Subscriptions::where('iam_principal_xid', $customerIamId)
->where('next_payment_date', '>=', $formattedDateTime)
->exists();
return $isSubscribedUser;
} catch (Exception $ex) {
Log::error('Customer subscription Get data service failed : ' . $ex->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
}

View File

@@ -36,7 +36,6 @@ class FeedbackApiServices
$feedback = ManageFeedback::create($feedbackData);
DB::commit();
Log::info('Feedback added successfully');
return jsonResponseWithSuccessMessageApi(__('auth.feedback_store'), [], 200);
} catch (Exception $ex) {
DB::rollBack();

View File

@@ -10,8 +10,16 @@ use App\Models\IamPrincipalRestaurantRole;
use App\Models\ManageRestaurant;
use App\Models\RedeemRestaurant;
use App\Helpers\onesignalhelper;
use App\Models\RestaurantTimeInterval;
use App\Models\TimeInterval;
use Carbon\Carbon;
use Exception;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use App\Jobs\FetchOperatingHours;
use GuzzleHttp\Client;
use GuzzleHttp\Promise;
use GuzzleHttp\Promise\Utils;
@@ -20,28 +28,71 @@ class RestaurantApiServices
public function getCoordinates($customerIamId)
{
try {
$restaurants = ManageRestaurant::with('operatingHours')->select(
'id',
'name',
'image',
'address',
'short_id',
'latitude',
'longtitude'
)
->where('is_active', '1')
->get()
->toArray();
// Fetch all active restaurants
$restaurants = ManageRestaurant::with('closedRestaurant')
->select('id', 'name', 'image', 'address', 'short_id', 'latitude', 'longtitude', 'state_xid')
->where('is_active', '1')->get();
foreach ($restaurants as &$restaurant) {
$restaurant['image'] = ListingImageUrl('restaurant_images', $restaurant['image']);
$isFavourite = CustomerFavouriteRestaurant::where('principal_xid', $customerIamId)
->where('restaurant_xid', $restaurant['id'])
->exists();
$restaurant['is_favourite'] = $isFavourite;
$hoursData = getOperatingHours($restaurant['name'], $restaurant['address']);
$restaurant['operating_hours'] = $hoursData['operating_hours'];
$restaurant['is_restaurant_open_now_as_per_google'] = $hoursData['is_open_now'];
$lastRedeem = RedeemRestaurant::where('iam_principal_xid', $customerIamId)
->where('manage_restaurants_xid', $restaurant->id)
->where('is_redeem', 1)
->orderBy('redeem_date', 'desc')
->first();
$restTime = RestaurantTimeInterval::select('time_hours')->where('manage_restaurants_xid', $restaurant->id)->first();
$stateTime = TimeInterval::select('time_hours')->where('manage_state_xid', $restaurant->state_xid)->first();
$restTimeHours = $restTime ? $restTime->time_hours : 0;
$stateTimeHours = $stateTime ? $stateTime->time_hours : 0;
$restaurant['next_redeem_time'] = "Now";
$currentTime = Carbon::now();
if ($lastRedeem) {
$lastRedeemTime = Carbon::parse($lastRedeem->redeem_date);
$restAllowedRedeemTime = $lastRedeemTime->copy()->addHours(intval($restTimeHours));
$stateAllowedRedeemTime = $lastRedeemTime->copy()->addHours(intval($stateTimeHours));
if ($currentTime < $restAllowedRedeemTime) {
$restaurant['next_redeem_time'] = $restAllowedRedeemTime->toDateTimeString();
} else if ($currentTime < $stateAllowedRedeemTime) {
$restaurant['next_redeem_time'] = $stateAllowedRedeemTime->toDateTimeString();
}
}
// Include logic for preventing redemption in the same state
if ($restaurant['next_redeem_time'] === "Now") {
// Fetch the last redeem time for any restaurant in the same state
$lastStateRedeem = RedeemRestaurant::where('iam_principal_xid', $customerIamId)
->where('state_xid', $restaurant->state_xid)
->where('is_redeem', 1)
->orderBy('redeem_date', 'desc')
->first();
if ($lastStateRedeem) {
$lastStateRedeemTime = Carbon::parse($lastStateRedeem->redeem_date);
$stateAllowedRedeemTime = $lastStateRedeemTime->copy()->addHours(intval($stateTimeHours));
if ($currentTime < $stateAllowedRedeemTime) {
$restaurant['next_redeem_time'] = $stateAllowedRedeemTime->toDateTimeString();
}
}
} }
return jsonResponseWithSuccessMessage(__('auth.data_fetched_successfully'), $restaurants, 200);
} catch (Exception $ex) {
Log::error('Restaurant Get service failed : ' . $ex->getMessage());
@@ -49,6 +100,10 @@ class RestaurantApiServices
}
}
public function addToFavourite($customerIamId, $request)
{
try {
@@ -83,19 +138,29 @@ class RestaurantApiServices
}
public function listFavRestaurant($customerIamId)
{
try {
$list = CustomerFavouriteRestaurant::where('principal_xid', $customerIamId)->get()->toArray();
// Get list of favorite restaurant IDs
$customerFavouriteRestaurants = CustomerFavouriteRestaurant::where('principal_xid', $customerIamId)
->pluck('restaurant_xid')
->toArray();
$restaurants = ManageRestaurant::with('operatingHours')->where('is_active', '1')->whereIn('id', $customerFavouriteRestaurants)->get();
// Fetch the restaurant details
$restaurants = ManageRestaurant::with('closedRestaurant')->where('is_active', '1')
->whereIn('id', $customerFavouriteRestaurants)
->get();
foreach ($restaurants as &$res) {
$res['image'] = ListingImageUrl('restaurant_images', $res['image']);
// Fetch operating hours and open status using the helper function
$data = getOperatingHours($res->name, $res->address);
$res['operating_hours'] = $data['operating_hours'];
$res['is_restaurant_open_now_as_per_google'] = $data['is_open_now'];
}
return jsonResponseWithSuccessMessage(__('auth.data_updated_successfully'), $restaurants, 200);
@@ -106,10 +171,164 @@ class RestaurantApiServices
}
//
// public function DetailRestaurant($customerIamId, $id)
// {
// try {
// $rest = ManageRestaurant::with('closedRestaurant')->select('id', 'short_id', 'name', 'description', 'restaurant_id', 'address', 'image', 'bio', 'try_on_1', 'try_on_2', 'try_on_3', 'try_on_4', 'exclusion', 'latitude', 'longtitude', 'state_xid')
// ->where('short_id', $id)
// ->where('is_active', '1')
// ->first();
// if ($rest) {
// $rest->image = ListingImageUrl('restaurant_images', $rest->image);
// $isFavourite = CustomerFavouriteRestaurant::where('principal_xid', $customerIamId)
// ->where('restaurant_xid', $rest->id)
// ->exists();
// $rest->is_favourite = $isFavourite;
// $redeem = RedeemRestaurant::where('iam_principal_xid', $customerIamId)
// ->where('manage_restaurants_xid', $rest->id)
// ->where('is_redeem', "1")
// ->first();
// $restTime = RestaurantTimeInterval::where('manage_restaurants_xid', $rest->id)->first();
// $restTimeHours = $restTime ? $restTime->time_hours : 0;
// // Initialize Guzzle HTTP client
// $client = new Client();
// $googlePlaceApiKey = config('constants.googlePlaces.api_key');
// // Cache key for operating hours
// $cacheKey = 'restaurant_hours_' . $rest->name;
// $cacheKeyIsRestaurantOpen = 'is_restaurant_open_now_' . $rest->name;
// if (Cache::has($cacheKey)) {
// $rest->operating_hours = Cache::get($cacheKey);
// $rest->is_restaurant_open_now_as_per_google = Cache::get($cacheKeyIsRestaurantOpen);
// } else {
// // Prepare the first request to get the place_id
// $placeResponse = $client->get('https://maps.googleapis.com/maps/api/place/findplacefromtext/json', [
// 'query' => [
// 'fields' => 'place_id',
// 'input' => $rest->name . ' ' . $rest->address,
// 'inputtype' => 'textquery',
// 'key' => $googlePlaceApiKey
// ]
// ]);
// $placeData = json_decode($placeResponse->getBody(), true);
// if (isset($placeData['candidates'][0]['place_id'])) {
// $placeId = $placeData['candidates'][0]['place_id'];
// // Prepare the second request to get the operating hours
// $detailResponse = $client->get('https://maps.googleapis.com/maps/api/place/details/json', [
// 'query' => [
// 'fields' => 'opening_hours',
// 'place_id' => $placeId,
// 'key' => $googlePlaceApiKey
// ]
// ]);
// $detailData = json_decode($detailResponse->getBody(), true);
// if (isset($detailData['result']['opening_hours']['weekday_text'])) {
// $hours = $detailData['result']['opening_hours']['weekday_text'];
// $isOpenNow = $detailData['result']['opening_hours']['open_now'];
// Cache::put($cacheKey, $hours, now()->addHours(2));
// Cache::put($cacheKeyIsRestaurantOpen, $isOpenNow, now()->addHours(2));
// $rest->operating_hours = $hours;
// $rest->is_restaurant_open_now_as_per_google = $isOpenNow;
// } else {
// $rest->operating_hours = "N/A";
// $rest->is_restaurant_open_now_as_per_google = false;
// }
// } else {
// $rest->operating_hours = "N/A";
// $rest->is_restaurant_open_now_as_per_google = false;
// }
// }
// if ($redeem) {
// $rest->is_Redeemed = true;
// $rest->redeem_date = \Carbon\Carbon::parse($redeem->redeem_date)->addHours(intval($restTimeHours))->toDateTimeString();
// } else {
// $rest->is_Redeemed = false;
// $rest->redeem_date = null;
// }
// // Calculate next redemption time
// $lastRedeem = RedeemRestaurant::where('iam_principal_xid', $customerIamId)
// ->where('manage_restaurants_xid', $rest->id)
// ->where('is_redeem', 1)
// ->orderBy('redeem_date', 'desc')
// ->first();
// $stateTime = TimeInterval::select('time_hours')->where('manage_state_xid', $rest->state_xid)->first();
// $stateTimeHours = $stateTime ? $stateTime->time_hours : 0;
// $currentTime = Carbon::now();
// $nextRedeemTime = "Now";
// if ($lastRedeem) {
// $lastRedeemTime = Carbon::parse($lastRedeem->redeem_date);
// $restAllowedRedeemTime = $lastRedeemTime->copy()->addHours(intval($restTimeHours));
// $stateAllowedRedeemTime = $lastRedeemTime->copy()->addHours(intval($stateTimeHours));
// if ($currentTime < $restAllowedRedeemTime) {
// $nextRedeemTime = $restAllowedRedeemTime->toDateTimeString();
// } else if ($currentTime < $stateAllowedRedeemTime) {
// $nextRedeemTime = $stateAllowedRedeemTime->toDateTimeString();
// }
// }
// // Include logic for preventing redemption in the same state
// if ($nextRedeemTime === "Now") {
// $lastStateRedeem = RedeemRestaurant::where('iam_principal_xid', $customerIamId)
// ->where('state_xid', $rest->state_xid)
// ->where('is_redeem', 1)
// ->orderBy('redeem_date', 'desc')
// ->first();
// if ($lastStateRedeem) {
// $lastStateRedeemTime = Carbon::parse($lastStateRedeem->redeem_date);
// $stateAllowedRedeemTime = $lastStateRedeemTime->copy()->addHours(intval($stateTimeHours));
// if ($currentTime < $stateAllowedRedeemTime) {
// $nextRedeemTime = $stateAllowedRedeemTime->toDateTimeString();
// }
// }
// }
// $rest->next_redeem_time = $nextRedeemTime;
// }
// if (!$rest) {
// return jsonResponseWithErrorMessage(__('auth.restaurant_data_not_found'), 404);
// }
// return jsonResponseWithSuccessMessage(__('auth.data_fetched_successfully'), $rest, 200);
// } catch (Exception $e) {
// Log::error("Error fetching restaurant data: " . $e->getMessage());
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// }
// }
public function DetailRestaurant($customerIamId, $id)
{
try {
$rest = ManageRestaurant::with('operatingHours')->select('id', 'short_id', 'name', 'description', 'restaurant_id', 'address', 'image', 'bio', 'try_on_1', 'try_on_2', 'try_on_3', 'try_on_4', 'exclusion', 'latitude', 'longtitude')->where('short_id', $id)->where('is_active', '1')->first();
$rest = ManageRestaurant::with('closedRestaurant')
->select('id', 'short_id', 'name', 'description', 'restaurant_id', 'address', 'image', 'bio', 'try_on_1', 'try_on_2', 'try_on_3', 'try_on_4', 'exclusion', 'latitude', 'longtitude', 'state_xid')
->where('short_id', $id)
->where('is_active', '1')
->first();
if ($rest) {
$rest->image = ListingImageUrl('restaurant_images', $rest->image);
@@ -124,15 +343,70 @@ class RestaurantApiServices
->where('is_redeem', "1")
->first();
$hoursData = getOperatingHours($rest->name, $rest->address);
$rest->operating_hours = $hoursData['operating_hours'];
$rest->is_restaurant_open_now_as_per_google = $hoursData['is_open_now'];
$restTime = RestaurantTimeInterval::where('manage_restaurants_xid', $rest->id)->first();
$restTimeHours = $restTime ? $restTime->time_hours : 0;
if ($redeem) {
$rest->is_Redeemed = true;
$rest->redeem_date = \Carbon\Carbon::parse($redeem->redeem_date)->addHours(4)->toDateTimeString();
$rest->redeem_date = \Carbon\Carbon::parse($redeem->redeem_date)->addHours(intval($restTimeHours))->toDateTimeString();
} else {
$rest->is_Redeemed = false;
$rest->redeem_date = null;
}
$lastRedeem = RedeemRestaurant::where('iam_principal_xid', $customerIamId)
->where('manage_restaurants_xid', $rest->id)
->where('is_redeem', 1)
->orderBy('redeem_date', 'desc')
->first();
$stateTime = TimeInterval::select('time_hours')->where('manage_state_xid', $rest->state_xid)->first();
$stateTimeHours = $stateTime ? $stateTime->time_hours : 0;
$currentTime = Carbon::now();
$nextRedeemTime = "Now";
if ($lastRedeem) {
$lastRedeemTime = Carbon::parse($lastRedeem->redeem_date);
$restAllowedRedeemTime = $lastRedeemTime->copy()->addHours(intval($restTimeHours));
$stateAllowedRedeemTime = $lastRedeemTime->copy()->addHours(intval($stateTimeHours));
if ($currentTime < $restAllowedRedeemTime) {
$nextRedeemTime = $restAllowedRedeemTime->toDateTimeString();
} else if ($currentTime < $stateAllowedRedeemTime) {
$nextRedeemTime = $stateAllowedRedeemTime->toDateTimeString();
}
}
// Include logic for preventing redemption in the same state
if ($nextRedeemTime === "Now") {
$lastStateRedeem = RedeemRestaurant::where('iam_principal_xid', $customerIamId)
->where('state_xid', $rest->state_xid)
->where('is_redeem', 1)
->orderBy('redeem_date', 'desc')
->first();
if ($lastStateRedeem) {
$lastStateRedeemTime = Carbon::parse($lastStateRedeem->redeem_date);
$stateAllowedRedeemTime = $lastStateRedeemTime->copy()->addHours(intval($stateTimeHours));
if ($currentTime < $stateAllowedRedeemTime) {
$nextRedeemTime = $stateAllowedRedeemTime->toDateTimeString();
}
}
}
$rest->next_redeem_time = $nextRedeemTime;
}
if (!$rest) {
return jsonResponseWithErrorMessage(__('auth.restaurant_data_not_found'), 404);
}
@@ -144,6 +418,7 @@ class RestaurantApiServices
}
}
public function removeFromFavourite($customerIamId, $request)
{
try {
@@ -177,12 +452,13 @@ class RestaurantApiServices
public function searchFromFavourite($customerIamId, $request)
{
try {
// Get list of favorite restaurant IDs
$customerFavouriteRestaurants = CustomerFavouriteRestaurant::where('principal_xid', $customerIamId)
->pluck('restaurant_xid')
->toArray();
$restaurantsQuery = ManageRestaurant::with('operatingHours')
->where('is_active', '1')
// Fetch the restaurant details
$restaurantsQuery = ManageRestaurant::with('closedRestaurant')->where('is_active', '1')
->whereIn('id', $customerFavouriteRestaurants);
$searchData = $request->input('search_data');
@@ -191,15 +467,23 @@ class RestaurantApiServices
$restaurantsQuery->where(function ($query) use ($searchData) {
$query->where('name', 'like', "%$searchData%")
->orWhere('description', 'like', "%$searchData%")
->orWhere('address', 'like', "%$searchData%");
->orWhere('address', 'like', "%$searchData%")
->orWhereHas('state', function ($stateQuery) use ($searchData) {
$stateQuery->where('name', 'like', "%$searchData%");
});
});
}
$restaurants = $restaurantsQuery->get();
foreach ($restaurants as &$res) {
$res['image'] = ListingImageUrl('restaurant_images', $res['image']);
}
$data = getOperatingHours($res->name, $res->address);
$res['operating_hours'] = $data['operating_hours'];
$res['is_restaurant_open_now_as_per_google'] = $data['is_open_now'];
}
return jsonResponseWithSuccessMessageApi(__('auth.restaurant_search'), $restaurants, 200);
} catch (Exception $ex) {
@@ -211,100 +495,232 @@ class RestaurantApiServices
}
public function redeemRestaurant($customerIamId, $request)
{
try {
$restaurantId = $request->id;
{
try {
$restaurantId = $request->id;
$restaurant = ManageRestaurant::with('operatingHours')->where('short_id', $restaurantId)->first();
$restaurant = ManageRestaurant::with('operatingHours')->where('short_id', $restaurantId)->first();
if (!$restaurant) {
return jsonResponseWithErrorMessageApi(__('auth.restaurant_not_found'), 404);
}
if (!$restaurant) {
return jsonResponseWithErrorMessageApi(__('auth.restaurant_not_found'), 404);
}
// Check if the restaurant has already been redeemed
$restaurantExist = RedeemRestaurant::where('manage_restaurants_xid', $restaurant->id)
->where('iam_principal_xid', $customerIamId)
->where('is_redeem', 1)
->first();
// Check if the restaurant has already been redeemed
$restaurantExist = RedeemRestaurant::where('manage_restaurants_xid', $restaurant->id)->where('iam_principal_xid', $customerIamId)
->where('is_redeem', 1)
->first();
if ($restaurantExist) {
return jsonResponseWithErrorMessageApi(__('auth.restaurant_already_redeemed'), 400);
}
if ($restaurantExist) {
return jsonResponseWithErrorMessageApi(__('auth.restaurant_already_redeemed'), 403);
}
// Check if there's an existing entry for the restaurant and update it
$restexist = RedeemRestaurant::where('manage_restaurants_xid', $restaurant->id)->where('iam_principal_xid', $customerIamId)->first();
if ($restexist) {
$restexist->is_redeem = 1;
$restexist->redeem_date = now();
$restexist->is_redeemption_undone = 0;
$restexist->redeemption_undone_date = null;
$restexist->save();
return jsonResponseWithSuccessMessageApi(__('success.restaurant_redeem'), $restexist, 200);
}
$stateLimitation = TimeInterval::where('manage_state_xid', $restaurant->state_xid)->first();
$stateMaxLimitation = $stateLimitation ? $stateLimitation->quantity : 0;
$stateMaxIntervalLimitation = $stateLimitation ? $stateLimitation->time_interval : "month";
// Create a new redeem entry if it doesn't exist
$redeemRestaurant = new RedeemRestaurant();
$redeemRestaurant->iam_principal_xid = $customerIamId;
$redeemRestaurant->manage_restaurants_xid = $restaurant->id;
$redeemRestaurant->is_redeem = 1; // Redeem restaurant
$redeemRestaurant->redeem_date = now();
$redeemRestaurant->is_redeemption_undone = 0;
$redeemRestaurant->redeemption_undone_date = null;
$redeemRestaurant->save();
$restaurantLimitation = RestaurantTimeInterval::where('manage_restaurants_xid', $restaurant->id)->first();
$restaurantMaxLimitation = $restaurantLimitation ? $restaurantLimitation->quantity : 0;
$restaurantMaxIntervalLimitation = $restaurantLimitation ? $restaurantLimitation->time_interval : "month";
// Calculate the state interval start date
$stateIntervalStartDate = $this->calculateIntervalStartDate($stateMaxIntervalLimitation);
// Count the redeems within the state interval
$redeemCountState = RedeemRestaurant::where('state_xid', $restaurant->state_xid)
->where('iam_principal_xid', $customerIamId)
->count();
if ($redeemCountState >= $stateMaxLimitation) {
return jsonResponseWithDataErrorMessageApi(__('limitexceed'), ('You have reached the maximum limit for redeeming vouchers.'));
}
// Calculate the restaurant interval start date
$restaurantIntervalStartDate = $this->calculateIntervalStartDate($restaurantMaxIntervalLimitation);
// Count the redeems within the restaurant interval
$redeemCountRestaurant = RedeemRestaurant::where('manage_restaurants_xid', $restaurant->id)
->where('is_redeem', 1)
->where('iam_principal_xid', $customerIamId)
->count();
if ($redeemCountRestaurant >= $restaurantMaxLimitation) {
return jsonResponseWithDataErrorMessageApi(__('limitexceed'), ('You have reached the maximum limit for redeeming vouchers.'));
}
// Get the last redeem time
$lastRedeem = RedeemRestaurant::where('iam_principal_xid', $customerIamId)
->where('state_xid', $restaurant->state_xid)
->where('is_redeem', 1)
->orderBy('redeem_date', 'desc')
->first();
$restTime = RestaurantTimeInterval::select('time_hours')->where('manage_restaurants_xid', $restaurant->id)->first();
$stateTime = TimeInterval::select('time_hours')->where('manage_state_xid', $restaurant->state_xid)->first();
$restTimeHours = $restTime ? $restTime->time_hours : 0;
$stateTimeHours = $stateTime ? $stateTime->time_hours : 0;
$imagePath = ListingImageUrl('restaurant_images', $restaurant->image);
if ($lastRedeem) {
$lastRedeemTime = Carbon::parse($lastRedeem->redeem_date);
$currentTime = Carbon::now();
$customerTitle = "Your Redemption was successful for " . $restaurant->name;
$customerMessage = $restaurant->name . " Voucher Redeemed Successfully";
$customerContentType = 'Voucher_Redemption';
$customerImageUrl = $imagePath;
$stateAllowedRedeemTime = $lastRedeemTime->copy()->addHours(intval($stateTimeHours));
$restAllowedRedeemTime = $lastRedeemTime->copy()->addHours(intval($restTimeHours));
$customerData = IamPrincipal::where('id', $customerIamId)->where('notification_status', 1)->where('principal_type_xid', 3)->first();
$restaurants = IamPrincipalRestaurantRole::select('id', 'principal_xid')->where('restaurant_xid', $restaurant->id)->get();
if ($currentTime < $stateAllowedRedeemTime) {
$remainingTime = $currentTime->diff($stateAllowedRedeemTime);
$hours = $remainingTime->h;
$minutes = $remainingTime->i;
return jsonResponseWithDataErrorMessageApi(__('limitexceed'), ('Please wait before redeeming the next voucher.' . " {$hours} hours and {$minutes} minutes remaining."));
}
foreach ($restaurants as $restaurant) {
$restUser = IamPrincipal::where('id', $restaurant->principal_xid)->where('notification_status', 1)->where('principal_type_xid', 4)->first();
if ($currentTime < $restAllowedRedeemTime) {
$remainingTime = $currentTime->diff($restAllowedRedeemTime);
$hours = $remainingTime->h;
$minutes = $remainingTime->i;
return jsonResponseWithDataErrorMessageApi(__('limitexceed'), ('Please wait before redeeming the next voucher.' . " {$hours} hours and {$minutes} minutes remaining."));
}
}
if ($restUser) {
$restImagePath = ListingImageUrl('restaurant_images', $restaurant->image);
$restTitle = "New redemption for " . $restaurant->name;
$restMessage = $restaurant->name . " new voucher Redeemed Successfully";
$restContent_type = 'Voucher_Redemption';
$restImageUrl = $restImagePath;
// Sending notification to restaurant
$pushNotificationToRestaurant = onesignalhelper::restSendNotificationApi(
$restUser->one_signal_player_id,
$restTitle,
$restMessage,
$restContent_type,
$restImageUrl,
// Create a new redeem entry if it doesn't exist
$redeemRestaurant = new RedeemRestaurant();
$redeemRestaurant->iam_principal_xid = $customerIamId;
$redeemRestaurant->manage_restaurants_xid = $restaurant->id;
$redeemRestaurant->state_xid = $restaurant->state_xid;
$redeemRestaurant->is_redeem = 1; // Redeem restaurant
$redeemRestaurant->redeem_date = now();
$redeemRestaurant->is_redeemption_undone = 0;
$redeemRestaurant->redeemption_undone_date = null;
$redeemRestaurant->save();
$imagePath = ListingImageUrl('restaurant_images', $restaurant->image);
$customerTitle = "Your Redemption was successful for " . $restaurant->name;
$customerMessage = $restaurant->name . " Voucher Redeemed Successfully";
$customerContentType = 'Voucher_Redemption';
$customerImageUrl = $imagePath;
$customerData = IamPrincipal::where('id', $customerIamId)
->where('notification_status', 1)
->where('principal_type_xid', 3)
->first();
$restaurants = IamPrincipalRestaurantRole::select('id', 'principal_xid')
->where('restaurant_xid', $restaurant->id)
->get();
foreach ($restaurants as $restaurantRole) {
$restUser = IamPrincipal::where('id', $restaurantRole->principal_xid)
->where('notification_status', 1)
->where('principal_type_xid', 4)
->first();
if ($restUser) {
$restImagePath = ListingImageUrl('restaurant_images', $restaurant->image);
$restTitle = "New redemption for " . $restaurant->name;
$restMessage = $restaurant->name . " new voucher Redeemed Successfully";
$restContent_type = 'Voucher_Redemption';
$restImageUrl = $restImagePath;
// Sending notification to restaurant
onesignalhelper::restSendNotificationApi(
$restUser->one_signal_player_id,
$restTitle,
$restMessage,
$restContent_type,
$restImageUrl,
$id = null
);
onesignalhelper::StoreNotificationDetails($restUser->id, $restContent_type, $restTitle, $restImageUrl);
}
}
if ($customerData) {
// Sending notification to customer
onesignalhelper::sendNotificationApi(
$customerData->one_signal_player_id,
$customerTitle,
$customerMessage,
$customerContentType,
$customerImageUrl,
$id = null
);
onesignalhelper::StoreNotificationDetails($restUser->id, $restContent_type, $restTitle, $restImageUrl);
onesignalhelper::StoreNotificationDetails($customerData->id, $customerContentType, $customerTitle, $customerImageUrl);
}
}
if ($customerData) {
// Sending notification to customer
$pushNotificationToCustomer = onesignalhelper::sendNotificationApi(
$customerData->one_signal_player_id,
$customerTitle,
$customerMessage,
$customerContentType,
$customerImageUrl,
$id = null
);
onesignalhelper::StoreNotificationDetails($customerData->id, $customerContentType, $customerTitle, $customerImageUrl);
return jsonResponseWithSuccessMessageApi(__('success.restaurant_redeem'), $redeemRestaurant, 200);
} catch (Exception $ex) {
Log::error('Restaurant Redeem service failed: ' . $ex->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
private function calculateIntervalStartDate($interval)
{
$now = Carbon::now();
switch ($interval) {
case 'day':
return $now->copy()->subDay();
case 'week':
return $now->copy()->subWeek();
case 'month':
default:
return $now->copy()->subMonth();
}
}
public function searchRestaurant($customerIamId, $request)
{
try {
$restaurantsQuery = ManageRestaurant::with('state', 'closedRestaurant')
->where('is_active', '1');
$searchData = $request->input('search_data');
if (!empty($searchData)) {
$restaurantsQuery->where(function ($query) use ($searchData) {
$query->where('name', 'like', "%$searchData%")
->orWhere('description', 'like', "%$searchData%")
->orWhere('address', 'like', "%$searchData%")
->orWhereHas('state', function ($stateQuery) use ($searchData) {
$stateQuery->where('name', 'like', "%$searchData%");
});
});
}
$restaurants = $restaurantsQuery->get();
foreach ($restaurants as &$restaurant) {
$restaurant['image'] = ListingImageUrl('restaurant_images', $restaurant['image']);
$isFavourite = CustomerFavouriteRestaurant::where('principal_xid', $customerIamId)
->where('restaurant_xid', $restaurant['id'])
->exists();
$restaurant['is_favourite'] = $isFavourite;
$data = getOperatingHours($restaurant->name, $restaurant->address);
$restaurant['operating_hours'] = $data['operating_hours'];
$restaurant['is_restaurant_open_now_as_per_google'] = $data['is_open_now'];
}
return jsonResponseWithSuccessMessageApi(__('auth.restaurant_search'), $restaurants, 200);
} catch (Exception $ex) {
Log::error('Search restaurant service failed: ' . $ex->getMessage());
return response()->json([
'message' => __('auth.something_went_wrong')
], 500);
}
return jsonResponseWithSuccessMessageApi(__('success.restaurant_redeem'), $redeemRestaurant, 200);
} catch (Exception $ex) {
Log::error('Restaurant Redeem service failed: ' . $ex->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
}

View File

@@ -0,0 +1,41 @@
<?php
namespace App\Services\APIs\CustomerAPIs;
use App\Models\ManageReferralRule;
use App\Models\ManageRule;
use Illuminate\Support\Facades\Log;
use Exception;
class RulesApiServices
{
public function getVoucherRules()
{
try {
$data = ManageRule::select('id', 'whats_inside', 'rules')
->get()
->toArray();
return $data;
} catch (Exception $ex) {
Log::error('Voucher rules and regulation Get service failed : ' . $ex->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
public function getReferralRules()
{
try {
$data = ManageReferralRule::select('id', 'how_it_works', 'rules','what_is_referral')
->get()
->toArray();
return $data;
} catch (Exception $ex) {
Log::error('Voucher rules and regulation Get service failed : ' . $ex->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
}
}
}

View File

@@ -108,7 +108,7 @@ class RedeemApiService
public function undoRedemption($restIamId, $request)
{
try {
$voucherDetail = RedeemRestaurant::where('id', $request->voucher_id)->first();
$voucherDetail = RedeemRestaurant::where('id', $request->voucher_id)->where('is_redeem', 1)->first();
$rest = ManageRestaurant::where('id', $voucherDetail->manage_restaurants_xid)->first();
if ($voucherDetail) {
$voucherDetail->update([

View File

@@ -2,6 +2,7 @@
namespace App\Services\APIs\RestaurantService;
use App\Mail\AccountRegister;
use App\Models\ManageRestaurant;
use App\Models\ManageVoucherModel;
use Exception;
@@ -79,10 +80,11 @@ class RestAuthApiService
]);
DB::commit();
$adminEmail = config('constants.ADMIN_EMAIL');
// $token = auth()->login($restaurantuser);
Mail::to($adminEmail)->send(new \App\Mail\AccountRegister($restaurantuser, $selectedRestaurant->name));
// Return response with user details, access token, and status
// Prepare the response data
$response = [
'user' => $restaurantuser,
// 'restaurant_details' => $restaurantId,
@@ -94,12 +96,13 @@ class RestAuthApiService
} catch (QueryException $e) {
// Rollback transaction in case of an error
DB::rollBack();
Log::error('Restaurant Registration Failed ' . $e->getMessage());
Log::error('Restaurant Registration Failed: ' . $e->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.authentication_failed'), 403);
}
}
public function login($request)
{
try {

View File

@@ -104,8 +104,8 @@ class RestCMSService
public function RestNewsArticles()
{
try {
$data['customer'] = NewsArticle::select('id', 'news_articles_category_xid','name', 'description', 'thumbnail_image', 'image',)
->where([['is_active', '0'], ['news_articles_category_xid', '1']])
$data['customer'] = NewsArticle::select('id', 'name', 'description', 'thumbnail_image', 'image')
->where([['is_active', '1'], ['news_articles_category_xid', '1']])
->get()
->map(function ($item) {
$item['description'] = strip_tags($item['description']);
@@ -114,7 +114,7 @@ class RestCMSService
->toArray();
$data['restaurant'] = NewsArticle::select('id', 'news_articles_category_xid','name', 'description', 'thumbnail_image', 'image')
->where([['is_active', '0'], ['news_articles_category_xid', '2']])
->where([['is_active', '1'], ['news_articles_category_xid', '2']])
->get()
->map(function ($item) {
$item['description'] = strip_tags($item['description']);
@@ -162,7 +162,7 @@ class RestCMSService
//response data
Log::info('Contact form data Created successfully');
return jsonResponseWithSuccessMessageApi(__('success.save_data'), [], 201);
return jsonResponseWithSuccessMessageApi(__('success.message_sent'), [], 201);
} else {
Log::error('Contact not found in addVendorContactForm.');
return jsonResponseWithErrorMessageApi(__('auth.validation_failed'), 403);

View File

@@ -41,27 +41,41 @@ class RestaurantApi_Service
->get();
// $restaurantDetails = [];
$isActive = true;
$inactiveMessage = "";
foreach ($restaurantRoles as $restaurantRole) {
$restaurant = ManageRestaurant::select('id', 'name', 'description', 'restaurant_id', 'address', 'image', 'bio', 'try_on_1', 'phone_number', 'try_on_2', 'try_on_3', 'try_on_4', 'exclusion', 'latitude', 'longtitude', 'is_active', 'created_by', 'modified_by', 'deleted_at', 'created_at', 'updated_at')
->where('id', $restaurantRole->restaurant_xid)
->where('is_active', 1)
->first();
if ($restaurant) {
$restaurant->image = ListingImageUrl('restaurant_images', $restaurant->image);
$restaurant->description = strip_tags($restaurant->description);
// $restaurantDetails[] = $restaurant;
if ($restaurant->is_active == 0) {
$isActive = false;
$inactiveMessage = "Your restaurant is currently not participating in Cheers to the Season. Please reach out to contact@cheerstotheseason.com to re-enroll.";
}
// Add restaurant details to the array
$restaurantDetails = $restaurant;
}
}
// Construct response
$response = [
'user_detail' => $userDetail,
'restaurant_details' => $restaurant,
'restaurant_details' => $restaurantDetails,
'is_active' => $isActive,
'message' => "",
];
if (!$isActive) {
$response['message'] = $inactiveMessage;
}
// Return JSON response with success message
return jsonResponseWithSuccessMessageApi(__('auth.User_details_fetch'), $response, 200);
} catch (Exception $ex) {
@@ -74,6 +88,7 @@ class RestaurantApi_Service
public function updateRestaurantDetail($restIamId, $request)
{
try {
@@ -94,6 +109,11 @@ class RestaurantApi_Service
DB::rollBack();
return jsonResponseWithErrorMessageApi(__('error_message.restaurant_data_not_found'), 404);
}
if ($request->has('image')) {
$image = $request->image;
$tnormalImage = saveSingleImageWithoutCrop($image, 'restaurant_images', null);
$restaurant->update(['image' => $tnormalImage]);
}
$restaurant->update([
'name' => $request['name'],
@@ -105,6 +125,7 @@ class RestaurantApi_Service
'try_on_3' => $request['try_on_3'],
'try_on_4' => $request['try_on_4'],
]);
$restaurant->description = strip_tags($restaurant->description);

View File

@@ -37,6 +37,7 @@ return Application::configure(basePath: dirname(__DIR__))
})
->withSchedule(function (Schedule $schedule) {
$schedule->command('app:reinstate-restaurant')->everyMinute();
$schedule->command('app:sent-schedule-notification')->everyMinute();
})
->withExceptions(function (Exceptions $exceptions) {
//

View File

@@ -16,7 +16,9 @@
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
"livewire/livewire": "^3.0",
"maatwebsite/excel": "^3.1",
"maatwebsite/excel": "3.1.55",
"phpoffice/phpspreadsheet": "1.29.0",
"stripe/stripe-php": "^15.0",
"tymon/jwt-auth": "^2.1"
},
"require-dev": {

1108
composer.lock generated

File diff suppressed because it is too large Load Diff

33
config/constants.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
/*
* created by : Chandan Yadav
* Created On : 03-November-2023
* Uses : To display message on admin panel
*/
return [
'UTF8_ENABLED' => TRUE,
'DIMENTIONS' => [
"THUMBNAIL" => "300*160 pixels (3:2), Max Size 2MB and .jpg format image",
],
'SIZE' => [
"THUMBNAIL" => "7168"
],
'PLATFORM' => ['ios', 'android', 'web'],
'subscription' => [
'stripe_private_key' => env('STRIPE_KEY'),
'stripe_secret_key' => env('STRIPE_SECRET'),
'webhook_secret' => env('STRIPE_WEBHOOK_SECRET'),
],
'googlePlaces'=>[
'api_key'=>env('GOOGLE_PLACE_API_KEY')
],
// 'ADMIN_EMAIL' => env('ADMIN_EMAIL', 'sayliraut@yopmail.com'),
'ADMIN_EMAIL' => env('ADMIN_EMAIL', 'contact@cheerstotheseason.com'),
];

View File

@@ -15,18 +15,19 @@ return new class extends Migration
Schema::create('manage_restaurants', function (Blueprint $table) {
$table->id();
$table->string('short_id')->unique();
$table->string('name',255)->nullable();
$table->string('name', 255)->nullable();
$table->longText('description')->nullable();
$table->string('phone_number', 15)->nullable();
$table->bigInteger('state_xid')->nullable();
$table->string('restaurant_id')->nullable();
$table->string('address',255)->nullable();
$table->string('address', 255)->nullable();
$table->string('image')->nullable();
$table->string('bio')->nullable();
$table->text('try_on_1')->nullable();
$table->text('try_on_2')->nullable();
$table->text('try_on_3')->nullable();
$table->text('try_on_4')->nullable();
$table->string('exclusion',255)->nullable();
$table->string('exclusion', 255)->nullable();
$table->string('latitude');
$table->string('longtitude');
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');

View File

@@ -13,11 +13,15 @@ return new class extends Migration
{
Schema::create('notification_details', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('principal_xid');
$table->unsignedBigInteger('principal_xid')->nullable();
$table->foreign('principal_xid')->references('id')->on('iam_principal')->onDelete('cascade');
$table->string('type');
$table->longText('description');
$table->string('image')->nullable();
$table->string('user_type')->nullable();
$table->boolean('is_schedule')->default(0)->comment('1=specific time, 0=immediate');
$table->dateTime('delivery_schedule')->nullable();
$table->json('state_ids')->nullable();
$table->timestamp('date_added')->useCurrent();
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');
$table->integer('created_by')->nullable();

View File

@@ -17,6 +17,7 @@ return new class extends Migration
$table->foreign('iam_principal_xid')->references('id')->on('iam_principal')->onDelete('cascade');
$table->unsignedBigInteger('manage_restaurants_xid');
$table->foreign('manage_restaurants_xid')->references('id')->on('manage_restaurants')->onDelete('cascade');
$table->bigInteger('state_xid');
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');
$table->boolean('is_redeem')->default(0)->comment('1=Redeem, 0=Not Redeem');
$table->integer('count')->default(0);

View File

@@ -16,7 +16,7 @@ return new class extends Migration
foreach ($users as $user) {
do {
$referral_code = \Str::random(10);
$referral_code = strtoupper($this->generateRandomString(10));
} while (DB::table('iam_principal')->where('referral_code', $referral_code)->exists());
DB::table('iam_principal')
@@ -25,6 +25,17 @@ return new class extends Migration
}
}
function generateRandomString($length = 10)
{
$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
/**
* Reverse the migrations.
*/

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('manage_rules', function (Blueprint $table) {
$table->id();
$table->longtext('whats_inside')->nullable();
$table->longtext('rules')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('manage_rules');
}
};

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('time_intervals', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('manage_state_xid');
$table->foreign('manage_state_xid')->references('id')->on('manage_states')->onDelete('cascade');
$table->integer('time_hours');
$table->integer('quantity');
$table->enum('time_interval', ['day', 'week', 'month'])->default('day');
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');
$table->softDeletes();
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('time_intervals');
}
};

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('resaurant_time_intervals', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('manage_restaurants_xid');
$table->foreign('manage_restaurants_xid')->references('id')->on('manage_restaurants')->onDelete('cascade');
$table->integer('time_hours');
$table->integer('quantity');
$table->enum('time_interval', ['day', 'week', 'month'])->default('day');
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');
$table->softDeletes();
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('resaurant_time_intervals');
}
};

View File

@@ -0,0 +1,42 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
//
Schema::create('subscription_products', function (Blueprint $table) {
$table->id();
$table->string('product_name')->nullable();
$table->string('product_value')->nullable();
$table->longText('product_details')->nullable();
$table->string('stripe_product_id')->nullable();
$table->string('stripe_price_id')->nullable();
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');
$table->softDeletes();
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::dropIfExists('subscription_products');
}
};

View File

@@ -0,0 +1,51 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('subscriptions', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('subscription_product_xid');
$table->unsignedBigInteger('iam_principal_xid');
$table->foreign('subscription_product_xid')->references('id')->on('subscription_products')->onDelete('cascade');
$table->foreign('iam_principal_xid')->references('id')->on('iam_principal')->onDelete('cascade');
$table->string('amount')->nullable();
$table->string('stripe_customer_id')->nullable();
$table->string('payment_intent_id')->nullable();
$table->string('payment_intent_client_secret')->nullable();
$table->string('subscription_id')->nullable();
$table->string('subscription_status')->nullable();
$table->dateTime('current_period_start')->nullable();
$table->dateTime('current_period_end')->nullable();
$table->string('status')->nullable();
$table->dateTime('next_payment_date')->nullable();
$table->boolean('is_cancelled_subscription')->default(0)->comment('1=Cancelled, 0=Not Cancelled');
$table->dateTime('cancelled_at')->nullable();
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');
$table->softDeletes();
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('subscriptions');
}
};

View File

@@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('referral_users', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('iam_principal_xid');
$table->unsignedBigInteger('referred_user_xid');
$table->foreign('iam_principal_xid')->references('id')->on('iam_principal')->onDelete('cascade');
$table->foreign('referred_user_xid')->references('id')->on('iam_principal')->onDelete('cascade');
$table->dateTime('referred_date_time')->nullable();
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');
$table->softDeletes();
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('referral_users');
}
};

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('restaurant_closed_hours', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('restaurant_id');
$table->unsignedTinyInteger('day_of_week'); // 0 = Sunday, 1 = Monday
$table->time('start_time');
$table->time('end_time');
$table->boolean('is_active')->default(1)->comment('1=Active, 0=Expired');
$table->integer('created_by')->nullable();
$table->integer('modified_by')->nullable();
$table->softDeletes();
$table->timestamps();
$table->foreign('restaurant_id')->references('id')->on('manage_restaurants')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('restaurant_closed_hours');
}
};

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('manage_referral_rules', function (Blueprint $table) {
$table->id();
$table->longtext('how_it_works')->nullable();
$table->longtext('rules')->nullable();
$table->longtext('what_is_referral')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('manage_referral_rules');
}
};

1
error_log Normal file
View File

@@ -0,0 +1 @@
[16-Jul-2024 11:48:12 UTC] PHP Deprecated: Optional parameter $message declared before required parameter $appId is implicitly treated as a required parameter in /home/cheers/public_html/vendor/ladumor/one-signal/src/OneSignalManager.php on line 44

View File

@@ -1,5 +1,9 @@
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlcyI6WyJjdXN0b20uc2NzcyJdLCJzb3VyY2VzQ29udGVudCI6WyIiXSwiZmlsZSI6ImN1c3RvbS5jc3MifQ== */
.arrow-icon-spacing {
margin-left: 10px;
}
.notification-scroll h2 {
font-size: 20px;
font-weight: bold;
@@ -1177,6 +1181,23 @@ div#zero-config_filter {
font-weight: 700;
gap: 3px;
}
.download-btn-cancel {
cursor: pointer;
color: #000;
padding: 10px;
background: #fb2020;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
width: 50%;
font-size: 15px;
font-weight: 700;
gap: 3px;
}
.download-btn-cancel:hover {
color: #fff;
}
.download-btn-custom img {
width: 17px;
@@ -1373,7 +1394,7 @@ label {
/* to change error class color */
label#email-error ,label#password-error {
color: red;
}
font-weight: 600;}
.error-message {
@@ -1560,3 +1581,48 @@ a.download-btn.reply-button:hover {
width: fit-content !important;
padding: 10px 20px;
}
/*
.random_cl li {
list-style: circle !important;
} */
.random_cl li a {
position: relative;
display: flex;
justify-content: space-between;
padding: 10.2px 16px 10.2px 24px;
margin-left: 34px;
font-size: 15px;
color: #000;
}
.random_cl li a:before {
content: "";
background-color: #000;
position: absolute;
height: 7px;
width: 7px;
top: 15px;
left: 5px;
border-radius: 50%;
}
.random_cl li a:hover {
color: #fff;
background: #05244d;
}
.sidebar-links {
overflow-x: hidden !important;
}
.radio-btn input {
width: fit-content;
margin-right: 6px;
}
.radio-btn {
display: flex;
align-items: baseline;
}
.radio-btn label.label {
margin: 0;
}

Some files were not shown because too many files have changed in this diff Show More