158
.env
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
APP_NAME="La Pieza.DO"
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=base64:doBaoFE9npLSpSKbSJYDxRi9GTgV6eZyCX5eoop+hXI=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://localhost
|
||||||
|
APP_TIMEZONE="America/Halifax"
|
||||||
|
|
||||||
|
DEMO_MODE="Off"
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=lapiezado_lapiezado
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=log
|
||||||
|
CACHE_DRIVER="file"
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER="file"
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
|
||||||
|
REDIS_HOST="127.0.0.1"
|
||||||
|
REDIS_PASSWORD="null"
|
||||||
|
REDIS_PORT="6379"
|
||||||
|
|
||||||
|
MAIL_DRIVER="smtp"
|
||||||
|
MAIL_HOST="mail.supremecluster.com"
|
||||||
|
MAIL_PORT="465"
|
||||||
|
MAIL_USERNAME="verificacion@lapieza.do"
|
||||||
|
MAIL_PASSWORD="@LaPieza2023-24!#"
|
||||||
|
MAIL_ENCRYPTION="ssl"
|
||||||
|
MAIL_FROM_ADDRESS="verificacion@lapieza.do"
|
||||||
|
MAIL_FROM_NAME="no-reply.lapieza.do"
|
||||||
|
|
||||||
|
PUSHER_APP_ID=
|
||||||
|
PUSHER_APP_KEY=
|
||||||
|
PUSHER_APP_SECRET=
|
||||||
|
PUSHER_APP_CLUSTER=mt1
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
||||||
|
PAYPAL_CLIENT_ID=""
|
||||||
|
PAYPAL_CLIENT_SECRET=""
|
||||||
|
|
||||||
|
STRIPE_KEY=""
|
||||||
|
STRIPE_SECRET=""
|
||||||
|
|
||||||
|
SSLCZ_STORE_ID=""
|
||||||
|
SSLCZ_STORE_PASSWD=""
|
||||||
|
|
||||||
|
IM_API_KEY=""
|
||||||
|
IM_AUTH_TOKEN=""
|
||||||
|
|
||||||
|
RAZOR_KEY=""
|
||||||
|
RAZOR_SECRET=""
|
||||||
|
|
||||||
|
PAYSTACK_PUBLIC_KEY=""
|
||||||
|
PAYSTACK_SECRET_KEY=""
|
||||||
|
|
||||||
|
VOGUE_MERCHANT_ID="DEMO"
|
||||||
|
|
||||||
|
GOOGLE_CLIENT_ID=""
|
||||||
|
GOOGLE_CLIENT_SECRET=""
|
||||||
|
|
||||||
|
FACEBOOK_CLIENT_ID=""
|
||||||
|
FACEBOOK_CLIENT_SECRET=""
|
||||||
|
|
||||||
|
TRACKING_ID=""
|
||||||
|
|
||||||
|
FACEBOOK_PAGE_ID=""
|
||||||
|
FACEBOOK_PIXEL_ID=""
|
||||||
|
|
||||||
|
DEFAULT_LANGUAGE="do"
|
||||||
|
|
||||||
|
TWILIO_SID=""
|
||||||
|
TWILIO_AUTH_TOKEN=""
|
||||||
|
TWILIO_VERIFY_SID=""
|
||||||
|
VALID_TWILLO_NUMBER=""
|
||||||
|
|
||||||
|
NEXMO_KEY=""
|
||||||
|
NEXMO_SECRET=""
|
||||||
|
|
||||||
|
SSL_SMS_USER="Adyan"
|
||||||
|
SSL_SMS_SID=""
|
||||||
|
SSL_SMS_PASSWORD=""
|
||||||
|
SSL_SMS_URL="http://sms.sslwireless.com/pushapi/dynamic/server.php"
|
||||||
|
|
||||||
|
PAYTM_ENVIRONMENT="production"
|
||||||
|
PAYTM_MERCHANT_ID=""
|
||||||
|
PAYTM_MERCHANT_KEY=""
|
||||||
|
PAYTM_MERCHANT_WEBSITE="DEFAULT"
|
||||||
|
PAYTM_CHANNEL="WEB"
|
||||||
|
PAYTM_INDUSTRY_TYPE="Retail"
|
||||||
|
|
||||||
|
SENDER_ID="FSTSMS"
|
||||||
|
LANGUAGE="english"
|
||||||
|
ROUTE="dlt_manual"
|
||||||
|
AUTH_KEY="1"
|
||||||
|
ENTITY_ID="123"
|
||||||
|
|
||||||
|
PAYHERE_MERCHANT_ID=""
|
||||||
|
PAYHERE_SECRET=""
|
||||||
|
PAYHERE_CURRENCY=""
|
||||||
|
|
||||||
|
PAYFAST_MERCHANT_ID=""
|
||||||
|
PAYFAST_MERCHANT_KEY=""
|
||||||
|
|
||||||
|
NGENIUS_OUTLET_ID=""
|
||||||
|
NGENIUS_API_KEY=""
|
||||||
|
NGENIUS_CURRENCY=""
|
||||||
|
|
||||||
|
CAPTCHA_KEY=""
|
||||||
|
FORCE_HTTPS="On"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=""
|
||||||
|
AWS_SECRET_ACCESS_KEY=""
|
||||||
|
AWS_DEFAULT_REGION=""
|
||||||
|
AWS_BUCKET=""
|
||||||
|
AWS_URL="https://bucket-name.s3.region.amazonaws.com"
|
||||||
|
|
||||||
|
FILESYSTEM_DRIVER="local"
|
||||||
|
|
||||||
|
|
||||||
|
IYZICO_API_KEY=""
|
||||||
|
IYZICO_SECRET_KEY=""
|
||||||
|
IYZICO_CURRENCY_CODE=""
|
||||||
|
|
||||||
|
PROXYPAY_TOKEN=""
|
||||||
|
PROXYPAY_ENTITY=""
|
||||||
|
PROXYPAY_END_TIME=""
|
||||||
|
|
||||||
|
AAMARPAY_STORE_ID=""
|
||||||
|
AAMARPAY_SIGNATURE_KEY=""
|
||||||
|
|
||||||
|
FCM_SERVER_KEY=""
|
||||||
|
MAP_API_KEY=""
|
||||||
|
|
||||||
|
SIGN_IN_WITH_APPLE_LOGIN=""
|
||||||
|
SIGN_IN_WITH_APPLE_REDIRECT=""
|
||||||
|
SIGN_IN_WITH_APPLE_CLIENT_ID=""
|
||||||
|
SIGN_IN_WITH_APPLE_CLIENT_SECRET=""
|
||||||
|
|
||||||
|
TWITTER_CLIENT_ID=""
|
||||||
|
TWITTER_CLIENT_SECRET=""
|
||||||
|
BKASH_CHECKOUT_APP_KEY=""
|
||||||
|
BKASH_CHECKOUT_APP_SECRET=""
|
||||||
|
BKASH_CHECKOUT_USER_NAME=""
|
||||||
|
BKASH_CHECKOUT_PASSWORD="@12345"
|
||||||
|
MAILGUN_DOMAIN=""
|
||||||
|
MAILGUN_SECRET=""
|
||||||
|
|
||||||
|
|
||||||
|
RECAPTCHA_SITE_KEY=6Le0OJsnAAAAALJsc4xJaNot1HfSmHpYgJYDzTYT
|
||||||
|
RECAPTCHA_SECRET_KEY=6Le0OJsnAAAAAIVMI3KwkxeLsrhI8GF7BjRX9S
|
||||||
33
.gitignore
vendored
@@ -1,34 +1 @@
|
|||||||
/bootstrap/compiled.php
|
|
||||||
.env.*.php
|
|
||||||
.env.php
|
|
||||||
/app/Exceptions
|
|
||||||
/node_modules
|
|
||||||
/public/hot
|
|
||||||
/public/storage
|
|
||||||
/public/uploads
|
|
||||||
/storage/*.key
|
|
||||||
/storage/debugbar
|
|
||||||
/vendor
|
|
||||||
/temp
|
|
||||||
/.idea
|
|
||||||
/.vscode
|
|
||||||
/.vagrant
|
|
||||||
Homestead.json
|
|
||||||
Homestead.yaml
|
|
||||||
npm-debug.log
|
|
||||||
yarn-error.log
|
|
||||||
.DS_Store
|
|
||||||
.idea/
|
|
||||||
|
|
||||||
updates/
|
|
||||||
composer.lock
|
|
||||||
*.lock
|
|
||||||
resources/lang/en.json
|
|
||||||
.env
|
|
||||||
updates.zip
|
|
||||||
ecommerce.zip
|
|
||||||
install.zip
|
|
||||||
/nbproject/private/
|
|
||||||
/nbproject
|
|
||||||
/public/app-translations
|
|
||||||
public/uploads.zip
|
|
||||||
|
|||||||
58
app/Exceptions/Handler.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exceptions;
|
||||||
|
|
||||||
|
use App\Utility\NgeniusUtility;
|
||||||
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
|
class Handler extends ExceptionHandler
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A list of the exception types that are not reported.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $dontReport = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of the inputs that are never flashed for validation exceptions.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $dontFlash = [
|
||||||
|
'current_password',
|
||||||
|
'password',
|
||||||
|
'password_confirmation',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the exception handling callbacks for the application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
$this->reportable(function (Throwable $e) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render($request, Throwable $e)
|
||||||
|
{
|
||||||
|
if($this->isHttpException($e))
|
||||||
|
{
|
||||||
|
if ($request->is('customer-products/admin')) {
|
||||||
|
return NgeniusUtility::initPayment();
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::render($request, $e);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return parent::render($request, $e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12470
composer.lock
generated
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
BIN
public/app-translations/desktop.ini
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
BIN
public/uploads/all/1GLZpLboRsdHQaUv8zDsZLG5spIgniCyislPn1Mx.webp
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
public/uploads/all/2TW5K0sXtj8L8zRMGjAbhO3HsDAIuXXl3nrs5evt.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/uploads/all/7aCX4yrBvCWj69LxLcNGf8XU2Nxl6bRzdkNBVqdx.png
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
public/uploads/all/BroMzjImOl0xjGidiV8FeL2i5iWRBgFQLjlBZyie.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
public/uploads/all/CdXpCxffFH4THenbdkXksYUzmifMZELwWJVH2u7A.png
Normal file
|
After Width: | Height: | Size: 585 KiB |
BIN
public/uploads/all/FM7k5qe7hxStQVduPT6G3JhgWMIldJCeiL4f5bGa.zip
Normal file
BIN
public/uploads/all/GIukEj6a0RG6bzzeXUMJLXrjzjMDS3MyfCc8fXam.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
public/uploads/all/LDveUZC6hd2VZPvxdR8xj3M9vDY5tbNsfEmFE6tF.png
Normal file
|
After Width: | Height: | Size: 762 KiB |
BIN
public/uploads/all/LSmQMcscJ2hVdnsx4xMIUYVffeIOJ1LMzZolk96V.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/uploads/all/PgXE6sn7vLtbot7Gu5IpoelTtNcvzNRjE66V4FUx.png
Normal file
|
After Width: | Height: | Size: 214 KiB |
BIN
public/uploads/all/QQBf3P7sRyKl4MsBcdX6UWg9X0M0A5TG50MhN5yp.png
Normal file
|
After Width: | Height: | Size: 349 KiB |
BIN
public/uploads/all/SZxmeIDCv1AlGv2hpd0raKC9YRumdrkSSSkbcXDe.png
Normal file
|
After Width: | Height: | Size: 120 KiB |
BIN
public/uploads/all/VJDPNKmYsdfgbntGoOJKJQGjsURNTuztr8MaN1gw.png
Normal file
|
After Width: | Height: | Size: 328 KiB |
BIN
public/uploads/all/ZIyKunLoyyHQmnbrl6iLpcnzBvbxmtF5BfTEuPHw.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
public/uploads/all/aQmIeqHOdujdYPDFjyyE81vSlrrdkyOOWe956MHn.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
public/uploads/all/aTH3mE6t3KchsqnJobUw8FnP0cacwXvAbXIt7Tnz.jpg
Normal file
|
After Width: | Height: | Size: 118 KiB |
BIN
public/uploads/all/desktop.ini
Normal file
BIN
public/uploads/all/f6K0B01vJhlWrJDdjrEokT9Dcg6AFzyf5SK4Et9I.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
public/uploads/all/fih2phmZSjokfrWzg1XTH2J4SIhFDzQ99THTWpQV.jpg
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
public/uploads/all/itE4CEu8sKHKyP9VaXPEh9qAslrJ1TXnwePidZOv.png
Normal file
|
After Width: | Height: | Size: 452 KiB |
BIN
public/uploads/all/jX9YpqqOiBGcsnCgSm43t5EAqH3Mna5ZmkWn8pa5.jpg
Normal file
|
After Width: | Height: | Size: 78 KiB |
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="3300.000000pt" height="2550.000000pt" viewBox="0 0 3300.000000 2550.000000" preserveAspectRatio="xMidYMid meet">
|
||||||
|
<g transform="translate(0.000000,2550.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none">
|
||||||
|
<path d="M28600 19822 c-9 -1 -131 -233 -295 -563 -154 -308 -284 -564 -290 -569 -5 -4 -73 -10 -150 -13 -147 -6 -310 -21 -385 -36 -138 -29 -281 -53 -285 -49 -2 2 -11 60 -20 128 -9 69 -20 154 -25 190 -5 36 -14 103 -20 150 -6 47 -22 164 -35 260 -13 96 -27 199 -30 228 -4 29 -13 56 -19 58 -15 6 -208 -65 -406 -149 -212 -89 -704 -340 -784 -400 -19 -14 -27 -59 -71 -442 -9 -71 -20 -164 -25 -205 -36 -289 -37 -295 -12 -285 70 28 286 73 482 102 209 30 615 22 785 -17 22 -5 74 -16 115 -26 77 -17 219 -58 255 -74 11 -5 56 -24 100 -41 261 -106 492 -264 725 -498 271 -271 491 -615 650 -1017 34 -85 115 -323 129 -379 5 -22 15 -58 21 -80 9 -37 29 -119 51 -220 32 -145 61 -328 85 -550 14 -127 18 -246 18 -570 1 -404 -2 -454 -40 -780 -79 -671 -270 -1362 -562 -2030 -156 -357 -409 -814 -611 -1105 -29 -41 -60 -86 -69 -100 -9 -14 -50 -70 -91 -125 -462 -618 -1048 -1151 -1625 -1479 -329 -188 -723 -345 -1051 -421 -38 -9 -88 -20 -110 -25 -50 -12 -199 -35 -325 -51 -52 -6 -198 -12 -325 -12 -226 0 -343 10 -546 47 -407 74 -840 273 -1179 542 -91 73 -345 320 -395 384 -16 22 -35 39 -42 40 -6 0 -125 -136 -264 -302 -139 -167 -292 -349 -341 -404 -48 -56 -88 -110 -88 -121 0 -24 119 -259 201 -395 122 -203 279 -427 376 -535 l38 -43 140 102 c77 56 264 192 415 303 151 110 281 205 289 209 9 6 44 -22 120 -97 117 -115 286 -254 411 -337 44 -30 79 -59 77 -65 -4 -10 -46 -142 -153 -485 -30 -96 -59 -186 -64 -200 -5 -14 -27 -86 -50 -160 -23 -74 -47 -150 -53 -167 -7 -21 -8 -36 -2 -42 20 -19 251 -133 425 -210 164 -72 565 -201 625 -201 7 0 64 87 126 193 203 347 282 483 359 612 29 50 62 107 74 128 21 38 22 38 66 32 165 -22 373 -35 555 -35 116 1 215 1 221 1 6 -1 14 -27 17 -58 4 -32 13 -107 21 -168 8 -60 24 -180 36 -265 51 -388 70 -521 75 -530 11 -18 398 45 615 99 224 57 250 64 416 121 82 29 157 54 167 57 22 7 19 -13 67 393 22 190 45 374 50 410 5 36 17 126 25 200 9 74 17 136 18 136 1 1 67 34 147 74 215 107 405 222 685 415 10 7 18 5 27 -7 7 -9 114 -146 239 -305 124 -158 246 -316 273 -351 l48 -62 37 29 c267 211 654 587 913 887 l88 102 -113 333 c-63 184 -138 404 -167 490 l-53 156 49 68 c205 282 359 519 502 770 44 77 86 141 95 143 8 2 196 -33 417 -77 222 -45 410 -81 419 -81 44 1 390 838 541 1305 23 72 45 139 50 151 4 11 5 25 2 31 -4 6 -160 119 -347 252 -187 132 -345 245 -352 251 -9 7 -5 36 17 117 15 60 33 133 40 163 7 30 16 71 20 90 20 86 60 296 80 410 33 200 39 240 50 328 5 46 12 87 15 92 3 4 40 27 83 50 42 24 100 55 127 70 28 15 131 71 230 125 99 54 200 109 225 122 25 14 83 46 130 70 47 25 91 51 99 58 18 18 40 424 41 760 0 236 -24 782 -35 793 -4 4 -127 -16 -295 -48 -25 -5 -72 -13 -105 -19 -33 -6 -96 -17 -140 -25 -44 -8 -111 -20 -150 -26 -38 -7 -101 -19 -139 -26 -76 -15 -86 -13 -86 19 0 21 -28 193 -49 307 -24 123 -66 294 -114 460 -27 96 -50 184 -51 195 0 11 43 81 95 155 98 138 284 403 493 703 93 133 117 173 112 191 -9 36 -132 309 -188 420 -103 200 -290 503 -376 609 -17 21 -32 43 -35 50 -5 16 -28 -3 -243 -204 -239 -222 -534 -494 -585 -538 l-40 -33 -97 94 c-138 133 -236 215 -378 314 -90 62 -123 91 -120 103 3 9 23 84 45 166 23 83 45 166 51 185 147 527 230 842 224 851 -14 23 -280 127 -447 175 -210 59 -546 119 -607 106z"></path>
|
||||||
|
<path d="M26265 17884 c-233 -24 -585 -107 -740 -174 -11 -5 -78 -32 -150 -61 -565 -226 -1137 -627 -1681 -1180 -158 -161 -434 -473 -434 -491 0 -4 375 -8 833 -8 l833 0 54 56 c113 116 362 327 530 450 478 349 920 560 1415 674 81 19 234 40 368 50 279 21 599 -25 850 -124 48 -19 87 -31 87 -27 0 12 -153 183 -236 263 -450 436 -1068 641 -1729 572z"></path>
|
||||||
|
<path d="M26810 15349 c-796 -90 -1480 -670 -1680 -1424 -111 -416 -85 -800 75 -1130 210 -433 616 -703 1150 -766 123 -15 420 -6 532 15 706 131 1258 576 1519 1225 45 111 90 279 109 411 19 121 21 360 5 470 -83 578 -468 1007 -1037 1155 -191 50 -463 68 -673 44z m325 -879 c188 -59 319 -168 398 -331 61 -124 82 -227 74 -369 -8 -137 -35 -242 -96 -365 -94 -189 -243 -340 -426 -430 -130 -64 -217 -86 -366 -92 -154 -7 -246 10 -364 67 -182 88 -308 250 -351 452 -20 92 -14 293 12 388 96 363 388 635 751 700 87 16 290 5 368 -20z"></path>
|
||||||
|
<path d="M22115 15288 c-3 -13 -104 -729 -225 -1593 -121 -863 -222 -1582 -225 -1597 l-4 -28 662 0 c699 0 829 6 1019 45 736 151 1322 724 1476 1445 132 611 -68 1175 -526 1488 -222 152 -465 231 -774 252 -79 5 -425 10 -770 10 l-628 0 -5 -22z m1339 -848 c125 -32 201 -74 292 -165 132 -130 184 -263 184 -471 0 -405 -284 -766 -682 -865 -68 -17 -127 -21 -324 -26 -136 -3 -243 -2 -246 3 -3 5 43 349 103 764 60 415 108 761 109 768 0 9 56 12 243 12 210 0 254 -3 321 -20z"></path>
|
||||||
|
<path d="M21830 11352 c0 -23 53 -258 80 -352 25 -91 100 -311 109 -325 4 -5 20 -41 36 -80 80 -196 223 -438 374 -635 107 -138 340 -369 471 -467 210 -157 452 -288 675 -367 246 -86 439 -125 742 -146 243 -18 582 14 848 80 44 11 88 20 98 20 9 0 17 4 17 8 0 4 -40 13 -89 20 -123 16 -334 72 -466 122 -559 212 -996 609 -1280 1164 -111 218 -189 427 -239 641 -9 39 -21 88 -26 110 -5 22 -17 82 -26 133 l-16 92 -654 0 c-618 0 -654 -1 -654 -18z"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/uploads/all/oIG6S3cxoLCpWvjh4A2B73DX0buOhatM7kJmE0G7.jpg
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/uploads/all/rcaJdaMHg4qxQ0qgkJpqZIo1JlmB4QL745Mrn30m.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/uploads/all/spIBkD6MH1iIqS9PgerWcuoNIlug3xLvjJdJ04YF.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
public/uploads/all/tDRifdSNtthz3nVDr68qVQDU6pICErEoPpU2ZK3D.jpg
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
public/uploads/all/y5uh92UWGCMRUO9BvWYGiEGXNOmDrdiuZT264KtI.jpg
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
public/uploads/all/zI8K1cStLsW9QIuu3or80O6qr2r1ehC14C9eIQkN.jpg
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
public/uploads/desktop.ini
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
@@ -137,11 +137,6 @@ Route::get('email/verify/{id}/{hash}', [VerificationController::class, 'verify']
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* by joan */
|
/* by joan */
|
||||||
/* Api para guardar el correo y generar un token */
|
/* Api para guardar el correo y generar un token */
|
||||||
// Route::post('user/register-email', [UserController::class, 'register_email'])->name('api.user.register.email');
|
// Route::post('user/register-email', [UserController::class, 'register_email'])->name('api.user.register.email');
|
||||||
@@ -563,13 +558,6 @@ Route::controller(PageController::class)->group(function () {
|
|||||||
/* Route::post('/shops/create/store', 'ShopController@store')->middleware('cors'); */
|
/* Route::post('/shops/create/store', 'ShopController@store')->middleware('cors'); */
|
||||||
|
|
||||||
|
|
||||||
//alejandro
|
|
||||||
// Route::prefix('workshop')->group(function () {
|
|
||||||
|
|
||||||
// Route::get('dashboard', [DashboardController::class, 'index'])->name('workshop.dashboard');
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
//AQUI AGREGO LOS DIFERENTES TIPOS DE USUARIOS Y QUE este verificado y autenticado
|
//AQUI AGREGO LOS DIFERENTES TIPOS DE USUARIOS Y QUE este verificado y autenticado
|
||||||
Route::group(['middleware' => ['auth', 'user', 'verified']], function () {
|
Route::group(['middleware' => ['auth', 'user', 'verified']], function () {
|
||||||
|
|
||||||
|
|||||||
1223
source_code/pubspec.lock
Normal file
2
storage/debugbar/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
BIN
temp/BJUT7zE1yp/addons/club_point/assets/club_points.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
57
temp/BJUT7zE1yp/addons/club_point/config.json
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"name" : "club_point",
|
||||||
|
|
||||||
|
"unique_identifier" : "club_point",
|
||||||
|
|
||||||
|
"version" : "1.7",
|
||||||
|
|
||||||
|
"minimum_item_version" : "7.0.0",
|
||||||
|
|
||||||
|
"addon_banner" : "club_points.png",
|
||||||
|
|
||||||
|
"directory" :
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name" : ["resources/views/club_points", "resources/views/club_points/frontend"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"sql_file" : "",
|
||||||
|
|
||||||
|
"files" :
|
||||||
|
[
|
||||||
|
|
||||||
|
{
|
||||||
|
"root_directory" : "addons/club_point/views/club_points/club_point_details.blade.php",
|
||||||
|
"update_directory" : "resources/views/club_points/club_point_details.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory" : "addons/club_point/views/club_points/config.blade.php",
|
||||||
|
"update_directory" : "resources/views/club_points/config.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory" : "addons/club_point/views/club_points/index.blade.php",
|
||||||
|
"update_directory" : "resources/views/club_points/index.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory" : "addons/club_point/views/club_points/product_point_edit.blade.php",
|
||||||
|
"update_directory" : "resources/views/club_points/product_point_edit.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory" : "addons/club_point/views/club_points/set_point.blade.php",
|
||||||
|
"update_directory" : "resources/views/club_points/set_point.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory" : "addons/club_point/views/club_points/frontend/index.blade.php",
|
||||||
|
"update_directory" : "resources/views/club_points/frontend/index.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory" : "addons/club_point/controllers/ClubPointController.php",
|
||||||
|
"update_directory" : "app/Http/Controllers/ClubPointController.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory" : "addons/club_point/assets/club_points.png",
|
||||||
|
"update_directory" : "public/club_points.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,171 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\BusinessSetting;
|
||||||
|
use App\Models\ClubPointDetail;
|
||||||
|
use App\Models\ClubPoint;
|
||||||
|
use App\Models\Product;
|
||||||
|
use App\Models\Wallet;
|
||||||
|
use App\Models\Order;
|
||||||
|
use Artisan;
|
||||||
|
use Auth;
|
||||||
|
|
||||||
|
class ClubPointController extends Controller
|
||||||
|
{
|
||||||
|
public function __construct() {
|
||||||
|
// Staff Permission Check
|
||||||
|
$this->middleware(['permission:club_point_configurations'])->only('configure_index');
|
||||||
|
$this->middleware(['permission:set_club_points'])->only('set_point');
|
||||||
|
$this->middleware(['permission:view_users_club_points'])->only('index');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configure_index()
|
||||||
|
{
|
||||||
|
return view('club_points.config');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$club_points = ClubPoint::latest()->paginate(15);
|
||||||
|
return view('club_points.index', compact('club_points'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function userpoint_index()
|
||||||
|
{
|
||||||
|
$club_points = ClubPoint::where('user_id', Auth::user()->id)->latest()->paginate(15);
|
||||||
|
return view('club_points.frontend.index', compact('club_points'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_point()
|
||||||
|
{
|
||||||
|
$products = Product::latest()->paginate(15);
|
||||||
|
return view('club_points.set_point', compact('products'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_products_point(Request $request)
|
||||||
|
{
|
||||||
|
$products = Product::whereBetween('unit_price', [$request->min_price, $request->max_price])->get();
|
||||||
|
foreach ($products as $product) {
|
||||||
|
$product->earn_point = $request->point;
|
||||||
|
$product->save();
|
||||||
|
}
|
||||||
|
flash(translate('Point has been inserted successfully for ').count($products).translate(' products'))->success();
|
||||||
|
return redirect()->route('set_product_points');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_all_products_point(Request $request)
|
||||||
|
{
|
||||||
|
$products = Product::all();
|
||||||
|
foreach ($products as $product) {;
|
||||||
|
$product->earn_point = $product->unit_price * $request->point;
|
||||||
|
$product->save();
|
||||||
|
}
|
||||||
|
flash(translate('Point has been inserted successfully for ').count($products).translate(' products'))->success();
|
||||||
|
return redirect()->route('set_product_points');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_point_edit($id)
|
||||||
|
{
|
||||||
|
$product = Product::findOrFail(decrypt($id));
|
||||||
|
return view('club_points.product_point_edit', compact('product'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update_product_point(Request $request, $id)
|
||||||
|
{
|
||||||
|
$product = Product::findOrFail($id);
|
||||||
|
$product->earn_point = $request->point;
|
||||||
|
$product->save();
|
||||||
|
flash(translate('Point has been updated successfully'))->success();
|
||||||
|
return redirect()->route('set_product_points');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function convert_rate_store(Request $request)
|
||||||
|
{
|
||||||
|
$club_point_convert_rate = BusinessSetting::where('type', $request->type)->first();
|
||||||
|
if ($club_point_convert_rate != null) {
|
||||||
|
$club_point_convert_rate->value = $request->value;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$club_point_convert_rate = new BusinessSetting;
|
||||||
|
$club_point_convert_rate->type = $request->type;
|
||||||
|
$club_point_convert_rate->value = $request->value;
|
||||||
|
}
|
||||||
|
$club_point_convert_rate->save();
|
||||||
|
|
||||||
|
Artisan::call('cache:clear');
|
||||||
|
|
||||||
|
flash(translate('Point convert rate has been updated successfully'))->success();
|
||||||
|
return redirect()->route('club_points.configs');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function processClubPoints(Order $order)
|
||||||
|
{
|
||||||
|
$club_point = new ClubPoint;
|
||||||
|
$club_point->user_id = $order->user_id;
|
||||||
|
$club_point->points = 0;
|
||||||
|
foreach ($order->orderDetails as $key => $orderDetail) {
|
||||||
|
$total_pts = ($orderDetail->earn_point) * $orderDetail->quantity;
|
||||||
|
$club_point->points += $total_pts;
|
||||||
|
}
|
||||||
|
if($club_point->points > 0){
|
||||||
|
$club_point->order_id = $order->id;
|
||||||
|
$club_point->convert_status = 0;
|
||||||
|
$club_point->save();
|
||||||
|
|
||||||
|
foreach ($order->orderDetails as $key => $orderDetail) {
|
||||||
|
$club_point_detail = new ClubPointDetail;
|
||||||
|
$club_point_detail->club_point_id = $club_point->id;
|
||||||
|
$club_point_detail->product_id = $orderDetail->product_id;
|
||||||
|
$club_point_detail->point = ($orderDetail->earn_point) * $orderDetail->quantity;
|
||||||
|
$club_point_detail->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function club_point_detail($id)
|
||||||
|
{
|
||||||
|
$club_point_details = ClubPointDetail::where('club_point_id', decrypt($id))->paginate(12);
|
||||||
|
return view('club_points.club_point_details', compact('club_point_details'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function convert_point_into_wallet(Request $request)
|
||||||
|
{
|
||||||
|
$club_point = ClubPoint::findOrFail($request->el);
|
||||||
|
if($club_point->convert_status == 0) {
|
||||||
|
|
||||||
|
$amount = 0;
|
||||||
|
foreach ($club_point->club_point_details as $club_point_detail) {
|
||||||
|
if($club_point_detail->refunded == 0){
|
||||||
|
$club_point_detail->converted_amount = floatval($club_point_detail->point / get_setting('club_point_convert_rate'));
|
||||||
|
$club_point_detail->save();
|
||||||
|
$amount += $club_point_detail->converted_amount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wallet history
|
||||||
|
$wallet = new Wallet;
|
||||||
|
$wallet->user_id = Auth::user()->id;
|
||||||
|
$wallet->amount = $amount;
|
||||||
|
$wallet->payment_method = 'Club Point Convert';
|
||||||
|
$wallet->payment_details = 'Club Point Convert';
|
||||||
|
$wallet->save();
|
||||||
|
|
||||||
|
// converted money from the club point, add to the user balance
|
||||||
|
$user = Auth::user();
|
||||||
|
$user->balance = $user->balance + $amount;
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
$club_point->convert_status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($club_point->save()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
temp/BJUT7zE1yp/addons/club_point/sql/1.1.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
1
temp/BJUT7zE1yp/addons/club_point/sql/1.2.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
2
temp/BJUT7zE1yp/addons/club_point/sql/1.3.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE `club_points` ADD `order_id` INT NOT NULL AFTER `points`;
|
||||||
|
COMMIT;
|
||||||
1
temp/BJUT7zE1yp/addons/club_point/sql/1.4.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
1
temp/BJUT7zE1yp/addons/club_point/sql/1.5.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
5
temp/BJUT7zE1yp/addons/club_point/sql/1.6.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
ALTER TABLE `club_point_details`
|
||||||
|
ADD `converted_amount` DOUBLE(25,2) NULL DEFAULT '0.00' AFTER `point`,
|
||||||
|
ADD `refunded` INT(1) NOT NULL DEFAULT '0' AFTER `converted_amount`;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
1
temp/BJUT7zE1yp/addons/club_point/sql/1.7.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
128
temp/BJUT7zE1yp/addons/club_point/sql/update.sql
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 4.9.1
|
||||||
|
-- https://www.phpmyadmin.net/
|
||||||
|
--
|
||||||
|
-- Host: 127.0.0.1
|
||||||
|
-- Generation Time: Mar 16, 2020 at 06:38 AM
|
||||||
|
-- Server version: 10.4.8-MariaDB
|
||||||
|
-- PHP Version: 7.3.11
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
SET AUTOCOMMIT = 0;
|
||||||
|
START TRANSACTION;
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Database: `shop`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `club_points`
|
||||||
|
--
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `business_settings` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'club_point_convert_rate', '10', '2019-03-12 05:58:23', '2019-03-12 05:58:23');
|
||||||
|
|
||||||
|
CREATE TABLE `club_points` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`user_id` int(11) NOT NULL,
|
||||||
|
`points` double(18,2) NOT NULL,
|
||||||
|
`convert_status` int(1) NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indexes for dumped tables
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indexes for table `club_points`
|
||||||
|
--
|
||||||
|
ALTER TABLE `club_points`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT for dumped tables
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT for table `club_points`
|
||||||
|
--
|
||||||
|
ALTER TABLE `club_points`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
SET AUTOCOMMIT = 0;
|
||||||
|
START TRANSACTION;
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Database: `shop`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `club_point_details`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `club_point_details` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`club_point_id` int(11) NOT NULL,
|
||||||
|
`product_id` int(11) NOT NULL,
|
||||||
|
`product_qty` int(11) NOT NULL,
|
||||||
|
`point` double(8,2) NOT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indexes for dumped tables
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indexes for table `club_point_details`
|
||||||
|
--
|
||||||
|
ALTER TABLE `club_point_details`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT for dumped tables
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT for table `club_point_details`
|
||||||
|
--
|
||||||
|
ALTER TABLE `club_point_details`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
|
ALTER TABLE `products` ADD `earn_point` DOUBLE(8,2) NOT NULL DEFAULT '0' AFTER `slug`;
|
||||||
|
ALTER TABLE `club_points` ADD `order_id` INT NOT NULL AFTER `points`;
|
||||||
|
|
||||||
|
ALTER TABLE `club_point_details`
|
||||||
|
ADD `converted_amount` DOUBLE(8,2) NULL DEFAULT '0.00' AFTER `point`,
|
||||||
|
ADD `refunded` INT(1) NOT NULL DEFAULT '0' AFTER `converted_amount`;
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
@extends('backend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table aiz-table mb-0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>{{translate('Product Name')}}</th>
|
||||||
|
<th>{{translate('Points')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Earned At')}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($club_point_details as $key => $club_point)
|
||||||
|
<tr>
|
||||||
|
<td>{{ ($key+1) + ($club_point_details->currentPage() - 1)*$club_point_details->perPage() }}</td>
|
||||||
|
@if ($club_point->product != null)
|
||||||
|
<td>{{ $club_point->product->getTranslation('name') }}</td>
|
||||||
|
@else
|
||||||
|
<td>{{ translate('Deleted Product') }}</td>
|
||||||
|
@endif
|
||||||
|
<td>{{ $club_point->point }}</td>
|
||||||
|
<td>{{ $club_point->created_at }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="clearfix">
|
||||||
|
<div class="pull-right">
|
||||||
|
{{ $club_point_details->appends(request()->input())->links() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
@extends('backend.layouts.app')
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{translate('Convert Point To Wallet')}}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('point_convert_rate_store') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="type" value="club_point_convert_rate">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<label class="col-from-label">{{translate('Set Point For ')}} {{ single_price(1) }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-5">
|
||||||
|
<input type="number" min="0" step="0.01" class="form-control" name="value" value="{{ get_setting('club_point_convert_rate') }}" placeholder="100" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{translate('Points')}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-3 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{translate('Save')}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<i class="fs-12"><b>{{ translate('Note: You need to activate wallet option first before using club point addon.') }}</b></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
@extends('frontend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<section class="py-5">
|
||||||
|
<div class="container">
|
||||||
|
<div class="d-flex align-items-start">
|
||||||
|
@include('frontend.inc.user_side_nav')
|
||||||
|
|
||||||
|
<div class="aiz-user-panel">
|
||||||
|
<div class="aiz-titlebar mt-2 mb-4">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h1 class="fs-20 fw-700 text-dark">{{ translate('My Clubpoints') }}</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="bg-dark overflow-hidden">
|
||||||
|
<div class="px-3 py-4">
|
||||||
|
<div class="fs-14 fw-400 text-center text-secondary mb-1">{{ translate('Exchange Rate') }}</div>
|
||||||
|
<div class="fs-30 fw-700 text-center text-white">{{ get_setting('club_point_convert_rate') }} {{ translate(' Points') }} = {{ single_price(1) }} {{ translate('Wallet Money') }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="card rounded-0 shadow-none border">
|
||||||
|
<div class="card-header border-bottom-0">
|
||||||
|
<h5 class="mb-0 fs-20 fw-700 text-dark">{{ translate('Clubpoint Earning History')}}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table aiz-table mb-0">
|
||||||
|
<thead class="text-gray fs-12">
|
||||||
|
<tr>
|
||||||
|
<th class="pl-0">#</th>
|
||||||
|
<th>{{translate('Code')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Points')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Converted')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Date') }}</th>
|
||||||
|
<th class="text-right pr-0">{{translate('Action')}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="fs-14">
|
||||||
|
@foreach ($club_points as $key => $club_point)
|
||||||
|
@php
|
||||||
|
$convertible_club_point = $club_point->club_point_details->where('refunded',0)->sum('point');
|
||||||
|
@endphp
|
||||||
|
<tr>
|
||||||
|
<td class="pl-0" style="vertical-align: middle;">{{ sprintf('%02d', $key+1) }}</td>
|
||||||
|
<td class="fw-700 text-primary" style="vertical-align: middle;">
|
||||||
|
@if ($club_point->order != null)
|
||||||
|
{{ $club_point->order->code }}
|
||||||
|
@else
|
||||||
|
{{ translate('Order not found') }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="fw-700" style="vertical-align: middle;">
|
||||||
|
@if($convertible_club_point > 0)
|
||||||
|
{{ $convertible_club_point }} {{ translate(' pts') }}
|
||||||
|
@else
|
||||||
|
{{ translate('Refunded') }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td style="vertical-align: middle;">
|
||||||
|
@if ($club_point->convert_status == 1)
|
||||||
|
<span class="badge badge-inline badge-success p-3 fs-12" style="border-radius: 25px;">{{ translate('Yes') }}</strong></span>
|
||||||
|
@else
|
||||||
|
<span class="badge badge-inline badge-info p-3 fs-12" style="border-radius: 25px;">{{ translate('No') }}</strong></span>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td style="vertical-align: middle;">{{ date('d-m-Y', strtotime($club_point->created_at)) }}</td>
|
||||||
|
|
||||||
|
<td class="text-right pr-0" style="vertical-align: middle;">
|
||||||
|
|
||||||
|
@if ($club_point->convert_status == 0 && $convertible_club_point > 0)
|
||||||
|
<button onclick="convert_point({{ $club_point->id }})" class="btn btn-sm btn-styled btn-primary" style="border-radius: 25px;">{{translate('Convert Now')}}</button>
|
||||||
|
@elseif($convertible_club_point == 0)
|
||||||
|
<span class="badge badge-inline text-white badge-warning p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{ translate('Refunded') }}</span>
|
||||||
|
@else
|
||||||
|
<span class="badge badge-inline badge-success p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{ translate('Done') }}</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="aiz-pagination mt-3">
|
||||||
|
{{ $club_points->links() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('script')
|
||||||
|
<script type="text/javascript">
|
||||||
|
function convert_point(el)
|
||||||
|
{
|
||||||
|
$.post('{{ route('convert_point_into_wallet') }}',{_token:'{{ csrf_token() }}', el:el}, function(data){
|
||||||
|
if (data == 1) {
|
||||||
|
location.reload();
|
||||||
|
AIZ.plugins.notify('success', '{{ translate('Convert has been done successfully Check your Wallets') }}');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
@extends('backend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table aiz-table mb-0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>{{translate('Order Code')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Customer Name')}}</th>
|
||||||
|
<th>{{translate('Points')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Convert Status')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Earned At')}}</th>
|
||||||
|
<th class="text-right" width="10%">{{translate('Options')}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($club_points as $key => $club_point)
|
||||||
|
<tr>
|
||||||
|
<td>{{ ($key+1) + ($club_points->currentPage() - 1)*$club_points->perPage() }}</td>
|
||||||
|
<td>
|
||||||
|
@if ($club_point->order != null)
|
||||||
|
{{ $club_point->order->code }}
|
||||||
|
@else
|
||||||
|
{{ translate('Order not found') }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if ($club_point->user != null)
|
||||||
|
{{ $club_point->user->name }}
|
||||||
|
@else
|
||||||
|
{{ translate('User not found') }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>{{ $club_point->points }}</td>
|
||||||
|
<td>
|
||||||
|
@if ($club_point->convert_status == 1)
|
||||||
|
<span class="badge badge-inline badge-success">{{translate('Converted')}}</span>
|
||||||
|
@else
|
||||||
|
<span class="badge badge-inline badge-info">{{translate('Pending')}}</span>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>{{ $club_point->created_at }}</td>
|
||||||
|
<td class="text-right">
|
||||||
|
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('club_point.details', encrypt($club_point->id))}}" title="{{ translate('View') }}">
|
||||||
|
<i class="las la-eye"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="aiz-pagination">
|
||||||
|
{{ $club_points->appends(request()->input())->links() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
@extends('backend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{translate('Set Point for Product')}}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('product_point.update', $product->id) }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{translate('Set Point')}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<input type="number" min="0" step="0.01" class="form-control" name="point" value="{{ $product->earn_point }}" placeholder="100" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{translate('Save')}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
@extends('backend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body px-3">
|
||||||
|
<table class="table aiz-table mb-0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>{{translate('Name')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Owner')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Price')}}</th>
|
||||||
|
<th data-breakpoints="lg">{{translate('Point')}}</th>
|
||||||
|
<th>{{translate('Options')}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($products as $key => $product)
|
||||||
|
<tr>
|
||||||
|
<td>{{ ($key+1) + ($products->currentPage() - 1)*$products->perPage() }}</td>
|
||||||
|
<td>
|
||||||
|
<a href="{{ route('product', $product->slug) }}" target="_blank">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-auto">
|
||||||
|
<img src="{{ uploaded_asset($product->thumbnail_img)}}" alt="Image" class="size-50px">
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="text-muted text-truncate-2">{{ $product->getTranslation('name') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if ($product->user != null)
|
||||||
|
{{ $product->user->name }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>{{ number_format($product->unit_price,2) }}</td>
|
||||||
|
<td>{{ $product->earn_point }}</td>
|
||||||
|
<td class="text-right">
|
||||||
|
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('product_club_point.edit', encrypt($product->id))}}" title="{{ translate('Edit') }}">
|
||||||
|
<i class="las la-edit"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="aiz-pagination">
|
||||||
|
{{ $products->appends(request()->input())->links() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{translate('Set Point for Product Within a Range')}}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="mb-3 text-muted">
|
||||||
|
<small>{{ translate('Set any specific point for those products what are between Min-price and Max-price. Min-price should be less than Max-price') }}</small>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal" action="{{ route('set_products_point.store') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<label class="col-from-label">{{translate('Set Point for multiple products')}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="number" min="0" step="0.01" class="form-control" name="point" placeholder="100" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<label class="col-from-label">{{translate('Min Price')}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="number" min="0" step="0.01" class="form-control" name="min_price" value="{{ \App\Models\Product::min('unit_price') }}" placeholder="50" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<label class="col-from-label">{{translate('Max Price')}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="number" min="0" step="0.01" class="form-control" name="max_price" value="{{ \App\Models\Product::max('unit_price') }}" placeholder="110" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{translate('Save')}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{translate('Set Point for all Products')}}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('set_all_products_point.store') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<label class="col-from-label">{{translate('Set Point For ')}} {{ single_price(1) }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="number" step="0.001" class="form-control" name="point" placeholder="1" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2">
|
||||||
|
<label class="col-from-label">{{translate('Points')}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{translate('Save')}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
BIN
temp/IWoZhNx6FV/addons/Flutter_source_code.zip
Normal file
BIN
temp/IWoZhNx6FV/addons/delivery_boy_addon.zip
Normal file
BIN
temp/PLJ7vEAC2W/addons/otp_system/assets/otp_system.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
112
temp/PLJ7vEAC2W/addons/otp_system/config.json
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
{
|
||||||
|
"name": "OTP",
|
||||||
|
"unique_identifier": "otp_system",
|
||||||
|
"version": "2.3",
|
||||||
|
"minimum_item_version": "7.5.0",
|
||||||
|
"addon_banner": "otp_system.png",
|
||||||
|
"directory": [
|
||||||
|
{
|
||||||
|
"name": [
|
||||||
|
"resources/views/otp_systems",
|
||||||
|
"resources/views/backend/otp_systems",
|
||||||
|
"resources/views/backend/otp_systems/configurations",
|
||||||
|
"resources/views/backend/otp_systems/configurations/partials",
|
||||||
|
"resources/views/backend/otp_systems/sms",
|
||||||
|
"resources/views/otp_systems/frontend",
|
||||||
|
"resources/views/otp_systems/frontend/auth",
|
||||||
|
"resources/views/otp_systems/frontend/auth/passwords"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sql_file": "",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/index.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/index.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/activation.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/activation.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/sms_templates.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/sms_templates.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/twillo.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/twillo.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/nexmo.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/nexmo.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/fast2sms.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/fast2sms.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/mimo.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/mimo.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/mimsms.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/mimsms.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/msegat.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/msegat.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/sparrow.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/sparrow.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/ssl_wireless.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/ssl_wireless.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/configurations/partials/zender.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/configurations/partials/zender.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/sms/index.blade.php",
|
||||||
|
"update_directory": "resources/views/backend/otp_systems/sms/index.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/frontend/auth/passwords/reset_with_phone.blade.php",
|
||||||
|
"update_directory": "resources/views/otp_systems/frontend/auth/passwords/reset_with_phone.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/views/otp_systems/frontend/user_verification.blade.php",
|
||||||
|
"update_directory": "resources/views/otp_systems/frontend/user_verification.blade.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/controllers/OTPController.php",
|
||||||
|
"update_directory": "app/Http/Controllers/OTPController.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/controllers/SmsController.php",
|
||||||
|
"update_directory": "app/Http/Controllers/SmsController.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/controllers/OTPVerificationController.php",
|
||||||
|
"update_directory": "app/Http/Controllers/OTPVerificationController.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/controllers/SmsTemplateController.php",
|
||||||
|
"update_directory": "app/Http/Controllers/SmsTemplateController.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/utility/MimoUtility.php",
|
||||||
|
"update_directory": "app/Utility/MimoUtility.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/utility/SmsUtility.php",
|
||||||
|
"update_directory": "app/Utility/SmsUtility.php"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root_directory": "addons/otp_system/assets/otp_system.png",
|
||||||
|
"update_directory": "public/otp_system.png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\OtpConfiguration;
|
||||||
|
|
||||||
|
class OTPController extends Controller
|
||||||
|
{
|
||||||
|
public function __construct() {
|
||||||
|
// Staff Permission Check
|
||||||
|
$this->middleware(['permission:otp_configurations'])->only('configure_index');
|
||||||
|
$this->middleware(['permission:sms_providers_configurations'])->only('credentials_index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function configure_index()
|
||||||
|
{
|
||||||
|
$otp_configurations = OtpConfiguration::all();
|
||||||
|
return view('backend.otp_systems.configurations.activation', compact('otp_configurations'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function credentials_index()
|
||||||
|
{
|
||||||
|
$otp_configurations = OtpConfiguration::all();
|
||||||
|
return view('backend.otp_systems.configurations.index', compact('otp_configurations'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function updateActivationSettings(Request $request)
|
||||||
|
{
|
||||||
|
$business_settings = OtpConfiguration::where('type', $request->type)->first();
|
||||||
|
if($business_settings!=null){
|
||||||
|
$business_settings->value = $request->value;
|
||||||
|
$business_settings->save();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$business_settings = new OtpConfiguration;
|
||||||
|
$business_settings->type = $request->type;
|
||||||
|
$business_settings->value = $request->value;
|
||||||
|
$business_settings->save();
|
||||||
|
}
|
||||||
|
return '1';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in .env
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update_credentials(Request $request)
|
||||||
|
{
|
||||||
|
foreach ($request->types as $key => $type) {
|
||||||
|
$this->overWriteEnvFile($type, $request[$type]);
|
||||||
|
}
|
||||||
|
|
||||||
|
flash("Settings updated successfully")->success();
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*.env file overwrite
|
||||||
|
*/
|
||||||
|
public function overWriteEnvFile($type, $val)
|
||||||
|
{
|
||||||
|
$path = base_path('.env');
|
||||||
|
if (file_exists($path)) {
|
||||||
|
$val = '"'.trim($val).'"';
|
||||||
|
if(is_numeric(strpos(file_get_contents($path), $type)) && strpos(file_get_contents($path), $type) >= 0){
|
||||||
|
file_put_contents($path, str_replace(
|
||||||
|
$type.'="'.env($type).'"', $type.'='.$val, file_get_contents($path)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
file_put_contents($path, file_get_contents($path)."\r\n".$type.'='.$val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Auth\Events\PasswordReset;
|
||||||
|
use Auth;
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Utility\SmsUtility;
|
||||||
|
use Hash;
|
||||||
|
|
||||||
|
class OTPVerificationController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function verification(Request $request){
|
||||||
|
if (Auth::check() && Auth::user()->email_verified_at == null) {
|
||||||
|
return view('otp_systems.frontend.user_verification');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
flash('You have already verified your number')->warning();
|
||||||
|
return redirect()->route('home');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function verify_phone(Request $request){
|
||||||
|
$user = Auth::user();
|
||||||
|
if ($user->verification_code == $request->verification_code) {
|
||||||
|
$user->email_verified_at = date('Y-m-d h:m:s');
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
flash('Your phone number has been verified successfully')->success();
|
||||||
|
return redirect()->route('home');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
flash('Invalid Code')->error();
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function resend_verificcation_code(Request $request){
|
||||||
|
$user = Auth::user();
|
||||||
|
$user->verification_code = rand(100000,999999);
|
||||||
|
$user->save();
|
||||||
|
SmsUtility::phone_number_verification($user);
|
||||||
|
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
public function reset_password_with_code(Request $request)
|
||||||
|
{
|
||||||
|
$phone = "+{$request['country_code']}{$request['phone']}";
|
||||||
|
|
||||||
|
if (($user = User::where('phone', $phone)->where('verification_code', $request->code)->first()) != null) {
|
||||||
|
if ($request->password == $request->password_confirmation) {
|
||||||
|
$user->password = Hash::make($request->password);
|
||||||
|
$user->email_verified_at = date('Y-m-d h:m:s');
|
||||||
|
$user->save();
|
||||||
|
event(new PasswordReset($user));
|
||||||
|
auth()->login($user, true);
|
||||||
|
|
||||||
|
if (auth()->user()->user_type == 'admin' || auth()->user()->user_type == 'staff') {
|
||||||
|
flash("Password has been reset successfully")->success();
|
||||||
|
return redirect()->route('admin.dashboard');
|
||||||
|
}
|
||||||
|
flash("Password has been reset successfully")->success();
|
||||||
|
return redirect()->route('home');
|
||||||
|
} else {
|
||||||
|
flash("Password and confirm password didn't match")->warning();
|
||||||
|
return view('otp_systems.frontend.auth.passwords.reset_with_phone');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
flash("Verification code mismatch")->error();
|
||||||
|
return view('otp_systems.frontend.auth.passwords.reset_with_phone');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function send_code($user){
|
||||||
|
SmsUtility::phone_number_verification($user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Order $order
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function send_order_code($order){
|
||||||
|
$phone = json_decode($order->shipping_address)->phone;
|
||||||
|
if($phone != null){
|
||||||
|
SmsUtility::order_placement($phone, $order);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Order $order
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function send_delivery_status($order){
|
||||||
|
$phone = json_decode($order->shipping_address)->phone;
|
||||||
|
if($phone != null){
|
||||||
|
SmsUtility::delivery_status_change($phone, $order);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Order $order
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function send_payment_status($order){
|
||||||
|
$phone = json_decode($order->shipping_address)->phone;
|
||||||
|
if($phone != null){
|
||||||
|
SmsUtility::payment_status_change($phone, $order);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Services\SendSmsService;
|
||||||
|
use App\Models\User;
|
||||||
|
|
||||||
|
class SmsController extends Controller
|
||||||
|
{
|
||||||
|
public function __construct() {
|
||||||
|
// Staff Permission Check
|
||||||
|
$this->middleware(['permission:send_bulk_sms'])->only('index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$users = User::all();
|
||||||
|
return view('backend.otp_systems.sms.index',compact('users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
//send message to multiple users
|
||||||
|
public function send(Request $request)
|
||||||
|
{
|
||||||
|
foreach ($request->user_phones as $key => $phone) {
|
||||||
|
(new SendSmsService())->sendSMS($phone, env('APP_NAME'), $request->content, $request->template_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
flash(translate('SMS has been sent.'))->success();
|
||||||
|
return redirect()->route('admin.dashboard');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\SmsTemplate;
|
||||||
|
|
||||||
|
class SmsTemplateController extends Controller
|
||||||
|
{
|
||||||
|
public function __construct() {
|
||||||
|
// Staff Permission Check
|
||||||
|
$this->middleware(['permission:sms_templates'])->only('index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$sms_templates = SmsTemplate::all();
|
||||||
|
return view('backend.otp_systems.configurations.sms_templates', compact('sms_templates'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
$sms_template = SmsTemplate::where('id', $id)->first();
|
||||||
|
$sms_template->sms_body = str_replace("\r\n",'',$request->body);
|
||||||
|
$sms_template->template_id = $request->template_id;
|
||||||
|
|
||||||
|
if ($request->status == 1) {
|
||||||
|
$sms_template->status = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$sms_template->status = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($sms_template->save()){
|
||||||
|
flash(translate('SMS Template has been updated successfully'))->success();
|
||||||
|
return back();
|
||||||
|
} else {
|
||||||
|
flash(translate('Sorry! Something went wrong.'))->error();
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
2
temp/PLJ7vEAC2W/addons/otp_system/sql/1.1.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO `otp_configurations` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'ssl_wireless', '0', current_timestamp(), current_timestamp());
|
||||||
|
COMMIT;
|
||||||
2
temp/PLJ7vEAC2W/addons/otp_system/sql/1.2.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO `otp_configurations` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'fast2sms', '0', current_timestamp(), current_timestamp());
|
||||||
|
COMMIT;
|
||||||
1
temp/PLJ7vEAC2W/addons/otp_system/sql/1.3.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
2
temp/PLJ7vEAC2W/addons/otp_system/sql/1.4.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO `otp_configurations` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'mimo', '0', current_timestamp(), current_timestamp());
|
||||||
|
COMMIT;
|
||||||
25
temp/PLJ7vEAC2W/addons/otp_system/sql/1.5.sql
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
CREATE TABLE `sms_templates` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`identifier` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`sms_body` longtext COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`template_id` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`status` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `sms_templates` (`id`, `identifier`, `sms_body`, `template_id`, `status`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'phone_number_verification', '[[code]] is your verification code for [[site_name]].', NULL, 0, '2021-06-07 13:29:22', '2021-06-08 02:38:18'),
|
||||||
|
(2, 'password_reset', 'Your password reset code is [[code]].', NULL, 1, '2021-06-07 13:29:34', '2021-06-07 13:29:34'),
|
||||||
|
(3, 'order_placement', 'Your order has been placed and Order Code is [[order_code]]', NULL, 1, '2021-06-07 13:32:22', '2021-06-08 02:39:25'),
|
||||||
|
(4, 'delivery_status_change', 'Your delivery status has been updated to [[delivery_status]] for Order code : [[order_code]]', NULL, 1, '2021-06-07 13:33:14', '2021-06-08 02:39:28'),
|
||||||
|
(5, 'payment_status_change', 'Your payment status has been updated to [[payment_status]] for Order code : [[order_code]]', NULL, 1, '2021-06-07 13:35:23', '2021-06-08 02:39:31'),
|
||||||
|
(6, 'assign_delivery_boy', 'You are assigned to deliver an order. Order code : [[order_code]]', NULL, 1, '2021-06-07 13:38:10', '2021-06-08 02:39:34');
|
||||||
|
|
||||||
|
ALTER TABLE `sms_templates`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
ALTER TABLE `sms_templates`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||||
|
COMMIT;
|
||||||
2
temp/PLJ7vEAC2W/addons/otp_system/sql/1.6.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO `otp_configurations` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'mimsms', '0', current_timestamp(), current_timestamp());
|
||||||
|
COMMIT;
|
||||||
2
temp/PLJ7vEAC2W/addons/otp_system/sql/1.7.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO `otp_configurations` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES (NULL, 'msegat', '0', current_timestamp(), current_timestamp());
|
||||||
|
COMMIT;
|
||||||
1
temp/PLJ7vEAC2W/addons/otp_system/sql/1.8.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
1
temp/PLJ7vEAC2W/addons/otp_system/sql/1.9.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
1
temp/PLJ7vEAC2W/addons/otp_system/sql/2.0.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
1
temp/PLJ7vEAC2W/addons/otp_system/sql/2.1.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
1
temp/PLJ7vEAC2W/addons/otp_system/sql/2.2.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
COMMIT;
|
||||||
13
temp/PLJ7vEAC2W/addons/otp_system/sql/2.3.sql
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
INSERT INTO `otp_configurations` (`id`, `type`, `value`, `created_at`, `updated_at`)
|
||||||
|
SELECT NULL, 'sparrow', '0', current_timestamp(), current_timestamp() FROM DUAL
|
||||||
|
WHERE NOT EXISTS (SELECT * FROM `otp_configurations` WHERE `type`='sparrow' LIMIT 1);
|
||||||
|
|
||||||
|
INSERT INTO `otp_configurations` (`id`, `type`, `value`, `created_at`, `updated_at`)
|
||||||
|
SELECT NULL, 'zender', '0', current_timestamp(), current_timestamp() FROM DUAL
|
||||||
|
WHERE NOT EXISTS (SELECT * FROM `otp_configurations` WHERE `type`='zender' LIMIT 1);
|
||||||
|
|
||||||
|
DELETE FROM `otp_configurations` WHERE `type` = 'otp_for_order';
|
||||||
|
DELETE FROM `otp_configurations` WHERE `type` = 'otp_for_delivery_status';
|
||||||
|
DELETE FROM `otp_configurations` WHERE `type` = 'otp_for_paid_status';
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
107
temp/PLJ7vEAC2W/addons/otp_system/sql/update.sql
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 5.0.1
|
||||||
|
-- https://www.phpmyadmin.net/
|
||||||
|
--
|
||||||
|
-- Host: 127.0.0.1
|
||||||
|
-- Generation Time: Mar 23, 2020 at 07:35 AM
|
||||||
|
-- Server version: 10.4.11-MariaDB
|
||||||
|
-- PHP Version: 7.4.2
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
SET AUTOCOMMIT = 0;
|
||||||
|
START TRANSACTION;
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*Column will be added on user table*/
|
||||||
|
ALTER TABLE `users` CHANGE `verification_code` `verification_code` TEXT NULL DEFAULT NULL;
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Database: `shop`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `otp_configurations`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `otp_configurations` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`type` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `otp_configurations`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `otp_configurations` (`id`, `type`, `value`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'nexmo', '1', '2020-03-22 09:19:07', '2020-03-22 09:19:07'),
|
||||||
|
(5, 'twillo', '0', '2020-03-22 09:54:03', '2020-03-22 03:54:20'),
|
||||||
|
(6, 'ssl_wireless', '0', '2020-03-22 09:54:03', '2020-03-22 03:54:20'),
|
||||||
|
(7, 'fast2sms', '0', '2020-03-22 09:54:03', '2020-03-22 03:54:20'),
|
||||||
|
(8, 'mimsms', '0', '2020-03-22 09:54:03', '2020-03-22 03:54:20'),
|
||||||
|
(9, 'mimo', '0', '2020-12-27 09:54:03', '2020-12-28 03:54:20'),
|
||||||
|
(10, 'msegat', '0', '2020-12-27 09:54:03', '2020-12-28 03:54:20'),
|
||||||
|
(11, 'sparrow', '0', '2020-12-27 09:54:03', '2020-12-28 03:54:20'),
|
||||||
|
(12, 'zender', '0', '2020-12-27 09:54:03', '2020-12-28 03:54:20');
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indexes for dumped tables
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indexes for table `otp_configurations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `otp_configurations`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT for dumped tables
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT for table `otp_configurations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `otp_configurations`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
|
||||||
|
|
||||||
|
CREATE TABLE `sms_templates` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`identifier` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`sms_body` longtext COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`template_id` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`status` tinyint(1) NOT NULL DEFAULT 1,
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp()
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `sms_templates` (`id`, `identifier`, `sms_body`, `template_id`, `status`, `created_at`, `updated_at`) VALUES
|
||||||
|
(1, 'phone_number_verification', '[[code]] is your verification code for [[site_name]].', NULL, 0, '2021-06-07 13:29:22', '2021-06-08 02:38:18'),
|
||||||
|
(2, 'password_reset', 'Your password reset code is [[code]].', NULL, 1, '2021-06-07 13:29:34', '2021-06-07 13:29:34'),
|
||||||
|
(3, 'order_placement', 'Your order has been placed and Order Code is [[order_code]]', NULL, 1, '2021-06-07 13:32:22', '2021-06-08 02:39:25'),
|
||||||
|
(4, 'delivery_status_change', 'Your delivery status has been updated to [[delivery_status]] for Order code : [[order_code]]', NULL, 1, '2021-06-07 13:33:14', '2021-06-08 02:39:28'),
|
||||||
|
(5, 'payment_status_change', 'Your payment status has been updated to [[payment_status]] for Order code : [[order_code]]', NULL, 1, '2021-06-07 13:35:23', '2021-06-08 02:39:31'),
|
||||||
|
(6, 'assign_delivery_boy', 'You are assigned to deliver an order. Order code : [[order_code]]', NULL, 1, '2021-06-07 13:38:10', '2021-06-08 02:39:34');
|
||||||
|
|
||||||
|
ALTER TABLE `sms_templates`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
ALTER TABLE `sms_templates`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||||
|
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
91
temp/PLJ7vEAC2W/addons/otp_system/utility/MimoUtility.php
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Utility;
|
||||||
|
|
||||||
|
class MimoUtility
|
||||||
|
{
|
||||||
|
public static function getToken()
|
||||||
|
{
|
||||||
|
$curl = curl_init();
|
||||||
|
|
||||||
|
curl_setopt_array($curl, array(
|
||||||
|
CURLOPT_URL => '52.30.114.86:8080/mimosms/v1/user/login',
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_ENCODING => '',
|
||||||
|
CURLOPT_MAXREDIRS => 10,
|
||||||
|
CURLOPT_TIMEOUT => 0,
|
||||||
|
CURLOPT_FOLLOWLOCATION => true,
|
||||||
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||||
|
CURLOPT_CUSTOMREQUEST => 'POST',
|
||||||
|
CURLOPT_POSTFIELDS =>'{
|
||||||
|
"username": "'.env('MIMO_USERNAME').'",
|
||||||
|
"password": "'.env('MIMO_PASSWORD').'"
|
||||||
|
}',
|
||||||
|
CURLOPT_HTTPHEADER => array(
|
||||||
|
'Content-Type: application/json'
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
$response = curl_exec($curl);
|
||||||
|
|
||||||
|
curl_close($curl);
|
||||||
|
return json_decode($response)->token;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function sendMessage($text, $to, $token)
|
||||||
|
{
|
||||||
|
$curl = curl_init();
|
||||||
|
|
||||||
|
$fields = array(
|
||||||
|
"sender" => env("MIMO_SENDER_ID"),
|
||||||
|
"text" => $text,
|
||||||
|
"recipients" => $to
|
||||||
|
);
|
||||||
|
// dd($to);
|
||||||
|
curl_setopt_array($curl, array(
|
||||||
|
CURLOPT_URL => '52.30.114.86:8080/mimosms/v1/message/send?token='.$token,
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_ENCODING => '',
|
||||||
|
CURLOPT_MAXREDIRS => 10,
|
||||||
|
CURLOPT_TIMEOUT => 0,
|
||||||
|
CURLOPT_FOLLOWLOCATION => true,
|
||||||
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||||
|
CURLOPT_CUSTOMREQUEST => 'POST',
|
||||||
|
CURLOPT_POSTFIELDS => json_encode($fields),
|
||||||
|
CURLOPT_HTTPHEADER => array(
|
||||||
|
'Content-Type: application/json'
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
$response = curl_exec($curl);
|
||||||
|
// dd($response);
|
||||||
|
|
||||||
|
curl_close($curl);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function logout($token)
|
||||||
|
{
|
||||||
|
// dd('Hello world');
|
||||||
|
$curl = curl_init();
|
||||||
|
|
||||||
|
curl_setopt_array($curl, array(
|
||||||
|
CURLOPT_URL => '52.30.114.86:8080/mimosms/v1/user/logout?token='.$token,
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_ENCODING => '',
|
||||||
|
CURLOPT_MAXREDIRS => 10,
|
||||||
|
CURLOPT_TIMEOUT => 0,
|
||||||
|
CURLOPT_FOLLOWLOCATION => true,
|
||||||
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||||
|
CURLOPT_CUSTOMREQUEST => 'GET',
|
||||||
|
));
|
||||||
|
|
||||||
|
$response = curl_exec($curl);
|
||||||
|
|
||||||
|
curl_close($curl);
|
||||||
|
// dd($response, $token);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
78
temp/PLJ7vEAC2W/addons/otp_system/utility/SmsUtility.php
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Utility;
|
||||||
|
|
||||||
|
use App\Models\OtpConfiguration;
|
||||||
|
use App\Models\SmsTemplate;
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Services\SendSmsService;
|
||||||
|
|
||||||
|
class SmsUtility
|
||||||
|
{
|
||||||
|
public static function phone_number_verification($user = '')
|
||||||
|
{
|
||||||
|
$sms_template = SmsTemplate::where('identifier', 'phone_number_verification')->first();
|
||||||
|
$sms_body = $sms_template->sms_body;
|
||||||
|
$sms_body = str_replace('[[code]]', $user->verification_code, $sms_body);
|
||||||
|
$sms_body = str_replace('[[site_name]]', env('APP_NAME'), $sms_body);
|
||||||
|
$template_id = $sms_template->template_id;
|
||||||
|
|
||||||
|
(new SendSmsService())->sendSMS($user->phone, env('APP_NAME'), $sms_body, $template_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function password_reset($user = '')
|
||||||
|
{
|
||||||
|
$sms_template = SmsTemplate::where('identifier', 'password_reset')->first();
|
||||||
|
$sms_body = $sms_template->sms_body;
|
||||||
|
$sms_body = str_replace('[[code]]', $user->verification_code, $sms_body);
|
||||||
|
$template_id = $sms_template->template_id;
|
||||||
|
|
||||||
|
(new SendSmsService())->sendSMS($user->phone, env('APP_NAME'), $sms_body, $template_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function order_placement($phone = '', $order = '')
|
||||||
|
{
|
||||||
|
$sms_template = SmsTemplate::where('identifier', 'order_placement')->first();
|
||||||
|
$sms_body = $sms_template->sms_body;
|
||||||
|
$sms_body = str_replace('[[order_code]]', $order->code, $sms_body);
|
||||||
|
$template_id = $sms_template->template_id;
|
||||||
|
|
||||||
|
(new SendSmsService())->sendSMS($phone, env('APP_NAME'), $sms_body, $template_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function delivery_status_change($phone = '', $order)
|
||||||
|
{
|
||||||
|
$sms_template = SmsTemplate::where('identifier', 'delivery_status_change')->first();
|
||||||
|
$sms_body = $sms_template->sms_body;
|
||||||
|
$delivery_status = translate(ucfirst(str_replace('_', ' ', $order->delivery_status)));
|
||||||
|
|
||||||
|
$sms_body = str_replace('[[delivery_status]]', $delivery_status, $sms_body);
|
||||||
|
$sms_body = str_replace('[[order_code]]', $order->code, $sms_body);
|
||||||
|
$template_id = $sms_template->template_id;
|
||||||
|
|
||||||
|
(new SendSmsService())->sendSMS($phone, env('APP_NAME'), $sms_body, $template_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function payment_status_change($phone = '', $order = '')
|
||||||
|
{
|
||||||
|
$sms_template = SmsTemplate::where('identifier', 'payment_status_change')->first();
|
||||||
|
$sms_body = $sms_template->sms_body;
|
||||||
|
$sms_body = str_replace('[[payment_status]]', translate(ucfirst($order->payment_status)), $sms_body);
|
||||||
|
$sms_body = str_replace('[[order_code]]', $order->code, $sms_body);
|
||||||
|
$template_id = $sms_template->template_id;
|
||||||
|
|
||||||
|
(new SendSmsService())->sendSMS($phone, env('APP_NAME'), $sms_body, $template_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function assign_delivery_boy($phone = '', $code = '')
|
||||||
|
{
|
||||||
|
$sms_template = SmsTemplate::where('identifier', 'assign_delivery_boy')->first();
|
||||||
|
$sms_body = $sms_template->sms_body;
|
||||||
|
$sms_body = str_replace('[[order_code]]', $code, $sms_body);
|
||||||
|
$template_id = $sms_template->template_id;
|
||||||
|
|
||||||
|
(new SendSmsService())->sendSMS($phone, env('APP_NAME'), $sms_body, $template_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
@extends('backend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<h4 class="text-center text-muted">{{translate('Activate OTP')}}</h4>
|
||||||
|
<div class="row">
|
||||||
|
@foreach ($otp_configurations as $otp_configuration)
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="mb-0 h6">
|
||||||
|
{{translate(Str::replace('_', ' ',Str::title($otp_configuration->type)).' OTP')}}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body text-center">
|
||||||
|
<label class="aiz-switch aiz-switch-success mb-0">
|
||||||
|
<input type="checkbox" onchange='updateSettings(this, "{{ $otp_configuration->type }}")' @if($otp_configuration->value == 1) checked @endif>
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('script')
|
||||||
|
<script type="text/javascript">
|
||||||
|
function updateSettings(el, type){
|
||||||
|
if($(el).is(':checked')){
|
||||||
|
var value = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var value = 0;
|
||||||
|
}
|
||||||
|
$.post('{{ route('otp_configurations.update.activation') }}', {_token:'{{ csrf_token() }}', type:type, value:value}, function(data){
|
||||||
|
if(data == 1){
|
||||||
|
AIZ.plugins.notify('success', '{{ translate('Settings updated successfully') }}');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
@extends('backend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
@foreach ($otp_configurations as $otp_configuration)
|
||||||
|
@include('backend.otp_systems.configurations.partials.'.$otp_configuration->type)
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('script')
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#ZENDER_MODE").change(function() {
|
||||||
|
var value = $(this).val();
|
||||||
|
let changeVal = '';
|
||||||
|
if (value == "devices") {
|
||||||
|
changeVal = 'device';
|
||||||
|
} else {
|
||||||
|
changeVal = 'gateway';
|
||||||
|
}
|
||||||
|
$("#ZENDER_MODE_TYPE").val(changeVal).change();
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{ translate('Fast2SMS Credential') }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="fast2sms">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="AUTH_KEY">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('AUTH KEY') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="AUTH_KEY"
|
||||||
|
value="{{ env('AUTH_KEY') }}" placeholder="AUTH KEY" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ENTITY_ID">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ENTITY ID') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="ENTITY_ID"
|
||||||
|
value="{{ env('ENTITY_ID') }}" placeholder="{{ translate('Entity ID') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ROUTE">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ROUTE') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<select class="form-control aiz-selectpicker" name="ROUTE" required>
|
||||||
|
<option value="dlt_manual" @if (env('ROUTE') == 'dlt_manual') selected @endif>
|
||||||
|
{{ translate('DLT Manual') }}</option>
|
||||||
|
<option value="p" @if (env('ROUTE') == 'p') selected @endif>
|
||||||
|
{{ translate('Promotional Use') }}</option>
|
||||||
|
<option value="t" @if (env('ROUTE') == 't') selected @endif>
|
||||||
|
{{ translate('Transactional Use') }}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="LANGUAGE">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('LANGUAGE') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<select class="form-control aiz-selectpicker" name="LANGUAGE" required>
|
||||||
|
<option value="english" @if (env('LANGUAGE') == 'english') selected @endif>English
|
||||||
|
</option>
|
||||||
|
<option value="unicode" @if (env('LANGUAGE') == 'unicode') selected @endif>Unicode
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="SENDER_ID">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('SENDER ID') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="SENDER_ID"
|
||||||
|
value="{{ env('SENDER_ID') }}" placeholder="6 digit SENDER ID">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{ translate('MIMO Credential') }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="mimo">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MIMO_USERNAME">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MIMO_USERNAME') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MIMO_USERNAME"
|
||||||
|
value="{{ env('MIMO_USERNAME') }}" placeholder="MIMO_USERNAME" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MIMO_PASSWORD">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MIMO_PASSWORD') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MIMO_PASSWORD"
|
||||||
|
value="{{ env('MIMO_PASSWORD') }}" placeholder="MIMO_PASSWORD" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MIMO_SENDER_ID">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MIMO_SENDER_ID') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MIMO_SENDER_ID"
|
||||||
|
value="{{ env('MIMO_SENDER_ID') }}" placeholder="MIMO_SENDER_ID" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{ translate('MIMSMS Credential') }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="mimsms">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MIM_API_KEY">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MIM_API_KEY') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MIM_API_KEY"
|
||||||
|
value="{{ env('MIM_API_KEY') }}" placeholder="MIM_API_KEY" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MIM_SENDER_ID">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MIM_SENDER_ID') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MIM_SENDER_ID"
|
||||||
|
value="{{ env('MIM_SENDER_ID') }}" placeholder="MIM_SENDER_ID" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MIM_BASE_URL">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MIM_BASE_URL') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MIM_BASE_URL"
|
||||||
|
value="{{ env('MIM_BASE_URL') }}" placeholder="MIM_BASE_URL" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{ translate('MSEGAT Credential') }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="msegat">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MSEGAT_API_KEY">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MSEGAT_API_KEY') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MSEGAT_API_KEY"
|
||||||
|
value="{{ env('MSEGAT_API_KEY') }}" placeholder="MSEGAT_API_KEY" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MSEGAT_USERNAME">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MSEGAT_USERNAME') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MSEGAT_USERNAME"
|
||||||
|
value="{{ env('MSEGAT_USERNAME') }}" placeholder="MSEGAT_USERNAME" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MSEGAT_USER_SENDER">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MSEGAT_USER_SENDER') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MSEGAT_USER_SENDER"
|
||||||
|
value="{{ env('MSEGAT_USER_SENDER') }}" placeholder="MSEGAT_USER_SENDER" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{ translate('Nexmo Credential') }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="nexmo">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="NEXMO_KEY">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('NEXMO KEY') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="NEXMO_KEY" value="{{ env('NEXMO_KEY') }}"
|
||||||
|
placeholder="NEXMO KEY" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="NEXMO_SECRET">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('NEXMO SECRET') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="NEXMO_SECRET"
|
||||||
|
value="{{ env('NEXMO_SECRET') }}" placeholder="NEXMO SECRET" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="NEXMO_SENDER_ID">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{translate('NEXMO SENDER ID')}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<input type="text" class="form-control" name="NEXMO_SENDER_ID" value="{{ env('NEXMO_SENDER_ID') }}" placeholder="NEXMO SENDER ID" required>
|
||||||
|
<small>
|
||||||
|
{{translate('Please check this URL for')}}
|
||||||
|
<a href="https://developer.vonage.com/en/messaging/sms/guides/custom-sender-id?source=messaging">Sender Identity</a>
|
||||||
|
{{translate('before setting the sender ID')}}
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{ translate('SPARROW Credential') }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="sparrow">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="SPARROW_TOKEN">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('SPARROW_TOKEN') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="SPARROW_TOKEN"
|
||||||
|
value="{{ env('SPARROW_TOKEN') }}" placeholder="SPARROW_TOKEN" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="MESSGAE_FROM">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('MESSGAE_FROM') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="MESSGAE_FROM"
|
||||||
|
value="{{ env('MESSGAE_FROM') }}" placeholder="MESSGAE_FROM" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{ translate('SSL Wireless Credential') }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="ssl_wireless">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="SSL_SMS_API_TOKEN">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('SSL SMS API TOKEN') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="SSL_SMS_API_TOKEN"
|
||||||
|
value="{{ env('SSL_SMS_API_TOKEN') }}" placeholder="SSL SMS API TOKEN" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="SSL_SMS_SID">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('SSL SMS SID') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="SSL_SMS_SID"
|
||||||
|
value="{{ env('SSL_SMS_SID') }}" placeholder="SSL SMS SID" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="SSL_SMS_URL">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('SSL SMS URL') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="SSL_SMS_URL"
|
||||||
|
value="{{ env('SSL_SMS_URL') }}" placeholder="SSL SMS URL">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{ translate('Twilio Credential') }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="twillo">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="TWILIO_SID">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('TWILIO SID') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="TWILIO_SID" value="{{ env('TWILIO_SID') }}"
|
||||||
|
placeholder="TWILIO SID" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="TWILIO_AUTH_TOKEN">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('TWILIO AUTH TOKEN') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="TWILIO_AUTH_TOKEN"
|
||||||
|
value="{{ env('TWILIO_AUTH_TOKEN') }}" placeholder="TWILIO AUTH TOKEN" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="VALID_TWILLO_NUMBER">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('VALID TWILIO NUMBER') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="VALID_TWILLO_NUMBER"
|
||||||
|
value="{{ env('VALID_TWILLO_NUMBER') }}" placeholder="VALID TWILLO NUMBER">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="TWILLO_TYPE">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('TWILIO TYPE') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<select class="form-control" name="TWILLO_TYPE">
|
||||||
|
<option value="1" {{ env('TWILLO_TYPE') < 2 ? 'selected' : false }}>SMS</option>
|
||||||
|
<option value="2" {{ env('TWILLO_TYPE') > 1 ? 'selected' : false }}>WhatsApp</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">Zender Credential</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal" action="{{ route('update_credentials') }}" method="POST">
|
||||||
|
<input type="hidden" name="otp_method" value="zender">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ZENDER_SITEURL">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ZENDER_SITEURL') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="ZENDER_SITEURL"
|
||||||
|
value="{{ env('ZENDER_SITEURL') }}" placeholder="https://yourzendersite.com"
|
||||||
|
required>
|
||||||
|
<small>The site url of your Zender. Do not add ending slash.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ZENDER_APIKEY">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ZENDER_APIKEY') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="ZENDER_APIKEY"
|
||||||
|
value="{{ env('ZENDER_APIKEY') }}" placeholder="ZENDER_APIKEY" required>
|
||||||
|
<small>Your Zender API key. Please make sure that it is correct and required permissions are
|
||||||
|
granted: sms_send, wa_send</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ZENDER_SERVICE">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ZENDER_SERVICE') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<select class="form-control" name="ZENDER_SERVICE">
|
||||||
|
<option value="1" {{ env('ZENDER_SERVICE') < 2 ? 'selected' : false }}>SMS
|
||||||
|
</option>
|
||||||
|
<option value="2" {{ env('ZENDER_SERVICE') > 1 ? 'selected' : false }}>WhatsApp
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<small>Select the sending service. Please make sure that the API key has the following
|
||||||
|
permissions: sms_send, wa_send</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ZENDER_WHATSAPP">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ZENDER_WHATSAPP') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="ZENDER_WHATSAPP"
|
||||||
|
value="{{ env('ZENDER_WHATSAPP') }}" placeholder="ZENDER_WHATSAPP">
|
||||||
|
<small>For WhatsApp service only. WhatsApp account ID you want to use for sending.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ZENDER_DEVICE">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ZENDER_DEVICE') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="ZENDER_DEVICE"
|
||||||
|
value="{{ env('ZENDER_DEVICE') }}" placeholder="ZENDER_DEVICE">
|
||||||
|
<small>For SMS service only. Linked device unique ID. Please only enter this field if you
|
||||||
|
are sending using one of your devices.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ZENDER_GATEWAY">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ZENDER_GATEWAY') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<input type="text" class="form-control" name="ZENDER_GATEWAY"
|
||||||
|
value="{{ env('ZENDER_GATEWAY') }}" placeholder="ZENDER_GATEWAY">
|
||||||
|
<small>For SMS service only. Partner device unique ID or gateway ID. Please only enter this
|
||||||
|
field if you are sending using a partner device or third party gateway.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<input type="hidden" name="types[]" value="ZENDER_SIM">
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<label class="col-from-label">{{ translate('ZENDER_SIM') }}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<select class="form-control" name="ZENDER_SIM">
|
||||||
|
<option value="1" {{ env('ZENDER_SIM') < 2 ? 'selected' : false }}>SIM 1</option>
|
||||||
|
<option value="2" {{ env('ZENDER_SIM') > 1 ? 'selected' : false }}>SIM 2</option>
|
||||||
|
</select>
|
||||||
|
<small>For SMS service only. Select the sim slot you want to use for sending the messages.
|
||||||
|
Please only enter this field if you are sending using your device. This is ignored for
|
||||||
|
partner devices and third party gateways.</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-0 text-right">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">{{ translate('Save') }}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
@extends('backend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0 h6">{{translate('SMS Templates')}}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-3">
|
||||||
|
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
|
||||||
|
|
||||||
|
@foreach ($sms_templates as $key => $sms_template)
|
||||||
|
<a class="nav-link @if($sms_template->id == 1) active @endif" id="v-pills-tab-2" data-toggle="pill" href="#v-pills-{{ $sms_template->id }}" role="tab" aria-controls="v-pills-profile" aria-selected="false">{{ translate(ucwords(str_replace('_', ' ', $sms_template->identifier))) }}</a>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-9">
|
||||||
|
<div class="tab-content" id="v-pills-tabContent">
|
||||||
|
@foreach ($sms_templates as $key => $sms_template)
|
||||||
|
<div class="tab-pane fade show @if($sms_template->id == 1) active @endif" id="v-pills-{{ $sms_template->id }}" role="tabpanel" aria-labelledby="v-pills-tab-1">
|
||||||
|
<form action="{{ route('sms-templates.update', $sms_template->id) }}" method="POST">
|
||||||
|
<input name="_method" type="hidden" value="PATCH">
|
||||||
|
@csrf
|
||||||
|
@if($sms_template->identifier != 'phone_number_verification' && $sms_template->identifier != 'password_reset')
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-md-2">
|
||||||
|
<label class="col-from-label">{{translate('Activation')}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<label class="aiz-switch aiz-switch-success mb-0">
|
||||||
|
<input value="1" name="status" type="checkbox" @if ($sms_template->status == 1)
|
||||||
|
checked
|
||||||
|
@endif>
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-2 col-form-label">{{translate('SMS Body')}}</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<textarea name="body" class="form-control" placeholder="Type.." rows="6" required>{{ $sms_template->sms_body }}</textarea>
|
||||||
|
<small class="form-text text-danger">{{ ('**N.B : Do Not Change The Variables Like [[ ____ ]].**') }}</small>
|
||||||
|
@error('body')
|
||||||
|
<small class="form-text text-danger">{{ $message }}</small>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-2 col-form-label">{{translate('Template ID')}}</label>
|
||||||
|
<div class="col-md-10">
|
||||||
|
<input type="text" name="template_id" value="{{ $sms_template->template_id }}" class="form-control" placeholder="{{translate('Template Id')}}">
|
||||||
|
<small class="form-text text-danger">{{ ('**N.B : Template ID is Required Only for Fast2SMS DLT Manual**') }}</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-3 text-right">
|
||||||
|
<button type="submit" class="btn btn-primary">{{translate('Update Settings')}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
@extends('frontend.layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<section class="py-4">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6 col-xl-5 mx-auto">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h1 class="h3 fw-600">{{ translate('Reset Password') }}</h1>
|
||||||
|
<p class="mb-4">{{translate('Enter your phone, code and new password and confirm password.')}} </p>
|
||||||
|
<form method="POST" action="{{ route('password.update.phone') }}">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input id="phone-code" type="text" class="form-control" name="phone"
|
||||||
|
placeholder="{{ translate('Phone Number') }}" required>
|
||||||
|
<span class="invalid-phone-feedback text-danger" role="alert">
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" id="country_code" name="country_code" value="">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input id="email" type="text" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="code" value="{{ $email ?? old('email') }}" placeholder="Code" required autofocus>
|
||||||
|
|
||||||
|
@if ($errors->has('email'))
|
||||||
|
<span class="invalid-feedback" role="alert">
|
||||||
|
<strong>{{ $errors->first('email') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="New Password" required>
|
||||||
|
|
||||||
|
@if ($errors->has('password'))
|
||||||
|
<span class="invalid-feedback" role="alert">
|
||||||
|
<strong>{{ $errors->first('password') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary btn-block">
|
||||||
|
{{ translate('Reset Password') }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endsection
|
||||||
|
@section('script')
|
||||||
|
<script type="text/javascript">
|
||||||
|
var isPhoneShown = true,
|
||||||
|
countryData = window.intlTelInputGlobals.getCountryData(),
|
||||||
|
input = document.querySelector("#phone-code");
|
||||||
|
|
||||||
|
for (var i = 0; i < countryData.length; i++) {
|
||||||
|
var country = countryData[i];
|
||||||
|
if(country.iso2 == 'bd'){
|
||||||
|
country.dialCode = '88';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var iti = intlTelInput(input, {
|
||||||
|
separateDialCode: true,
|
||||||
|
utilsScript: "{{ static_asset('assets/js/intlTelutils.js') }}?1590403638580",
|
||||||
|
onlyCountries: @php echo json_encode(\App\Models\Country::where('status', 1)->pluck('code')->toArray()) @endphp,
|
||||||
|
customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) {
|
||||||
|
if(selectedCountryData.iso2 == 'bd'){
|
||||||
|
return "01xxxxxxxxx";
|
||||||
|
}
|
||||||
|
return selectedCountryPlaceholder;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var country = iti.getSelectedCountryData();
|
||||||
|
$('input[name=country_code]').val(country.dialCode);
|
||||||
|
|
||||||
|
input.addEventListener("countrychange", function(e) {
|
||||||
|
// var currentMask = e.currentTarget.placeholder;
|
||||||
|
|
||||||
|
var country = iti.getSelectedCountryData();
|
||||||
|
$('input[name=country_code]').val(country.dialCode);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||