3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,9 +1,10 @@
|
|||||||
# Please try and keep this file organized by alphabetical order. Single files first, then directories.
|
# Please try and keep this file organized by alphabetical order. Single files first, then directories.
|
||||||
.env
|
.env
|
||||||
|
.phpunit.result.cache
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
Homestead.json
|
Homestead.json
|
||||||
/config/lfm.php
|
/config/lfm.php
|
||||||
/nbproject/private/
|
/nbproject/*
|
||||||
/node_modules
|
/node_modules
|
||||||
/public/error_log
|
/public/error_log
|
||||||
/public/lb-faveo/media/
|
/public/lb-faveo/media/
|
||||||
|
@@ -3,9 +3,8 @@ language: php
|
|||||||
|
|
||||||
# Versions of PHP you want your project run with.
|
# Versions of PHP you want your project run with.
|
||||||
php:
|
php:
|
||||||
- 5.5
|
- 7.1
|
||||||
- 5.6
|
- 7.2
|
||||||
- hhvm
|
|
||||||
|
|
||||||
# Commands to be run before your environment runs.
|
# Commands to be run before your environment runs.
|
||||||
before_script:
|
before_script:
|
||||||
@@ -20,7 +19,6 @@ script: phpunit
|
|||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: 5.5
|
- php: 5.5
|
||||||
- php: hhvm
|
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
# Customize when the notification emails are sent.
|
# Customize when the notification emails are sent.
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
-- phpMyAdmin SQL Dump
|
-- phpMyAdmin SQL Dump
|
||||||
-- version 4.6.4
|
-- version 4.6.6deb5
|
||||||
-- https://www.phpmyadmin.net/
|
-- https://www.phpmyadmin.net/
|
||||||
--
|
--
|
||||||
-- Host: 127.0.0.1
|
-- Host: localhost:3306
|
||||||
-- Generation Time: Jan 03, 2017 at 06:22 AM
|
-- Generation Time: Aug 16, 2018 at 04:58 PM
|
||||||
-- Server version: 5.7.14
|
-- Server version: 5.7.22-0ubuntu0.17.10.1
|
||||||
-- PHP Version: 5.6.25
|
-- PHP Version: 7.2.7-1+ubuntu17.10.1+deb.sury.org+1
|
||||||
|
|
||||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
SET time_zone = "+00:00";
|
SET time_zone = "+00:00";
|
||||||
@@ -17,7 +17,7 @@ SET time_zone = "+00:00";
|
|||||||
/*!40101 SET NAMES utf8mb4 */;
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Database: `final`
|
-- Database: `test`
|
||||||
--
|
--
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
@@ -68,7 +68,7 @@ CREATE TABLE `bar_notifications` (
|
|||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `bar_notifications` (`id`, `key`, `value`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `bar_notifications` (`id`, `key`, `value`, `created_at`, `updated_at`) VALUES
|
||||||
(1, 'new-version', '', '2016-12-13 03:20:32', '2016-12-13 03:20:32');
|
(2, 'new-version', '', '2018-08-16 05:58:15', '2018-08-16 05:58:15');
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -112,7 +112,8 @@ INSERT INTO `common_settings` (`id`, `option_name`, `option_value`, `status`, `o
|
|||||||
(4, 'user_set_ticket_status', '', '1', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(4, 'user_set_ticket_status', '', '1', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(5, 'send_otp', '', '0', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(5, 'send_otp', '', '0', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(6, 'email_mandatory', '', '1', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(6, 'email_mandatory', '', '1', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(7, 'user_priority', '', '0', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52');
|
(7, 'user_priority', '', '0', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
|
(8, 'dummy_data_installation', '', '1', '', NULL, NULL);
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -521,7 +522,7 @@ CREATE TABLE `emails` (
|
|||||||
`department` int(10) UNSIGNED DEFAULT NULL,
|
`department` int(10) UNSIGNED DEFAULT NULL,
|
||||||
`priority` int(10) UNSIGNED DEFAULT NULL,
|
`priority` int(10) UNSIGNED DEFAULT NULL,
|
||||||
`help_topic` int(10) UNSIGNED DEFAULT NULL,
|
`help_topic` int(10) UNSIGNED DEFAULT NULL,
|
||||||
`user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`user_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`fetching_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`fetching_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`fetching_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`fetching_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
@@ -737,7 +738,7 @@ CREATE TABLE `kb_article` (
|
|||||||
INSERT INTO `kb_article` (`id`, `name`, `slug`, `description`, `status`, `type`, `publish_time`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `kb_article` (`id`, `name`, `slug`, `description`, `status`, `type`, `publish_time`, `created_at`, `updated_at`) VALUES
|
||||||
(1, 'DISCLAIMERS', 'disclaimers', '<p>ABC clothing.com does not promise that the site will be inoffensive, error-free or uninterrupted, or that it will provide specific information from use of the site or any content, search, or link on it. The site and its content are delivered on an “as-is” and “as-available” basis. ABC clothing.com cannot ensure that files you download from the site will be free of viruses or contamination or destructive features.</p>\r\n\r\n<p>Thebclothing.com disclaims all warranties, express or implied, including any implied warranties of merchantability and fitness for a particular purpose. ABC clothing.com will not be liable for any damages of any kind arising from the use of this site, including, without limitation, direct, indirect, incidental, and punitive and consequential damages.</p>\r\n\r\n<p>ABC clothing.com disclaims any and all liability for the acts, omissions, and conduct of any third-party users, ABC clothing.com users, advertisers, and/or sponsors on the Site, in connection with the Site, or other-wise related to your use of the Site. ABC clothing.com is not responsible for the products, services, actions, or failure to act of any third party in connection with or referenced on the Site. Without limiting the fore-going, you may report the misconduct of users and/or third-party advertisers or service and/or product providers referenced on or included in the Site to ABC clothing.com at Support@abcclothing.com</p>\r\n\r\n<p>ABC clothing.com may investigate the claim and take appropriate action, at its sole discretion.</p>\r\n\r\n<p>For any query kindly drop mail us on Support@abcclothing.com.</p>\r\n', 1, 1, '2016-12-13 08:54:00', '2016-12-13 03:25:28', '2016-12-13 03:25:28'),
|
(1, 'DISCLAIMERS', 'disclaimers', '<p>ABC clothing.com does not promise that the site will be inoffensive, error-free or uninterrupted, or that it will provide specific information from use of the site or any content, search, or link on it. The site and its content are delivered on an “as-is” and “as-available” basis. ABC clothing.com cannot ensure that files you download from the site will be free of viruses or contamination or destructive features.</p>\r\n\r\n<p>Thebclothing.com disclaims all warranties, express or implied, including any implied warranties of merchantability and fitness for a particular purpose. ABC clothing.com will not be liable for any damages of any kind arising from the use of this site, including, without limitation, direct, indirect, incidental, and punitive and consequential damages.</p>\r\n\r\n<p>ABC clothing.com disclaims any and all liability for the acts, omissions, and conduct of any third-party users, ABC clothing.com users, advertisers, and/or sponsors on the Site, in connection with the Site, or other-wise related to your use of the Site. ABC clothing.com is not responsible for the products, services, actions, or failure to act of any third party in connection with or referenced on the Site. Without limiting the fore-going, you may report the misconduct of users and/or third-party advertisers or service and/or product providers referenced on or included in the Site to ABC clothing.com at Support@abcclothing.com</p>\r\n\r\n<p>ABC clothing.com may investigate the claim and take appropriate action, at its sole discretion.</p>\r\n\r\n<p>For any query kindly drop mail us on Support@abcclothing.com.</p>\r\n', 1, 1, '2016-12-13 08:54:00', '2016-12-13 03:25:28', '2016-12-13 03:25:28'),
|
||||||
(2, 'CUSTOM ORDER', 'custom-order', '<p>You saw, you liked but couldn’t see your size? We will custom make it for you.</p>\r\n\r\n<p><strong>How it works:</strong></p>\r\n\r\n<ol><li>You liked something and want to modify a little or have something else on mind, do pen it down and share it with us on Support@abcclothing.com</li>\r\n <li>We’ll work out the price depending on how detailed or intricate you want your garment.</li>\r\n <li>An advance would be required for any customized orders.</li>\r\n <li>Once you’ve placed a deposit, we’ll make you a sketch of the garment.</li>\r\n <li>We can complete your order in 15-20 days depending on the workload.</li>\r\n <li>We will also share some updates on the garment in case something needs to be changed.</li>\r\n <li>We finally ship it to your given address.</li>\r\n</ol><p><strong>Note:</strong> No returns and refunds.</p>\r\n', 1, 1, '2016-12-13 08:56:00', '2016-12-13 03:26:24', '2016-12-13 03:26:24'),
|
(2, 'CUSTOM ORDER', 'custom-order', '<p>You saw, you liked but couldn’t see your size? We will custom make it for you.</p>\r\n\r\n<p><strong>How it works:</strong></p>\r\n\r\n<ol><li>You liked something and want to modify a little or have something else on mind, do pen it down and share it with us on Support@abcclothing.com</li>\r\n <li>We’ll work out the price depending on how detailed or intricate you want your garment.</li>\r\n <li>An advance would be required for any customized orders.</li>\r\n <li>Once you’ve placed a deposit, we’ll make you a sketch of the garment.</li>\r\n <li>We can complete your order in 15-20 days depending on the workload.</li>\r\n <li>We will also share some updates on the garment in case something needs to be changed.</li>\r\n <li>We finally ship it to your given address.</li>\r\n</ol><p><strong>Note:</strong> No returns and refunds.</p>\r\n', 1, 1, '2016-12-13 08:56:00', '2016-12-13 03:26:24', '2016-12-13 03:26:24'),
|
||||||
(3, 'TROUSER SKIRTS', 'trouser-skirts', '<p>Paris takes its fashion very, very seriously. So seriously, in fact, that wearing the wrong thing has actually caused a riot.</p>\r\n\r\n<p>In 1911, two rival Parisian couture houses launched their "trouser skirts," an innovation in fashion that trod the very fixed line between the genders and seemed to promise greater flexibility for women in general. There were two different versions of the trouser skirt: One was a sort of baggy pant with a very low hanging crotch, described as "a sack with holes made for the legs to go through," not unlike the fashions on high streets today, and the other a pair of the same kind of pants topped with an over-skirt, again, not unlike high street fashions of today. Both versions were launched by models at the opening day of racing season to general revulsion and disgust, but thankfully, no violence.</p>\r\n\r\n<p>It wasn\'t until the ladies attempted to promenade their future fashions on the boulevards that the fisticuffs started—at the Place de l\'Opera, the poor models were attacked by a jeering mob of fashion Philistines, who pulled their hair, trampled their hats, and reduced them to tears. A squad of police officers on bicycles were dispatched to rescue the girls and escort them to safety.</p>\r\n', 1, 1, '2016-12-13 08:56:00', '2016-12-13 03:27:02', '2016-12-13 03:27:02'),
|
(3, 'TROUSER SKIRTS', 'trouser-skirts', '<p>Paris takes its fashion very, very seriously. So seriously, in fact, that wearing the wrong thing has actually caused a riot.</p>\r\n\r\n<p>In 1911, two rival Parisian couture houses launched their \"trouser skirts,\" an innovation in fashion that trod the very fixed line between the genders and seemed to promise greater flexibility for women in general. There were two different versions of the trouser skirt: One was a sort of baggy pant with a very low hanging crotch, described as \"a sack with holes made for the legs to go through,\" not unlike the fashions on high streets today, and the other a pair of the same kind of pants topped with an over-skirt, again, not unlike high street fashions of today. Both versions were launched by models at the opening day of racing season to general revulsion and disgust, but thankfully, no violence.</p>\r\n\r\n<p>It wasn\'t until the ladies attempted to promenade their future fashions on the boulevards that the fisticuffs started—at the Place de l\'Opera, the poor models were attacked by a jeering mob of fashion Philistines, who pulled their hair, trampled their hats, and reduced them to tears. A squad of police officers on bicycles were dispatched to rescue the girls and escort them to safety.</p>\r\n', 1, 1, '2016-12-13 08:56:00', '2016-12-13 03:27:02', '2016-12-13 03:27:02'),
|
||||||
(4, 'SECURE SHOPPING GUARANTEE', 'secure-shopping-guarantee', '<p>We accept all major Indian and International Credit/ Debit Cards, and Net Banking with over 40 Banks.</p>\r\n\r\n<p>NO Cash on Delivery (as random people order and share false addresses for fun)</p>\r\n\r\n<p>Yes, shopping at our e-store is 100% safe. All payment requests are directed to the secured PayU Payment Gateway. This gives you the highest level of protection possible whenever you use credit cards or make other financial or confidential transactions over the Internet.</p>\r\n\r\n<p>You can be assured that our e-store offers you the highest standards of security currently available on the net so as to ensure that your shopping experience is private, safe and secure.</p>\r\n', 1, 1, '2016-12-13 08:57:00', '2016-12-13 03:27:42', '2016-12-13 03:27:42'),
|
(4, 'SECURE SHOPPING GUARANTEE', 'secure-shopping-guarantee', '<p>We accept all major Indian and International Credit/ Debit Cards, and Net Banking with over 40 Banks.</p>\r\n\r\n<p>NO Cash on Delivery (as random people order and share false addresses for fun)</p>\r\n\r\n<p>Yes, shopping at our e-store is 100% safe. All payment requests are directed to the secured PayU Payment Gateway. This gives you the highest level of protection possible whenever you use credit cards or make other financial or confidential transactions over the Internet.</p>\r\n\r\n<p>You can be assured that our e-store offers you the highest standards of security currently available on the net so as to ensure that your shopping experience is private, safe and secure.</p>\r\n', 1, 1, '2016-12-13 08:57:00', '2016-12-13 03:27:42', '2016-12-13 03:27:42'),
|
||||||
(5, 'PRIVACY POLICY', 'privacy-policy', '<p>The ABC Clothing collects your basic information to service your requests. This basic information is gathered when you purchase products/Gift card vouchers or when you sign up for e-mail notifications. Information gathered from you includes your name, mailing address, e-mail and phone number. Only when you place an order, your card information is requested and is submitted via the highest level of encryption to make sure of the greatest amount of safety and security. Reason why we gather this information:</p>\r\n\r\n<p><strong>To process your order</strong>.<br />\r\nShipping and Customer Service.<br />\r\nWe also use the information to upgrade our products, customer services, website content and navigation.</p>\r\n\r\n<p><br /><strong>Internal Record Keeping</strong>.<br />\r\nWe at The ABC Clothing respect that you do not want your personal information shared with other companies. The information you provide shall, therefore, be only used to process your order and customer support. The ABC Clothing does not share, sell or rent customer information to any other company.</p>\r\n', 1, 1, '2016-12-13 08:58:00', '2016-12-13 03:28:31', '2016-12-13 03:28:31'),
|
(5, 'PRIVACY POLICY', 'privacy-policy', '<p>The ABC Clothing collects your basic information to service your requests. This basic information is gathered when you purchase products/Gift card vouchers or when you sign up for e-mail notifications. Information gathered from you includes your name, mailing address, e-mail and phone number. Only when you place an order, your card information is requested and is submitted via the highest level of encryption to make sure of the greatest amount of safety and security. Reason why we gather this information:</p>\r\n\r\n<p><strong>To process your order</strong>.<br />\r\nShipping and Customer Service.<br />\r\nWe also use the information to upgrade our products, customer services, website content and navigation.</p>\r\n\r\n<p><br /><strong>Internal Record Keeping</strong>.<br />\r\nWe at The ABC Clothing respect that you do not want your personal information shared with other companies. The information you provide shall, therefore, be only used to process your order and customer support. The ABC Clothing does not share, sell or rent customer information to any other company.</p>\r\n', 1, 1, '2016-12-13 08:58:00', '2016-12-13 03:28:31', '2016-12-13 03:28:31'),
|
||||||
(6, ' SHIPPING POLICY', 'shipping-policy', '<p>We ship worldwide. We use FedEx/DTDC for shipping.</p>\r\n\r\n<p>Standard Shipping is usually 3-7 Working days for orders within India and 12-15 Working days for International Orders, but usually faster. IF your order doesn’t reach you in time, you may write to us at support@abcclothing.com</p>\r\n\r\n<p><strong>International Orders</strong></p>\r\n\r\n<p>For international orders, please note, your shipping will be calculated at the time of Check out only, this is a System Generated amount, based on your Zip Code, Region and Order Weight. (Approx Costs Rs.1250-1500 for 500 gms – International Shipment, subject to region)</p>\r\n\r\n<p><strong>Tracking</strong></p>\r\n\r\n<p>For tracking your order go to the following website, it will require your tracking ID which is sent via mail in your invoice.</p>\r\n', 1, 1, '2016-12-13 08:58:00', '2016-12-13 03:29:34', '2016-12-13 03:29:34'),
|
(6, ' SHIPPING POLICY', 'shipping-policy', '<p>We ship worldwide. We use FedEx/DTDC for shipping.</p>\r\n\r\n<p>Standard Shipping is usually 3-7 Working days for orders within India and 12-15 Working days for International Orders, but usually faster. IF your order doesn’t reach you in time, you may write to us at support@abcclothing.com</p>\r\n\r\n<p><strong>International Orders</strong></p>\r\n\r\n<p>For international orders, please note, your shipping will be calculated at the time of Check out only, this is a System Generated amount, based on your Zip Code, Region and Order Weight. (Approx Costs Rs.1250-1500 for 500 gms – International Shipment, subject to region)</p>\r\n\r\n<p><strong>Tracking</strong></p>\r\n\r\n<p>For tracking your order go to the following website, it will require your tracking ID which is sent via mail in your invoice.</p>\r\n', 1, 1, '2016-12-13 08:58:00', '2016-12-13 03:29:34', '2016-12-13 03:29:34'),
|
||||||
@@ -976,112 +977,113 @@ INSERT INTO `mail_services` (`id`, `name`, `short_name`, `created_at`, `updated_
|
|||||||
|
|
||||||
CREATE TABLE `migrations` (
|
CREATE TABLE `migrations` (
|
||||||
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`batch` int(11) NOT NULL
|
`batch` int(11) NOT NULL,
|
||||||
|
`id` int(11) NOT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `migrations`
|
-- Dumping data for table `migrations`
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `migrations` (`migration`, `batch`) VALUES
|
INSERT INTO `migrations` (`migration`, `batch`, `id`) VALUES
|
||||||
('2016_02_16_140450_create_banlist_table', 1),
|
('2016_02_16_140450_create_banlist_table', 1, 1),
|
||||||
('2016_02_16_140450_create_canned_response_table', 1),
|
('2016_02_16_140450_create_canned_response_table', 1, 2),
|
||||||
('2016_02_16_140450_create_custom_form_fields_table', 1),
|
('2016_02_16_140450_create_custom_form_fields_table', 1, 3),
|
||||||
('2016_02_16_140450_create_custom_forms_table', 1),
|
('2016_02_16_140450_create_custom_forms_table', 1, 4),
|
||||||
('2016_02_16_140450_create_date_format_table', 1),
|
('2016_02_16_140450_create_date_format_table', 1, 5),
|
||||||
('2016_02_16_140450_create_date_time_format_table', 1),
|
('2016_02_16_140450_create_date_time_format_table', 1, 6),
|
||||||
('2016_02_16_140450_create_department_table', 1),
|
('2016_02_16_140450_create_department_table', 1, 7),
|
||||||
('2016_02_16_140450_create_emails_table', 1),
|
('2016_02_16_140450_create_emails_table', 1, 8),
|
||||||
('2016_02_16_140450_create_group_assign_department_table', 1),
|
('2016_02_16_140450_create_group_assign_department_table', 1, 9),
|
||||||
('2016_02_16_140450_create_groups_table', 1),
|
('2016_02_16_140450_create_groups_table', 1, 10),
|
||||||
('2016_02_16_140450_create_help_topic_table', 1),
|
('2016_02_16_140450_create_help_topic_table', 1, 11),
|
||||||
('2016_02_16_140450_create_kb_article_relationship_table', 1),
|
('2016_02_16_140450_create_kb_article_relationship_table', 1, 12),
|
||||||
('2016_02_16_140450_create_kb_article_table', 1),
|
('2016_02_16_140450_create_kb_article_table', 1, 13),
|
||||||
('2016_02_16_140450_create_kb_category_table', 1),
|
('2016_02_16_140450_create_kb_category_table', 1, 14),
|
||||||
('2016_02_16_140450_create_kb_comment_table', 1),
|
('2016_02_16_140450_create_kb_comment_table', 1, 15),
|
||||||
('2016_02_16_140450_create_kb_pages_table', 1),
|
('2016_02_16_140450_create_kb_pages_table', 1, 16),
|
||||||
('2016_02_16_140450_create_kb_settings_table', 1),
|
('2016_02_16_140450_create_kb_settings_table', 1, 17),
|
||||||
('2016_02_16_140450_create_languages_table', 1),
|
('2016_02_16_140450_create_languages_table', 1, 18),
|
||||||
('2016_02_16_140450_create_log_notification_table', 1),
|
('2016_02_16_140450_create_log_notification_table', 1, 19),
|
||||||
('2016_02_16_140450_create_mailbox_protocol_table', 1),
|
('2016_02_16_140450_create_mailbox_protocol_table', 1, 20),
|
||||||
('2016_02_16_140450_create_organization_table', 1),
|
('2016_02_16_140450_create_organization_table', 1, 21),
|
||||||
('2016_02_16_140450_create_password_resets_table', 1),
|
('2016_02_16_140450_create_password_resets_table', 1, 22),
|
||||||
('2016_02_16_140450_create_plugins_table', 1),
|
('2016_02_16_140450_create_plugins_table', 1, 23),
|
||||||
('2016_02_16_140450_create_settings_alert_notice_table', 1),
|
('2016_02_16_140450_create_settings_alert_notice_table', 1, 24),
|
||||||
('2016_02_16_140450_create_settings_auto_response_table', 1),
|
('2016_02_16_140450_create_settings_auto_response_table', 1, 25),
|
||||||
('2016_02_16_140450_create_settings_company_table', 1),
|
('2016_02_16_140450_create_settings_company_table', 1, 26),
|
||||||
('2016_02_16_140450_create_settings_email_table', 1),
|
('2016_02_16_140450_create_settings_email_table', 1, 27),
|
||||||
('2016_02_16_140450_create_settings_ratings_table', 1),
|
('2016_02_16_140450_create_settings_ratings_table', 1, 28),
|
||||||
('2016_02_16_140450_create_settings_system_table', 1),
|
('2016_02_16_140450_create_settings_system_table', 1, 29),
|
||||||
('2016_02_16_140450_create_settings_ticket_table', 1),
|
('2016_02_16_140450_create_settings_ticket_table', 1, 30),
|
||||||
('2016_02_16_140450_create_sla_plan_table', 1),
|
('2016_02_16_140450_create_sla_plan_table', 1, 31),
|
||||||
('2016_02_16_140450_create_team_assign_agent_table', 1),
|
('2016_02_16_140450_create_team_assign_agent_table', 1, 32),
|
||||||
('2016_02_16_140450_create_teams_table', 1),
|
('2016_02_16_140450_create_teams_table', 1, 33),
|
||||||
('2016_02_16_140450_create_template_table', 1),
|
('2016_02_16_140450_create_template_table', 1, 34),
|
||||||
('2016_02_16_140450_create_ticket_attachment_table', 1),
|
('2016_02_16_140450_create_ticket_attachment_table', 1, 35),
|
||||||
('2016_02_16_140450_create_ticket_collaborator_table', 1),
|
('2016_02_16_140450_create_ticket_collaborator_table', 1, 36),
|
||||||
('2016_02_16_140450_create_ticket_form_data_table', 1),
|
('2016_02_16_140450_create_ticket_form_data_table', 1, 37),
|
||||||
('2016_02_16_140450_create_ticket_priority_table', 1),
|
('2016_02_16_140450_create_ticket_priority_table', 1, 38),
|
||||||
('2016_02_16_140450_create_ticket_source_table', 1),
|
('2016_02_16_140450_create_ticket_source_table', 1, 39),
|
||||||
('2016_02_16_140450_create_ticket_status_table', 1),
|
('2016_02_16_140450_create_ticket_status_table', 1, 40),
|
||||||
('2016_02_16_140450_create_ticket_thread_table', 1),
|
('2016_02_16_140450_create_ticket_thread_table', 1, 41),
|
||||||
('2016_02_16_140450_create_tickets_table', 1),
|
('2016_02_16_140450_create_tickets_table', 1, 42),
|
||||||
('2016_02_16_140450_create_time_format_table', 1),
|
('2016_02_16_140450_create_time_format_table', 1, 43),
|
||||||
('2016_02_16_140450_create_timezone_table', 1),
|
('2016_02_16_140450_create_timezone_table', 1, 44),
|
||||||
('2016_02_16_140450_create_user_assign_organization_table', 1),
|
('2016_02_16_140450_create_user_assign_organization_table', 1, 45),
|
||||||
('2016_02_16_140450_create_users_table', 1),
|
('2016_02_16_140450_create_users_table', 1, 46),
|
||||||
('2016_02_16_140450_create_version_check_table', 1),
|
('2016_02_16_140450_create_version_check_table', 1, 47),
|
||||||
('2016_02_16_140450_create_widgets_table', 1),
|
('2016_02_16_140450_create_widgets_table', 1, 48),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_canned_response_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_canned_response_table', 1, 49),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_department_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_department_table', 1, 50),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_emails_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_emails_table', 1, 51),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_group_assign_department_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_group_assign_department_table', 1, 52),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_help_topic_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_help_topic_table', 1, 53),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_kb_article_relationship_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_kb_article_relationship_table', 1, 54),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_kb_comment_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_kb_comment_table', 1, 55),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_organization_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_organization_table', 1, 56),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_settings_system_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_settings_system_table', 1, 57),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_team_assign_agent_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_team_assign_agent_table', 1, 58),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_teams_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_teams_table', 1, 59),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_ticket_attachment_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_ticket_attachment_table', 1, 60),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_ticket_collaborator_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_ticket_collaborator_table', 1, 61),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_ticket_form_data_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_ticket_form_data_table', 1, 62),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_ticket_thread_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_ticket_thread_table', 1, 63),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_tickets_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_tickets_table', 1, 64),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_user_assign_organization_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_user_assign_organization_table', 1, 65),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_users_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_users_table', 1, 66),
|
||||||
('2016_03_31_061239_create_notifications_table', 1),
|
('2016_03_31_061239_create_notifications_table', 1, 67),
|
||||||
('2016_03_31_061534_create_notification_types_table', 1),
|
('2016_03_31_061534_create_notification_types_table', 1, 68),
|
||||||
('2016_03_31_061740_create_user_notification_table', 1),
|
('2016_03_31_061740_create_user_notification_table', 1, 69),
|
||||||
('2016_04_18_115852_create_workflow_name_table', 1),
|
('2016_04_18_115852_create_workflow_name_table', 1, 70),
|
||||||
('2016_04_18_115900_create_workflow_rule_table', 1),
|
('2016_04_18_115900_create_workflow_rule_table', 1, 71),
|
||||||
('2016_04_18_115908_create_workflow_action_table', 1),
|
('2016_04_18_115908_create_workflow_action_table', 1, 72),
|
||||||
('2016_05_10_102423_create_country_code_table', 1),
|
('2016_05_10_102423_create_country_code_table', 1, 73),
|
||||||
('2016_05_10_102604_create_bar_notifications_table', 1),
|
('2016_05_10_102604_create_bar_notifications_table', 1, 74),
|
||||||
('2016_05_11_105244_create_api_settings_table', 1),
|
('2016_05_11_105244_create_api_settings_table', 1, 75),
|
||||||
('2016_05_19_055008_create_workflow_close_table', 1),
|
('2016_05_19_055008_create_workflow_close_table', 1, 76),
|
||||||
('2016_06_02_072210_create_common_settings_table', 1),
|
('2016_06_02_072210_create_common_settings_table', 1, 77),
|
||||||
('2016_06_02_074913_create_login_attempts_table', 1),
|
('2016_06_02_074913_create_login_attempts_table', 1, 78),
|
||||||
('2016_06_02_080005_create_ratings_table', 1),
|
('2016_06_02_080005_create_ratings_table', 1, 79),
|
||||||
('2016_06_02_081020_create_rating_ref_table', 1),
|
('2016_06_02_081020_create_rating_ref_table', 1, 80),
|
||||||
('2016_06_02_090225_create_settings_security_table', 1),
|
('2016_06_02_090225_create_settings_security_table', 1, 81),
|
||||||
('2016_06_02_090628_create_templates_table', 1),
|
('2016_06_02_090628_create_templates_table', 1, 82),
|
||||||
('2016_06_02_094409_create_template_sets_table', 1),
|
('2016_06_02_094409_create_template_sets_table', 1, 83),
|
||||||
('2016_06_02_094420_create_template_types_table', 1),
|
('2016_06_02_094420_create_template_types_table', 1, 84),
|
||||||
('2016_06_02_095357_create_ticket_token_table', 1),
|
('2016_06_02_095357_create_ticket_token_table', 1, 85),
|
||||||
('2016_06_28_141613_version1079table', 1),
|
('2016_06_28_141613_version1079table', 1, 86),
|
||||||
('2016_07_02_051247_create_jobs_table', 1),
|
('2016_07_02_051247_create_jobs_table', 1, 87),
|
||||||
('2016_07_02_051439_create_failed_jobs_table', 1),
|
('2016_07_02_051439_create_failed_jobs_table', 1, 88),
|
||||||
('2016_07_19_071910_create_field_values_table', 1),
|
('2016_07_19_071910_create_field_values_table', 1, 89),
|
||||||
('2016_07_26_084458_create_faveo_mails_table', 1),
|
('2016_07_26_084458_create_faveo_mails_table', 1, 90),
|
||||||
('2016_07_26_090201_create_faveo_queues_table', 1),
|
('2016_07_26_090201_create_faveo_queues_table', 1, 91),
|
||||||
('2016_07_26_094753_create_mail_services_table', 1),
|
('2016_07_26_094753_create_mail_services_table', 1, 92),
|
||||||
('2016_07_26_095020_create_queue_services_table', 1),
|
('2016_07_26_095020_create_queue_services_table', 1, 93),
|
||||||
('2016_07_29_113012_create_conditions_table', 1),
|
('2016_07_29_113012_create_conditions_table', 1, 94),
|
||||||
('2016_08_08_095744_create_social_media_table', 1),
|
('2016_08_08_095744_create_social_media_table', 1, 95),
|
||||||
('2016_08_12_104410_create_user_additional_infos_table', 1),
|
('2016_08_12_104410_create_user_additional_infos_table', 1, 96),
|
||||||
('2016_08_16_104539_alter_ticket_source_table', 1),
|
('2016_08_16_104539_alter_ticket_source_table', 1, 97),
|
||||||
('2016_11_30_122809_alter_attachment_table', 2);
|
('2016_11_30_122809_alter_attachment_table', 2, 98);
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -1628,7 +1630,7 @@ CREATE TABLE `templates` (
|
|||||||
INSERT INTO `templates` (`id`, `name`, `variable`, `type`, `subject`, `message`, `description`, `set_id`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `templates` (`id`, `name`, `variable`, `type`, `subject`, `message`, `description`, `set_id`, `created_at`, `updated_at`) VALUES
|
||||||
(1, 'This template is for sending notice to agent when ticket is assigned to them', '0', 1, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br /><b>Ticket No:</b> {!!$ticket_number!!}<br />Has been assigned to you by {!!$ticket_assigner!!} <br /> Please check and resppond on the ticket.<br /> Link: {!!$ticket_link!!}<br /><br />Thank You<br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
(1, 'This template is for sending notice to agent when ticket is assigned to them', '0', 1, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br /><b>Ticket No:</b> {!!$ticket_number!!}<br />Has been assigned to you by {!!$ticket_assigner!!} <br /> Please check and resppond on the ticket.<br /> Link: {!!$ticket_link!!}<br /><br />Thank You<br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
||||||
(2, 'This template is for sending notice to client with ticket link to check ticket without logging in to system', '1', 2, 'Check your Ticket', '<div>Hello {!!$user!!},<br /><br />Click the link below to view your requested ticket<br /> {!!$ticket_link_with_number!!}<br /><br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
(2, 'This template is for sending notice to client with ticket link to check ticket without logging in to system', '1', 2, 'Check your Ticket', '<div>Hello {!!$user!!},<br /><br />Click the link below to view your requested ticket<br /> {!!$ticket_link_with_number!!}<br /><br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
||||||
(3, 'This template is for sending notice to client when ticket status is changed to close', '0', 3, '', '<div>Hello,<br /><br />This message is regarding your ticket ID {!!$ticket_number!!}. We are changing the status of this ticket to "Closed" as the issue appears to be resolved.<br /><br />Thank you<br />Kind regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
(3, 'This template is for sending notice to client when ticket status is changed to close', '0', 3, '', '<div>Hello,<br /><br />This message is regarding your ticket ID {!!$ticket_number!!}. We are changing the status of this ticket to \"Closed\" as the issue appears to be resolved.<br /><br />Thank you<br />Kind regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
||||||
(4, 'This template is for sending notice to client on successful ticket creation', '0', 4, '', '<div><span>Hello {!!$user!!}<br /><br /></span><span>Thank you for contacting us. This is an automated response confirming the receipt of your ticket. Our team will get back to you as soon as possible. When replying, please make sure that the ticket ID is kept in the subject so that we can track your replies.<br /><br /></span><span><b>Ticket ID:</b> {!!$ticket_number!!} <br /><br /></span><span> {!!$department_sign!!}<br /></span>You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
(4, 'This template is for sending notice to client on successful ticket creation', '0', 4, '', '<div><span>Hello {!!$user!!}<br /><br /></span><span>Thank you for contacting us. This is an automated response confirming the receipt of your ticket. Our team will get back to you as soon as possible. When replying, please make sure that the ticket ID is kept in the subject so that we can track your replies.<br /><br /></span><span><b>Ticket ID:</b> {!!$ticket_number!!} <br /><br /></span><span> {!!$department_sign!!}<br /></span>You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
||||||
(5, 'This template is for sending notice to agent on new ticket creation', '0', 5, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br />New ticket {!!$ticket_number!!}created <br /><br /><b>From</b><br /><b>Name:</b> {!!$ticket_client_name!!} <br /><b>E-mail:</b> {!!$ticket_client_email!!}<br /><br /> {!!$content!!}<br /><br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
(5, 'This template is for sending notice to agent on new ticket creation', '0', 5, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br />New ticket {!!$ticket_number!!}created <br /><br /><b>From</b><br /><b>Name:</b> {!!$ticket_client_name!!} <br /><b>E-mail:</b> {!!$ticket_client_email!!}<br /><br /> {!!$content!!}<br /><br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
||||||
(6, 'This template is for sending notice to client on new ticket created by agent in name of client', '0', 6, '', '<div> {!!$content!!}<br /><br /> {!!$agent_sign!!}<br /><br />You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
(6, 'This template is for sending notice to client on new ticket created by agent in name of client', '0', 6, '', '<div> {!!$content!!}<br /><br /> {!!$agent_sign!!}<br /><br />You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
||||||
@@ -1639,7 +1641,7 @@ INSERT INTO `templates` (`id`, `name`, `variable`, `type`, `subject`, `message`,
|
|||||||
(11, 'This template is for sending notice to client about registration confirmation link', '1', 11, 'Verify your email address', '<p>Hello {!!$user!!}, </p><p>This email is confirmation that you are now registered at our helpdesk.</p><p><b>Registered Email:</b> {!!$email_address!!}</p><p>Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p> {!!$system_from!!} </p>', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(11, 'This template is for sending notice to client about registration confirmation link', '1', 11, 'Verify your email address', '<p>Hello {!!$user!!}, </p><p>This email is confirmation that you are now registered at our helpdesk.</p><p><b>Registered Email:</b> {!!$email_address!!}</p><p>Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p> {!!$system_from!!} </p>', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(12, 'This template is for sending notice to team when ticket is assigned to team', '1', 12, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br /><b>Ticket No:</b> {!!$ticket_number!!}<br />Has been assigned to your team : {!!$team!!} by {!!$ticket_assigner!!} <br /><br />Thank You<br />Kind Regards,<br />{!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(12, 'This template is for sending notice to team when ticket is assigned to team', '1', 12, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br /><b>Ticket No:</b> {!!$ticket_number!!}<br />Has been assigned to your team : {!!$team!!} by {!!$ticket_assigner!!} <br /><br />Thank You<br />Kind Regards,<br />{!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(13, 'This template is for sending notice to client when password is changed', '1', 13, 'Verify your email address', 'Hello {!!$user!!},<br /><br />Your password is successfully changed.Your new password is : {!!$user_password!!}<br /><br />Thank You.<br /><br />Kind Regards,<br /> {!!$system_from!!}', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(13, 'This template is for sending notice to client when password is changed', '1', 13, 'Verify your email address', 'Hello {!!$user!!},<br /><br />Your password is successfully changed.Your new password is : {!!$user_password!!}<br /><br />Thank You.<br /><br />Kind Regards,<br /> {!!$system_from!!}', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(14, 'This template is to notify users when their tickets are merged.', '1', 14, 'Your tickets have been merged.', '<p>Hello {!!$user!!},<br /> </p><p>Your ticket(s) with ticket number {!!$merged_ticket_numbers!!} have been closed and merged with <a href="{!!$ticket_link!!}">{!!$ticket_number!!}</a>. </p><p>Possible reasons for merging tickets</p><ul><li>Tickets are duplicate</li<li>Tickets state the same issue</li><li>Another member from your organization has created a ticket for the same issue</li></ul><p><a href="{!!$system_link!!}">Click here</a> to login to your account and check your tickets.</p><p>Regards,</p><p>{!!$system_from!!}</p>', '', 1, '2017-01-02 00:20:12', '2017-01-02 00:31:50');
|
(14, 'This template is to notify users when their tickets are merged.', '1', 14, 'Your tickets have been merged.', '<p>Hello {!!$user!!},<br /> </p><p>Your ticket(s) with ticket number {!!$merged_ticket_numbers!!} have been closed and merged with <a href=\"{!!$ticket_link!!}\">{!!$ticket_number!!}</a>. </p><p>Possible reasons for merging tickets</p><ul><li>Tickets are duplicate</li<li>Tickets state the same issue</li><li>Another member from your organization has created a ticket for the same issue</li></ul><p><a href=\"{!!$system_link!!}\">Click here</a> to login to your account and check your tickets.</p><p>Regards,</p><p>{!!$system_from!!}</p>', '', 1, '2017-01-02 00:20:12', '2017-01-02 00:31:50');
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -2134,21 +2136,22 @@ CREATE TABLE `users` (
|
|||||||
`profile_pic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`profile_pic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
`updated_at` timestamp NULL DEFAULT NULL
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`user_language` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `users`
|
-- Dumping data for table `users`
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `is_delete`, `ext`, `country_code`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vacation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `is_delete`, `ext`, `country_code`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vacation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`, `user_language`) VALUES
|
||||||
(1, 'demo_admin', 'Demo', 'Admin', 0, NULL, 0, '$2y$10$ZkHOJeJCKFzLtL4yWXZ3suVZlG.fJwD9oUI3nM5FGESmIkQV1hMXC', 1, 0, '', 0, '', NULL, '', '', '', 1, 1, '', '', '', '', '', '', 'admin', '', '', NULL, '2016-12-13 03:19:53', '2016-12-13 03:19:53'),
|
(1, 'demo_admin', 'Demo', 'Admin', 0, NULL, 0, '$2y$10$ZkHOJeJCKFzLtL4yWXZ3suVZlG.fJwD9oUI3nM5FGESmIkQV1hMXC', 1, 0, '', 0, '', NULL, '', '', '', 1, 1, '', '', '', '', '', '', 'admin', '', '', NULL, '2016-12-13 03:19:53', '2016-12-13 03:19:53', NULL),
|
||||||
(2, 'demo_agent', 'Abhrakasin', 'KK', 0, NULL, 0, '$2y$10$nrMZMd72/HZbnzjBAi0RX.UQrNTtFeZFEK9aq.chDPZZ07rOC/6Ie', 1, 0, '', 0, '', NULL, '', '', '', 1, 1, '79', '', '', '', '', '', 'agent', '', '', NULL, '2016-12-13 03:32:41', '2016-12-13 03:32:42'),
|
(2, 'demo_agent', 'Abhrakasin', 'KK', 0, NULL, 0, '$2y$10$nrMZMd72/HZbnzjBAi0RX.UQrNTtFeZFEK9aq.chDPZZ07rOC/6Ie', 1, 0, '', 0, '', NULL, '', '', '', 1, 1, '79', '', '', '', '', '', 'agent', '', '', NULL, '2016-12-13 03:32:41', '2016-12-13 03:32:42', NULL),
|
||||||
(3, 'Johan', 'Johan', 'Malhotra', 0, NULL, 0, '$2y$10$Eq8SHKUEXCkW5vqiWvA0Iu1UJmzZ.e5.Q3hI2tkxey5HZ2Lmbxb1C', 1, 0, '', 0, '', NULL, '', '', '', 2, 2, '7', '', '', '', '', '', 'agent', '', '', NULL, '2016-12-13 03:35:29', '2016-12-13 03:35:30'),
|
(3, 'Johan', 'Johan', 'Malhotra', 0, NULL, 0, '$2y$10$Eq8SHKUEXCkW5vqiWvA0Iu1UJmzZ.e5.Q3hI2tkxey5HZ2Lmbxb1C', 1, 0, '', 0, '', NULL, '', '', '', 2, 2, '7', '', '', '', '', '', 'agent', '', '', NULL, '2016-12-13 03:35:29', '2016-12-13 03:35:30', NULL),
|
||||||
(4, 'demo_client', 'Fidel Martin', '', 0, NULL, 0, '$2y$10$wHupGhJqz2p4rcdS4eq4ZO.NQ65b0JjVsqhJwEEzOCl3vMKwzh9/S', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'PXj6d2s7rOqoh53gHdyPbiHOVvBmDoR5CnXg9kl7fRolIC92Y20UnFPSOryw', '2016-12-13 03:45:19', '2016-12-13 03:45:19'),
|
(4, 'demo_client', 'Fidel Martin', '', 0, NULL, 0, '$2y$10$wHupGhJqz2p4rcdS4eq4ZO.NQ65b0JjVsqhJwEEzOCl3vMKwzh9/S', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'PXj6d2s7rOqoh53gHdyPbiHOVvBmDoR5CnXg9kl7fRolIC92Y20UnFPSOryw', '2016-12-13 03:45:19', '2016-12-13 03:45:19', NULL),
|
||||||
(5, 'joseph2321@gmail.com', 'Joseph Rossignol', '', 0, NULL, 0, '$2y$10$7eQ0nFxQpQkWaKwUbzTsQ.ufQpRN1rwUGY5ER1KsoXoLd6KbMIHnG', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'nv7Z37jhwAVdt87WCVzsqweY6wUbic7ll44FNmygMmwcnErafCrVpnw6Krys', '2016-12-13 03:50:55', '2016-12-13 03:50:55'),
|
(5, 'joseph2321@gmail.com', 'Joseph Rossignol', '', 0, NULL, 0, '$2y$10$7eQ0nFxQpQkWaKwUbzTsQ.ufQpRN1rwUGY5ER1KsoXoLd6KbMIHnG', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'nv7Z37jhwAVdt87WCVzsqweY6wUbic7ll44FNmygMmwcnErafCrVpnw6Krys', '2016-12-13 03:50:55', '2016-12-13 03:50:55', NULL),
|
||||||
(6, 'ichae1212@gmail.com', 'Ichae Semos', '', 0, NULL, 0, '$2y$10$aITz4IUuaxb0VHwF2V2CPefwf/Ft0VXpmHDC9feEfNXkW90GdjCFm', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'egq0NWPaxEkwkXmV3L0BJ4j4O6aKlgjzNZxea0XpYvCAeVvZLbXsjkKmWyBZ', '2016-12-13 03:55:54', '2016-12-13 03:55:54'),
|
(6, 'ichae1212@gmail.com', 'Ichae Semos', '', 0, NULL, 0, '$2y$10$aITz4IUuaxb0VHwF2V2CPefwf/Ft0VXpmHDC9feEfNXkW90GdjCFm', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'egq0NWPaxEkwkXmV3L0BJ4j4O6aKlgjzNZxea0XpYvCAeVvZLbXsjkKmWyBZ', '2016-12-13 03:55:54', '2016-12-13 03:55:54', NULL),
|
||||||
(7, 'kusti09@yahoo.com', 'Kusti Franti', '', 0, NULL, 0, '$2y$10$yNHebbyWfr6m1t4srRlYbuj2JN706ZBpyMI.gSJmuY9czJ3OzuQpq', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', '4JPKOO9UUjZ2yX1GI7WYaeljcdyFATmguwNGuUD9chDodCVfJVGBJvbepgOt', '2016-12-13 03:58:40', '2016-12-13 03:58:40');
|
(7, 'kusti09@yahoo.com', 'Kusti Franti', '', 0, NULL, 0, '$2y$10$yNHebbyWfr6m1t4srRlYbuj2JN706ZBpyMI.gSJmuY9czJ3OzuQpq', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', '4JPKOO9UUjZ2yX1GI7WYaeljcdyFATmguwNGuUD9chDodCVfJVGBJvbepgOt', '2016-12-13 03:58:40', '2016-12-13 03:58:40', NULL);
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -2260,8 +2263,6 @@ INSERT INTO `widgets` (`id`, `name`, `title`, `value`, `created_at`, `updated_at
|
|||||||
(2, 'footer2', 'Company', '<ul><li>About Us</li><li>Road Map</li><li>Privacy Policy</li><li>Cancellation & Refund Policy<br /></li><li>Term & Condition</li></ul>', '2016-12-13 03:19:30', '2016-12-13 03:21:40'),
|
(2, 'footer2', 'Company', '<ul><li>About Us</li><li>Road Map</li><li>Privacy Policy</li><li>Cancellation & Refund Policy<br /></li><li>Term & Condition</li></ul>', '2016-12-13 03:19:30', '2016-12-13 03:21:40'),
|
||||||
(3, 'footer3', 'Find out More', '<ul><li>Forums</li><li>News</li><li>Blog</li><li>Partner NOC Directory</li></ul>', '2016-12-13 03:19:30', '2016-12-13 03:22:06'),
|
(3, 'footer3', 'Find out More', '<ul><li>Forums</li><li>News</li><li>Blog</li><li>Partner NOC Directory</li></ul>', '2016-12-13 03:19:30', '2016-12-13 03:22:06'),
|
||||||
(4, 'footer4', 'Contact Us', '<div>\r\n <p><i>BTM Layout, No: #28<br />9th Cross First Stage BTM Layout Near Water Tank<br /></i><i>Bangalore – 560 029</i><br /><i>Karnataka – India<br /></i><i>Telephone: </i><i>+91 9999999999<br /></i><i>Email: </i><a><i> support@abcclothing.com</i></a></p></div>', '2016-12-13 03:19:30', '2016-12-13 03:22:34'),
|
(4, 'footer4', 'Contact Us', '<div>\r\n <p><i>BTM Layout, No: #28<br />9th Cross First Stage BTM Layout Near Water Tank<br /></i><i>Bangalore – 560 029</i><br /><i>Karnataka – India<br /></i><i>Telephone: </i><i>+91 9999999999<br /></i><i>Email: </i><a><i> support@abcclothing.com</i></a></p></div>', '2016-12-13 03:19:30', '2016-12-13 03:22:34'),
|
||||||
(5, 'side1', NULL, NULL, '2016-12-13 03:19:30', '2016-12-13 03:19:30'),
|
|
||||||
(6, 'side2', NULL, NULL, '2016-12-13 03:19:30', '2016-12-13 03:19:30'),
|
|
||||||
(7, 'linkedin', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
(7, 'linkedin', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
||||||
(8, 'stumble', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
(8, 'stumble', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
||||||
(9, 'google', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
(9, 'google', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
||||||
@@ -2565,6 +2566,12 @@ ALTER TABLE `mailbox_protocol`
|
|||||||
ALTER TABLE `mail_services`
|
ALTER TABLE `mail_services`
|
||||||
ADD PRIMARY KEY (`id`);
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indexes for table `migrations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `migrations`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Indexes for table `notifications`
|
-- Indexes for table `notifications`
|
||||||
--
|
--
|
||||||
@@ -2887,7 +2894,7 @@ ALTER TABLE `banlist`
|
|||||||
-- AUTO_INCREMENT for table `bar_notifications`
|
-- AUTO_INCREMENT for table `bar_notifications`
|
||||||
--
|
--
|
||||||
ALTER TABLE `bar_notifications`
|
ALTER TABLE `bar_notifications`
|
||||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
|
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
||||||
--
|
--
|
||||||
-- AUTO_INCREMENT for table `canned_response`
|
-- AUTO_INCREMENT for table `canned_response`
|
||||||
--
|
--
|
||||||
@@ -2897,7 +2904,7 @@ ALTER TABLE `canned_response`
|
|||||||
-- AUTO_INCREMENT for table `common_settings`
|
-- AUTO_INCREMENT for table `common_settings`
|
||||||
--
|
--
|
||||||
ALTER TABLE `common_settings`
|
ALTER TABLE `common_settings`
|
||||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
|
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
|
||||||
--
|
--
|
||||||
-- AUTO_INCREMENT for table `conditions`
|
-- AUTO_INCREMENT for table `conditions`
|
||||||
--
|
--
|
||||||
@@ -3034,6 +3041,11 @@ ALTER TABLE `mailbox_protocol`
|
|||||||
ALTER TABLE `mail_services`
|
ALTER TABLE `mail_services`
|
||||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||||
--
|
--
|
||||||
|
-- AUTO_INCREMENT for table `migrations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `migrations`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=99;
|
||||||
|
--
|
||||||
-- AUTO_INCREMENT for table `notifications`
|
-- AUTO_INCREMENT for table `notifications`
|
||||||
--
|
--
|
||||||
ALTER TABLE `notifications`
|
ALTER TABLE `notifications`
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
-- phpMyAdmin SQL Dump
|
-- phpMyAdmin SQL Dump
|
||||||
-- version 4.6.4
|
-- version 4.6.6deb5
|
||||||
-- https://www.phpmyadmin.net/
|
-- https://www.phpmyadmin.net/
|
||||||
--
|
--
|
||||||
-- Host: 127.0.0.1
|
-- Host: localhost:3306
|
||||||
-- Generation Time: Jan 03, 2017 at 06:22 AM
|
-- Generation Time: Aug 16, 2018 at 04:58 PM
|
||||||
-- Server version: 5.7.14
|
-- Server version: 5.7.22-0ubuntu0.17.10.1
|
||||||
-- PHP Version: 5.6.25
|
-- PHP Version: 7.2.7-1+ubuntu17.10.1+deb.sury.org+1
|
||||||
|
|
||||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
SET time_zone = "+00:00";
|
SET time_zone = "+00:00";
|
||||||
@@ -17,7 +17,7 @@ SET time_zone = "+00:00";
|
|||||||
/*!40101 SET NAMES utf8mb4 */;
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Database: `final`
|
-- Database: `test`
|
||||||
--
|
--
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
@@ -68,7 +68,7 @@ CREATE TABLE `bar_notifications` (
|
|||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `bar_notifications` (`id`, `key`, `value`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `bar_notifications` (`id`, `key`, `value`, `created_at`, `updated_at`) VALUES
|
||||||
(1, 'new-version', '', '2016-12-13 03:20:32', '2016-12-13 03:20:32');
|
(2, 'new-version', '', '2018-08-16 05:58:15', '2018-08-16 05:58:15');
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -112,7 +112,8 @@ INSERT INTO `common_settings` (`id`, `option_name`, `option_value`, `status`, `o
|
|||||||
(4, 'user_set_ticket_status', '', '1', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(4, 'user_set_ticket_status', '', '1', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(5, 'send_otp', '', '0', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(5, 'send_otp', '', '0', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(6, 'email_mandatory', '', '1', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(6, 'email_mandatory', '', '1', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(7, 'user_priority', '', '0', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52');
|
(7, 'user_priority', '', '0', '', '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
|
(8, 'dummy_data_installation', '', '1', '', NULL, NULL);
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -521,7 +522,7 @@ CREATE TABLE `emails` (
|
|||||||
`department` int(10) UNSIGNED DEFAULT NULL,
|
`department` int(10) UNSIGNED DEFAULT NULL,
|
||||||
`priority` int(10) UNSIGNED DEFAULT NULL,
|
`priority` int(10) UNSIGNED DEFAULT NULL,
|
||||||
`help_topic` int(10) UNSIGNED DEFAULT NULL,
|
`help_topic` int(10) UNSIGNED DEFAULT NULL,
|
||||||
`user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`user_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`fetching_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`fetching_host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`fetching_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`fetching_port` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
@@ -737,7 +738,7 @@ CREATE TABLE `kb_article` (
|
|||||||
INSERT INTO `kb_article` (`id`, `name`, `slug`, `description`, `status`, `type`, `publish_time`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `kb_article` (`id`, `name`, `slug`, `description`, `status`, `type`, `publish_time`, `created_at`, `updated_at`) VALUES
|
||||||
(1, 'DISCLAIMERS', 'disclaimers', '<p>ABC clothing.com does not promise that the site will be inoffensive, error-free or uninterrupted, or that it will provide specific information from use of the site or any content, search, or link on it. The site and its content are delivered on an “as-is” and “as-available” basis. ABC clothing.com cannot ensure that files you download from the site will be free of viruses or contamination or destructive features.</p>\r\n\r\n<p>Thebclothing.com disclaims all warranties, express or implied, including any implied warranties of merchantability and fitness for a particular purpose. ABC clothing.com will not be liable for any damages of any kind arising from the use of this site, including, without limitation, direct, indirect, incidental, and punitive and consequential damages.</p>\r\n\r\n<p>ABC clothing.com disclaims any and all liability for the acts, omissions, and conduct of any third-party users, ABC clothing.com users, advertisers, and/or sponsors on the Site, in connection with the Site, or other-wise related to your use of the Site. ABC clothing.com is not responsible for the products, services, actions, or failure to act of any third party in connection with or referenced on the Site. Without limiting the fore-going, you may report the misconduct of users and/or third-party advertisers or service and/or product providers referenced on or included in the Site to ABC clothing.com at Support@abcclothing.com</p>\r\n\r\n<p>ABC clothing.com may investigate the claim and take appropriate action, at its sole discretion.</p>\r\n\r\n<p>For any query kindly drop mail us on Support@abcclothing.com.</p>\r\n', 1, 1, '2016-12-13 08:54:00', '2016-12-13 03:25:28', '2016-12-13 03:25:28'),
|
(1, 'DISCLAIMERS', 'disclaimers', '<p>ABC clothing.com does not promise that the site will be inoffensive, error-free or uninterrupted, or that it will provide specific information from use of the site or any content, search, or link on it. The site and its content are delivered on an “as-is” and “as-available” basis. ABC clothing.com cannot ensure that files you download from the site will be free of viruses or contamination or destructive features.</p>\r\n\r\n<p>Thebclothing.com disclaims all warranties, express or implied, including any implied warranties of merchantability and fitness for a particular purpose. ABC clothing.com will not be liable for any damages of any kind arising from the use of this site, including, without limitation, direct, indirect, incidental, and punitive and consequential damages.</p>\r\n\r\n<p>ABC clothing.com disclaims any and all liability for the acts, omissions, and conduct of any third-party users, ABC clothing.com users, advertisers, and/or sponsors on the Site, in connection with the Site, or other-wise related to your use of the Site. ABC clothing.com is not responsible for the products, services, actions, or failure to act of any third party in connection with or referenced on the Site. Without limiting the fore-going, you may report the misconduct of users and/or third-party advertisers or service and/or product providers referenced on or included in the Site to ABC clothing.com at Support@abcclothing.com</p>\r\n\r\n<p>ABC clothing.com may investigate the claim and take appropriate action, at its sole discretion.</p>\r\n\r\n<p>For any query kindly drop mail us on Support@abcclothing.com.</p>\r\n', 1, 1, '2016-12-13 08:54:00', '2016-12-13 03:25:28', '2016-12-13 03:25:28'),
|
||||||
(2, 'CUSTOM ORDER', 'custom-order', '<p>You saw, you liked but couldn’t see your size? We will custom make it for you.</p>\r\n\r\n<p><strong>How it works:</strong></p>\r\n\r\n<ol><li>You liked something and want to modify a little or have something else on mind, do pen it down and share it with us on Support@abcclothing.com</li>\r\n <li>We’ll work out the price depending on how detailed or intricate you want your garment.</li>\r\n <li>An advance would be required for any customized orders.</li>\r\n <li>Once you’ve placed a deposit, we’ll make you a sketch of the garment.</li>\r\n <li>We can complete your order in 15-20 days depending on the workload.</li>\r\n <li>We will also share some updates on the garment in case something needs to be changed.</li>\r\n <li>We finally ship it to your given address.</li>\r\n</ol><p><strong>Note:</strong> No returns and refunds.</p>\r\n', 1, 1, '2016-12-13 08:56:00', '2016-12-13 03:26:24', '2016-12-13 03:26:24'),
|
(2, 'CUSTOM ORDER', 'custom-order', '<p>You saw, you liked but couldn’t see your size? We will custom make it for you.</p>\r\n\r\n<p><strong>How it works:</strong></p>\r\n\r\n<ol><li>You liked something and want to modify a little or have something else on mind, do pen it down and share it with us on Support@abcclothing.com</li>\r\n <li>We’ll work out the price depending on how detailed or intricate you want your garment.</li>\r\n <li>An advance would be required for any customized orders.</li>\r\n <li>Once you’ve placed a deposit, we’ll make you a sketch of the garment.</li>\r\n <li>We can complete your order in 15-20 days depending on the workload.</li>\r\n <li>We will also share some updates on the garment in case something needs to be changed.</li>\r\n <li>We finally ship it to your given address.</li>\r\n</ol><p><strong>Note:</strong> No returns and refunds.</p>\r\n', 1, 1, '2016-12-13 08:56:00', '2016-12-13 03:26:24', '2016-12-13 03:26:24'),
|
||||||
(3, 'TROUSER SKIRTS', 'trouser-skirts', '<p>Paris takes its fashion very, very seriously. So seriously, in fact, that wearing the wrong thing has actually caused a riot.</p>\r\n\r\n<p>In 1911, two rival Parisian couture houses launched their "trouser skirts," an innovation in fashion that trod the very fixed line between the genders and seemed to promise greater flexibility for women in general. There were two different versions of the trouser skirt: One was a sort of baggy pant with a very low hanging crotch, described as "a sack with holes made for the legs to go through," not unlike the fashions on high streets today, and the other a pair of the same kind of pants topped with an over-skirt, again, not unlike high street fashions of today. Both versions were launched by models at the opening day of racing season to general revulsion and disgust, but thankfully, no violence.</p>\r\n\r\n<p>It wasn\'t until the ladies attempted to promenade their future fashions on the boulevards that the fisticuffs started—at the Place de l\'Opera, the poor models were attacked by a jeering mob of fashion Philistines, who pulled their hair, trampled their hats, and reduced them to tears. A squad of police officers on bicycles were dispatched to rescue the girls and escort them to safety.</p>\r\n', 1, 1, '2016-12-13 08:56:00', '2016-12-13 03:27:02', '2016-12-13 03:27:02'),
|
(3, 'TROUSER SKIRTS', 'trouser-skirts', '<p>Paris takes its fashion very, very seriously. So seriously, in fact, that wearing the wrong thing has actually caused a riot.</p>\r\n\r\n<p>In 1911, two rival Parisian couture houses launched their \"trouser skirts,\" an innovation in fashion that trod the very fixed line between the genders and seemed to promise greater flexibility for women in general. There were two different versions of the trouser skirt: One was a sort of baggy pant with a very low hanging crotch, described as \"a sack with holes made for the legs to go through,\" not unlike the fashions on high streets today, and the other a pair of the same kind of pants topped with an over-skirt, again, not unlike high street fashions of today. Both versions were launched by models at the opening day of racing season to general revulsion and disgust, but thankfully, no violence.</p>\r\n\r\n<p>It wasn\'t until the ladies attempted to promenade their future fashions on the boulevards that the fisticuffs started—at the Place de l\'Opera, the poor models were attacked by a jeering mob of fashion Philistines, who pulled their hair, trampled their hats, and reduced them to tears. A squad of police officers on bicycles were dispatched to rescue the girls and escort them to safety.</p>\r\n', 1, 1, '2016-12-13 08:56:00', '2016-12-13 03:27:02', '2016-12-13 03:27:02'),
|
||||||
(4, 'SECURE SHOPPING GUARANTEE', 'secure-shopping-guarantee', '<p>We accept all major Indian and International Credit/ Debit Cards, and Net Banking with over 40 Banks.</p>\r\n\r\n<p>NO Cash on Delivery (as random people order and share false addresses for fun)</p>\r\n\r\n<p>Yes, shopping at our e-store is 100% safe. All payment requests are directed to the secured PayU Payment Gateway. This gives you the highest level of protection possible whenever you use credit cards or make other financial or confidential transactions over the Internet.</p>\r\n\r\n<p>You can be assured that our e-store offers you the highest standards of security currently available on the net so as to ensure that your shopping experience is private, safe and secure.</p>\r\n', 1, 1, '2016-12-13 08:57:00', '2016-12-13 03:27:42', '2016-12-13 03:27:42'),
|
(4, 'SECURE SHOPPING GUARANTEE', 'secure-shopping-guarantee', '<p>We accept all major Indian and International Credit/ Debit Cards, and Net Banking with over 40 Banks.</p>\r\n\r\n<p>NO Cash on Delivery (as random people order and share false addresses for fun)</p>\r\n\r\n<p>Yes, shopping at our e-store is 100% safe. All payment requests are directed to the secured PayU Payment Gateway. This gives you the highest level of protection possible whenever you use credit cards or make other financial or confidential transactions over the Internet.</p>\r\n\r\n<p>You can be assured that our e-store offers you the highest standards of security currently available on the net so as to ensure that your shopping experience is private, safe and secure.</p>\r\n', 1, 1, '2016-12-13 08:57:00', '2016-12-13 03:27:42', '2016-12-13 03:27:42'),
|
||||||
(5, 'PRIVACY POLICY', 'privacy-policy', '<p>The ABC Clothing collects your basic information to service your requests. This basic information is gathered when you purchase products/Gift card vouchers or when you sign up for e-mail notifications. Information gathered from you includes your name, mailing address, e-mail and phone number. Only when you place an order, your card information is requested and is submitted via the highest level of encryption to make sure of the greatest amount of safety and security. Reason why we gather this information:</p>\r\n\r\n<p><strong>To process your order</strong>.<br />\r\nShipping and Customer Service.<br />\r\nWe also use the information to upgrade our products, customer services, website content and navigation.</p>\r\n\r\n<p><br /><strong>Internal Record Keeping</strong>.<br />\r\nWe at The ABC Clothing respect that you do not want your personal information shared with other companies. The information you provide shall, therefore, be only used to process your order and customer support. The ABC Clothing does not share, sell or rent customer information to any other company.</p>\r\n', 1, 1, '2016-12-13 08:58:00', '2016-12-13 03:28:31', '2016-12-13 03:28:31'),
|
(5, 'PRIVACY POLICY', 'privacy-policy', '<p>The ABC Clothing collects your basic information to service your requests. This basic information is gathered when you purchase products/Gift card vouchers or when you sign up for e-mail notifications. Information gathered from you includes your name, mailing address, e-mail and phone number. Only when you place an order, your card information is requested and is submitted via the highest level of encryption to make sure of the greatest amount of safety and security. Reason why we gather this information:</p>\r\n\r\n<p><strong>To process your order</strong>.<br />\r\nShipping and Customer Service.<br />\r\nWe also use the information to upgrade our products, customer services, website content and navigation.</p>\r\n\r\n<p><br /><strong>Internal Record Keeping</strong>.<br />\r\nWe at The ABC Clothing respect that you do not want your personal information shared with other companies. The information you provide shall, therefore, be only used to process your order and customer support. The ABC Clothing does not share, sell or rent customer information to any other company.</p>\r\n', 1, 1, '2016-12-13 08:58:00', '2016-12-13 03:28:31', '2016-12-13 03:28:31'),
|
||||||
(6, ' SHIPPING POLICY', 'shipping-policy', '<p>We ship worldwide. We use FedEx/DTDC for shipping.</p>\r\n\r\n<p>Standard Shipping is usually 3-7 Working days for orders within India and 12-15 Working days for International Orders, but usually faster. IF your order doesn’t reach you in time, you may write to us at support@abcclothing.com</p>\r\n\r\n<p><strong>International Orders</strong></p>\r\n\r\n<p>For international orders, please note, your shipping will be calculated at the time of Check out only, this is a System Generated amount, based on your Zip Code, Region and Order Weight. (Approx Costs Rs.1250-1500 for 500 gms – International Shipment, subject to region)</p>\r\n\r\n<p><strong>Tracking</strong></p>\r\n\r\n<p>For tracking your order go to the following website, it will require your tracking ID which is sent via mail in your invoice.</p>\r\n', 1, 1, '2016-12-13 08:58:00', '2016-12-13 03:29:34', '2016-12-13 03:29:34'),
|
(6, ' SHIPPING POLICY', 'shipping-policy', '<p>We ship worldwide. We use FedEx/DTDC for shipping.</p>\r\n\r\n<p>Standard Shipping is usually 3-7 Working days for orders within India and 12-15 Working days for International Orders, but usually faster. IF your order doesn’t reach you in time, you may write to us at support@abcclothing.com</p>\r\n\r\n<p><strong>International Orders</strong></p>\r\n\r\n<p>For international orders, please note, your shipping will be calculated at the time of Check out only, this is a System Generated amount, based on your Zip Code, Region and Order Weight. (Approx Costs Rs.1250-1500 for 500 gms – International Shipment, subject to region)</p>\r\n\r\n<p><strong>Tracking</strong></p>\r\n\r\n<p>For tracking your order go to the following website, it will require your tracking ID which is sent via mail in your invoice.</p>\r\n', 1, 1, '2016-12-13 08:58:00', '2016-12-13 03:29:34', '2016-12-13 03:29:34'),
|
||||||
@@ -976,112 +977,113 @@ INSERT INTO `mail_services` (`id`, `name`, `short_name`, `created_at`, `updated_
|
|||||||
|
|
||||||
CREATE TABLE `migrations` (
|
CREATE TABLE `migrations` (
|
||||||
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`batch` int(11) NOT NULL
|
`batch` int(11) NOT NULL,
|
||||||
|
`id` int(11) NOT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `migrations`
|
-- Dumping data for table `migrations`
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `migrations` (`migration`, `batch`) VALUES
|
INSERT INTO `migrations` (`migration`, `batch`, `id`) VALUES
|
||||||
('2016_02_16_140450_create_banlist_table', 1),
|
('2016_02_16_140450_create_banlist_table', 1, 1),
|
||||||
('2016_02_16_140450_create_canned_response_table', 1),
|
('2016_02_16_140450_create_canned_response_table', 1, 2),
|
||||||
('2016_02_16_140450_create_custom_form_fields_table', 1),
|
('2016_02_16_140450_create_custom_form_fields_table', 1, 3),
|
||||||
('2016_02_16_140450_create_custom_forms_table', 1),
|
('2016_02_16_140450_create_custom_forms_table', 1, 4),
|
||||||
('2016_02_16_140450_create_date_format_table', 1),
|
('2016_02_16_140450_create_date_format_table', 1, 5),
|
||||||
('2016_02_16_140450_create_date_time_format_table', 1),
|
('2016_02_16_140450_create_date_time_format_table', 1, 6),
|
||||||
('2016_02_16_140450_create_department_table', 1),
|
('2016_02_16_140450_create_department_table', 1, 7),
|
||||||
('2016_02_16_140450_create_emails_table', 1),
|
('2016_02_16_140450_create_emails_table', 1, 8),
|
||||||
('2016_02_16_140450_create_group_assign_department_table', 1),
|
('2016_02_16_140450_create_group_assign_department_table', 1, 9),
|
||||||
('2016_02_16_140450_create_groups_table', 1),
|
('2016_02_16_140450_create_groups_table', 1, 10),
|
||||||
('2016_02_16_140450_create_help_topic_table', 1),
|
('2016_02_16_140450_create_help_topic_table', 1, 11),
|
||||||
('2016_02_16_140450_create_kb_article_relationship_table', 1),
|
('2016_02_16_140450_create_kb_article_relationship_table', 1, 12),
|
||||||
('2016_02_16_140450_create_kb_article_table', 1),
|
('2016_02_16_140450_create_kb_article_table', 1, 13),
|
||||||
('2016_02_16_140450_create_kb_category_table', 1),
|
('2016_02_16_140450_create_kb_category_table', 1, 14),
|
||||||
('2016_02_16_140450_create_kb_comment_table', 1),
|
('2016_02_16_140450_create_kb_comment_table', 1, 15),
|
||||||
('2016_02_16_140450_create_kb_pages_table', 1),
|
('2016_02_16_140450_create_kb_pages_table', 1, 16),
|
||||||
('2016_02_16_140450_create_kb_settings_table', 1),
|
('2016_02_16_140450_create_kb_settings_table', 1, 17),
|
||||||
('2016_02_16_140450_create_languages_table', 1),
|
('2016_02_16_140450_create_languages_table', 1, 18),
|
||||||
('2016_02_16_140450_create_log_notification_table', 1),
|
('2016_02_16_140450_create_log_notification_table', 1, 19),
|
||||||
('2016_02_16_140450_create_mailbox_protocol_table', 1),
|
('2016_02_16_140450_create_mailbox_protocol_table', 1, 20),
|
||||||
('2016_02_16_140450_create_organization_table', 1),
|
('2016_02_16_140450_create_organization_table', 1, 21),
|
||||||
('2016_02_16_140450_create_password_resets_table', 1),
|
('2016_02_16_140450_create_password_resets_table', 1, 22),
|
||||||
('2016_02_16_140450_create_plugins_table', 1),
|
('2016_02_16_140450_create_plugins_table', 1, 23),
|
||||||
('2016_02_16_140450_create_settings_alert_notice_table', 1),
|
('2016_02_16_140450_create_settings_alert_notice_table', 1, 24),
|
||||||
('2016_02_16_140450_create_settings_auto_response_table', 1),
|
('2016_02_16_140450_create_settings_auto_response_table', 1, 25),
|
||||||
('2016_02_16_140450_create_settings_company_table', 1),
|
('2016_02_16_140450_create_settings_company_table', 1, 26),
|
||||||
('2016_02_16_140450_create_settings_email_table', 1),
|
('2016_02_16_140450_create_settings_email_table', 1, 27),
|
||||||
('2016_02_16_140450_create_settings_ratings_table', 1),
|
('2016_02_16_140450_create_settings_ratings_table', 1, 28),
|
||||||
('2016_02_16_140450_create_settings_system_table', 1),
|
('2016_02_16_140450_create_settings_system_table', 1, 29),
|
||||||
('2016_02_16_140450_create_settings_ticket_table', 1),
|
('2016_02_16_140450_create_settings_ticket_table', 1, 30),
|
||||||
('2016_02_16_140450_create_sla_plan_table', 1),
|
('2016_02_16_140450_create_sla_plan_table', 1, 31),
|
||||||
('2016_02_16_140450_create_team_assign_agent_table', 1),
|
('2016_02_16_140450_create_team_assign_agent_table', 1, 32),
|
||||||
('2016_02_16_140450_create_teams_table', 1),
|
('2016_02_16_140450_create_teams_table', 1, 33),
|
||||||
('2016_02_16_140450_create_template_table', 1),
|
('2016_02_16_140450_create_template_table', 1, 34),
|
||||||
('2016_02_16_140450_create_ticket_attachment_table', 1),
|
('2016_02_16_140450_create_ticket_attachment_table', 1, 35),
|
||||||
('2016_02_16_140450_create_ticket_collaborator_table', 1),
|
('2016_02_16_140450_create_ticket_collaborator_table', 1, 36),
|
||||||
('2016_02_16_140450_create_ticket_form_data_table', 1),
|
('2016_02_16_140450_create_ticket_form_data_table', 1, 37),
|
||||||
('2016_02_16_140450_create_ticket_priority_table', 1),
|
('2016_02_16_140450_create_ticket_priority_table', 1, 38),
|
||||||
('2016_02_16_140450_create_ticket_source_table', 1),
|
('2016_02_16_140450_create_ticket_source_table', 1, 39),
|
||||||
('2016_02_16_140450_create_ticket_status_table', 1),
|
('2016_02_16_140450_create_ticket_status_table', 1, 40),
|
||||||
('2016_02_16_140450_create_ticket_thread_table', 1),
|
('2016_02_16_140450_create_ticket_thread_table', 1, 41),
|
||||||
('2016_02_16_140450_create_tickets_table', 1),
|
('2016_02_16_140450_create_tickets_table', 1, 42),
|
||||||
('2016_02_16_140450_create_time_format_table', 1),
|
('2016_02_16_140450_create_time_format_table', 1, 43),
|
||||||
('2016_02_16_140450_create_timezone_table', 1),
|
('2016_02_16_140450_create_timezone_table', 1, 44),
|
||||||
('2016_02_16_140450_create_user_assign_organization_table', 1),
|
('2016_02_16_140450_create_user_assign_organization_table', 1, 45),
|
||||||
('2016_02_16_140450_create_users_table', 1),
|
('2016_02_16_140450_create_users_table', 1, 46),
|
||||||
('2016_02_16_140450_create_version_check_table', 1),
|
('2016_02_16_140450_create_version_check_table', 1, 47),
|
||||||
('2016_02_16_140450_create_widgets_table', 1),
|
('2016_02_16_140450_create_widgets_table', 1, 48),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_canned_response_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_canned_response_table', 1, 49),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_department_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_department_table', 1, 50),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_emails_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_emails_table', 1, 51),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_group_assign_department_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_group_assign_department_table', 1, 52),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_help_topic_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_help_topic_table', 1, 53),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_kb_article_relationship_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_kb_article_relationship_table', 1, 54),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_kb_comment_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_kb_comment_table', 1, 55),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_organization_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_organization_table', 1, 56),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_settings_system_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_settings_system_table', 1, 57),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_team_assign_agent_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_team_assign_agent_table', 1, 58),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_teams_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_teams_table', 1, 59),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_ticket_attachment_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_ticket_attachment_table', 1, 60),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_ticket_collaborator_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_ticket_collaborator_table', 1, 61),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_ticket_form_data_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_ticket_form_data_table', 1, 62),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_ticket_thread_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_ticket_thread_table', 1, 63),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_tickets_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_tickets_table', 1, 64),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_user_assign_organization_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_user_assign_organization_table', 1, 65),
|
||||||
('2016_02_16_140454_add_foreign_keys_to_users_table', 1),
|
('2016_02_16_140454_add_foreign_keys_to_users_table', 1, 66),
|
||||||
('2016_03_31_061239_create_notifications_table', 1),
|
('2016_03_31_061239_create_notifications_table', 1, 67),
|
||||||
('2016_03_31_061534_create_notification_types_table', 1),
|
('2016_03_31_061534_create_notification_types_table', 1, 68),
|
||||||
('2016_03_31_061740_create_user_notification_table', 1),
|
('2016_03_31_061740_create_user_notification_table', 1, 69),
|
||||||
('2016_04_18_115852_create_workflow_name_table', 1),
|
('2016_04_18_115852_create_workflow_name_table', 1, 70),
|
||||||
('2016_04_18_115900_create_workflow_rule_table', 1),
|
('2016_04_18_115900_create_workflow_rule_table', 1, 71),
|
||||||
('2016_04_18_115908_create_workflow_action_table', 1),
|
('2016_04_18_115908_create_workflow_action_table', 1, 72),
|
||||||
('2016_05_10_102423_create_country_code_table', 1),
|
('2016_05_10_102423_create_country_code_table', 1, 73),
|
||||||
('2016_05_10_102604_create_bar_notifications_table', 1),
|
('2016_05_10_102604_create_bar_notifications_table', 1, 74),
|
||||||
('2016_05_11_105244_create_api_settings_table', 1),
|
('2016_05_11_105244_create_api_settings_table', 1, 75),
|
||||||
('2016_05_19_055008_create_workflow_close_table', 1),
|
('2016_05_19_055008_create_workflow_close_table', 1, 76),
|
||||||
('2016_06_02_072210_create_common_settings_table', 1),
|
('2016_06_02_072210_create_common_settings_table', 1, 77),
|
||||||
('2016_06_02_074913_create_login_attempts_table', 1),
|
('2016_06_02_074913_create_login_attempts_table', 1, 78),
|
||||||
('2016_06_02_080005_create_ratings_table', 1),
|
('2016_06_02_080005_create_ratings_table', 1, 79),
|
||||||
('2016_06_02_081020_create_rating_ref_table', 1),
|
('2016_06_02_081020_create_rating_ref_table', 1, 80),
|
||||||
('2016_06_02_090225_create_settings_security_table', 1),
|
('2016_06_02_090225_create_settings_security_table', 1, 81),
|
||||||
('2016_06_02_090628_create_templates_table', 1),
|
('2016_06_02_090628_create_templates_table', 1, 82),
|
||||||
('2016_06_02_094409_create_template_sets_table', 1),
|
('2016_06_02_094409_create_template_sets_table', 1, 83),
|
||||||
('2016_06_02_094420_create_template_types_table', 1),
|
('2016_06_02_094420_create_template_types_table', 1, 84),
|
||||||
('2016_06_02_095357_create_ticket_token_table', 1),
|
('2016_06_02_095357_create_ticket_token_table', 1, 85),
|
||||||
('2016_06_28_141613_version1079table', 1),
|
('2016_06_28_141613_version1079table', 1, 86),
|
||||||
('2016_07_02_051247_create_jobs_table', 1),
|
('2016_07_02_051247_create_jobs_table', 1, 87),
|
||||||
('2016_07_02_051439_create_failed_jobs_table', 1),
|
('2016_07_02_051439_create_failed_jobs_table', 1, 88),
|
||||||
('2016_07_19_071910_create_field_values_table', 1),
|
('2016_07_19_071910_create_field_values_table', 1, 89),
|
||||||
('2016_07_26_084458_create_faveo_mails_table', 1),
|
('2016_07_26_084458_create_faveo_mails_table', 1, 90),
|
||||||
('2016_07_26_090201_create_faveo_queues_table', 1),
|
('2016_07_26_090201_create_faveo_queues_table', 1, 91),
|
||||||
('2016_07_26_094753_create_mail_services_table', 1),
|
('2016_07_26_094753_create_mail_services_table', 1, 92),
|
||||||
('2016_07_26_095020_create_queue_services_table', 1),
|
('2016_07_26_095020_create_queue_services_table', 1, 93),
|
||||||
('2016_07_29_113012_create_conditions_table', 1),
|
('2016_07_29_113012_create_conditions_table', 1, 94),
|
||||||
('2016_08_08_095744_create_social_media_table', 1),
|
('2016_08_08_095744_create_social_media_table', 1, 95),
|
||||||
('2016_08_12_104410_create_user_additional_infos_table', 1),
|
('2016_08_12_104410_create_user_additional_infos_table', 1, 96),
|
||||||
('2016_08_16_104539_alter_ticket_source_table', 1),
|
('2016_08_16_104539_alter_ticket_source_table', 1, 97),
|
||||||
('2016_11_30_122809_alter_attachment_table', 2);
|
('2016_11_30_122809_alter_attachment_table', 2, 98);
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -1628,7 +1630,7 @@ CREATE TABLE `templates` (
|
|||||||
INSERT INTO `templates` (`id`, `name`, `variable`, `type`, `subject`, `message`, `description`, `set_id`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `templates` (`id`, `name`, `variable`, `type`, `subject`, `message`, `description`, `set_id`, `created_at`, `updated_at`) VALUES
|
||||||
(1, 'This template is for sending notice to agent when ticket is assigned to them', '0', 1, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br /><b>Ticket No:</b> {!!$ticket_number!!}<br />Has been assigned to you by {!!$ticket_assigner!!} <br /> Please check and resppond on the ticket.<br /> Link: {!!$ticket_link!!}<br /><br />Thank You<br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
(1, 'This template is for sending notice to agent when ticket is assigned to them', '0', 1, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br /><b>Ticket No:</b> {!!$ticket_number!!}<br />Has been assigned to you by {!!$ticket_assigner!!} <br /> Please check and resppond on the ticket.<br /> Link: {!!$ticket_link!!}<br /><br />Thank You<br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
||||||
(2, 'This template is for sending notice to client with ticket link to check ticket without logging in to system', '1', 2, 'Check your Ticket', '<div>Hello {!!$user!!},<br /><br />Click the link below to view your requested ticket<br /> {!!$ticket_link_with_number!!}<br /><br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
(2, 'This template is for sending notice to client with ticket link to check ticket without logging in to system', '1', 2, 'Check your Ticket', '<div>Hello {!!$user!!},<br /><br />Click the link below to view your requested ticket<br /> {!!$ticket_link_with_number!!}<br /><br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
||||||
(3, 'This template is for sending notice to client when ticket status is changed to close', '0', 3, '', '<div>Hello,<br /><br />This message is regarding your ticket ID {!!$ticket_number!!}. We are changing the status of this ticket to "Closed" as the issue appears to be resolved.<br /><br />Thank you<br />Kind regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
(3, 'This template is for sending notice to client when ticket status is changed to close', '0', 3, '', '<div>Hello,<br /><br />This message is regarding your ticket ID {!!$ticket_number!!}. We are changing the status of this ticket to \"Closed\" as the issue appears to be resolved.<br /><br />Thank you<br />Kind regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:50', '2016-12-13 03:19:50'),
|
||||||
(4, 'This template is for sending notice to client on successful ticket creation', '0', 4, '', '<div><span>Hello {!!$user!!}<br /><br /></span><span>Thank you for contacting us. This is an automated response confirming the receipt of your ticket. Our team will get back to you as soon as possible. When replying, please make sure that the ticket ID is kept in the subject so that we can track your replies.<br /><br /></span><span><b>Ticket ID:</b> {!!$ticket_number!!} <br /><br /></span><span> {!!$department_sign!!}<br /></span>You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
(4, 'This template is for sending notice to client on successful ticket creation', '0', 4, '', '<div><span>Hello {!!$user!!}<br /><br /></span><span>Thank you for contacting us. This is an automated response confirming the receipt of your ticket. Our team will get back to you as soon as possible. When replying, please make sure that the ticket ID is kept in the subject so that we can track your replies.<br /><br /></span><span><b>Ticket ID:</b> {!!$ticket_number!!} <br /><br /></span><span> {!!$department_sign!!}<br /></span>You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
||||||
(5, 'This template is for sending notice to agent on new ticket creation', '0', 5, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br />New ticket {!!$ticket_number!!}created <br /><br /><b>From</b><br /><b>Name:</b> {!!$ticket_client_name!!} <br /><b>E-mail:</b> {!!$ticket_client_email!!}<br /><br /> {!!$content!!}<br /><br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
(5, 'This template is for sending notice to agent on new ticket creation', '0', 5, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br />New ticket {!!$ticket_number!!}created <br /><br /><b>From</b><br /><b>Name:</b> {!!$ticket_client_name!!} <br /><b>E-mail:</b> {!!$ticket_client_email!!}<br /><br /> {!!$content!!}<br /><br />Kind Regards,<br /> {!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
||||||
(6, 'This template is for sending notice to client on new ticket created by agent in name of client', '0', 6, '', '<div> {!!$content!!}<br /><br /> {!!$agent_sign!!}<br /><br />You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
(6, 'This template is for sending notice to client on new ticket created by agent in name of client', '0', 6, '', '<div> {!!$content!!}<br /><br /> {!!$agent_sign!!}<br /><br />You can check the status of or update this ticket online at: {!!$system_link!!}</div>', '', 1, '2016-12-13 03:19:51', '2016-12-13 03:19:51'),
|
||||||
@@ -1639,7 +1641,7 @@ INSERT INTO `templates` (`id`, `name`, `variable`, `type`, `subject`, `message`,
|
|||||||
(11, 'This template is for sending notice to client about registration confirmation link', '1', 11, 'Verify your email address', '<p>Hello {!!$user!!}, </p><p>This email is confirmation that you are now registered at our helpdesk.</p><p><b>Registered Email:</b> {!!$email_address!!}</p><p>Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p> {!!$system_from!!} </p>', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(11, 'This template is for sending notice to client about registration confirmation link', '1', 11, 'Verify your email address', '<p>Hello {!!$user!!}, </p><p>This email is confirmation that you are now registered at our helpdesk.</p><p><b>Registered Email:</b> {!!$email_address!!}</p><p>Please click on the below link to activate your account and Login to the system {!!$password_reset_link!!}</p><p>Thank You.</p><p>Kind Regards,</p><p> {!!$system_from!!} </p>', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(12, 'This template is for sending notice to team when ticket is assigned to team', '1', 12, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br /><b>Ticket No:</b> {!!$ticket_number!!}<br />Has been assigned to your team : {!!$team!!} by {!!$ticket_assigner!!} <br /><br />Thank You<br />Kind Regards,<br />{!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(12, 'This template is for sending notice to team when ticket is assigned to team', '1', 12, '', '<div>Hello {!!$ticket_agent_name!!},<br /><br /><b>Ticket No:</b> {!!$ticket_number!!}<br />Has been assigned to your team : {!!$team!!} by {!!$ticket_assigner!!} <br /><br />Thank You<br />Kind Regards,<br />{!!$system_from!!}</div>', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(13, 'This template is for sending notice to client when password is changed', '1', 13, 'Verify your email address', 'Hello {!!$user!!},<br /><br />Your password is successfully changed.Your new password is : {!!$user_password!!}<br /><br />Thank You.<br /><br />Kind Regards,<br /> {!!$system_from!!}', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
(13, 'This template is for sending notice to client when password is changed', '1', 13, 'Verify your email address', 'Hello {!!$user!!},<br /><br />Your password is successfully changed.Your new password is : {!!$user_password!!}<br /><br />Thank You.<br /><br />Kind Regards,<br /> {!!$system_from!!}', '', 1, '2016-12-13 03:19:52', '2016-12-13 03:19:52'),
|
||||||
(14, 'This template is to notify users when their tickets are merged.', '1', 14, 'Your tickets have been merged.', '<p>Hello {!!$user!!},<br /> </p><p>Your ticket(s) with ticket number {!!$merged_ticket_numbers!!} have been closed and merged with <a href="{!!$ticket_link!!}">{!!$ticket_number!!}</a>. </p><p>Possible reasons for merging tickets</p><ul><li>Tickets are duplicate</li<li>Tickets state the same issue</li><li>Another member from your organization has created a ticket for the same issue</li></ul><p><a href="{!!$system_link!!}">Click here</a> to login to your account and check your tickets.</p><p>Regards,</p><p>{!!$system_from!!}</p>', '', 1, '2017-01-02 00:20:12', '2017-01-02 00:31:50');
|
(14, 'This template is to notify users when their tickets are merged.', '1', 14, 'Your tickets have been merged.', '<p>Hello {!!$user!!},<br /> </p><p>Your ticket(s) with ticket number {!!$merged_ticket_numbers!!} have been closed and merged with <a href=\"{!!$ticket_link!!}\">{!!$ticket_number!!}</a>. </p><p>Possible reasons for merging tickets</p><ul><li>Tickets are duplicate</li<li>Tickets state the same issue</li><li>Another member from your organization has created a ticket for the same issue</li></ul><p><a href=\"{!!$system_link!!}\">Click here</a> to login to your account and check your tickets.</p><p>Regards,</p><p>{!!$system_from!!}</p>', '', 1, '2017-01-02 00:20:12', '2017-01-02 00:31:50');
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -2134,21 +2136,22 @@ CREATE TABLE `users` (
|
|||||||
`profile_pic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
`profile_pic` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
`created_at` timestamp NULL DEFAULT NULL,
|
||||||
`updated_at` timestamp NULL DEFAULT NULL
|
`updated_at` timestamp NULL DEFAULT NULL,
|
||||||
|
`user_language` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `users`
|
-- Dumping data for table `users`
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `is_delete`, `ext`, `country_code`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vacation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`) VALUES
|
INSERT INTO `users` (`id`, `user_name`, `first_name`, `last_name`, `gender`, `email`, `ban`, `password`, `active`, `is_delete`, `ext`, `country_code`, `phone_number`, `mobile`, `agent_sign`, `account_type`, `account_status`, `assign_group`, `primary_dpt`, `agent_tzone`, `daylight_save`, `limit_access`, `directory_listing`, `vacation_mode`, `company`, `role`, `internal_note`, `profile_pic`, `remember_token`, `created_at`, `updated_at`, `user_language`) VALUES
|
||||||
(1, 'demo_admin', 'Demo', 'Admin', 0, NULL, 0, '$2y$10$ZkHOJeJCKFzLtL4yWXZ3suVZlG.fJwD9oUI3nM5FGESmIkQV1hMXC', 1, 0, '', 0, '', NULL, '', '', '', 1, 1, '', '', '', '', '', '', 'admin', '', '', NULL, '2016-12-13 03:19:53', '2016-12-13 03:19:53'),
|
(1, 'demo_admin', 'Demo', 'Admin', 0, NULL, 0, '$2y$10$ZkHOJeJCKFzLtL4yWXZ3suVZlG.fJwD9oUI3nM5FGESmIkQV1hMXC', 1, 0, '', 0, '', NULL, '', '', '', 1, 1, '', '', '', '', '', '', 'admin', '', '', NULL, '2016-12-13 03:19:53', '2016-12-13 03:19:53', NULL),
|
||||||
(2, 'demo_agent', 'Abhrakasin', 'KK', 0, NULL, 0, '$2y$10$nrMZMd72/HZbnzjBAi0RX.UQrNTtFeZFEK9aq.chDPZZ07rOC/6Ie', 1, 0, '', 0, '', NULL, '', '', '', 1, 1, '79', '', '', '', '', '', 'agent', '', '', NULL, '2016-12-13 03:32:41', '2016-12-13 03:32:42'),
|
(2, 'demo_agent', 'Abhrakasin', 'KK', 0, NULL, 0, '$2y$10$nrMZMd72/HZbnzjBAi0RX.UQrNTtFeZFEK9aq.chDPZZ07rOC/6Ie', 1, 0, '', 0, '', NULL, '', '', '', 1, 1, '79', '', '', '', '', '', 'agent', '', '', NULL, '2016-12-13 03:32:41', '2016-12-13 03:32:42', NULL),
|
||||||
(3, 'Johan', 'Johan', 'Malhotra', 0, NULL, 0, '$2y$10$Eq8SHKUEXCkW5vqiWvA0Iu1UJmzZ.e5.Q3hI2tkxey5HZ2Lmbxb1C', 1, 0, '', 0, '', NULL, '', '', '', 2, 2, '7', '', '', '', '', '', 'agent', '', '', NULL, '2016-12-13 03:35:29', '2016-12-13 03:35:30'),
|
(3, 'Johan', 'Johan', 'Malhotra', 0, NULL, 0, '$2y$10$Eq8SHKUEXCkW5vqiWvA0Iu1UJmzZ.e5.Q3hI2tkxey5HZ2Lmbxb1C', 1, 0, '', 0, '', NULL, '', '', '', 2, 2, '7', '', '', '', '', '', 'agent', '', '', NULL, '2016-12-13 03:35:29', '2016-12-13 03:35:30', NULL),
|
||||||
(4, 'demo_client', 'Fidel Martin', '', 0, NULL, 0, '$2y$10$wHupGhJqz2p4rcdS4eq4ZO.NQ65b0JjVsqhJwEEzOCl3vMKwzh9/S', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'PXj6d2s7rOqoh53gHdyPbiHOVvBmDoR5CnXg9kl7fRolIC92Y20UnFPSOryw', '2016-12-13 03:45:19', '2016-12-13 03:45:19'),
|
(4, 'demo_client', 'Fidel Martin', '', 0, NULL, 0, '$2y$10$wHupGhJqz2p4rcdS4eq4ZO.NQ65b0JjVsqhJwEEzOCl3vMKwzh9/S', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'PXj6d2s7rOqoh53gHdyPbiHOVvBmDoR5CnXg9kl7fRolIC92Y20UnFPSOryw', '2016-12-13 03:45:19', '2016-12-13 03:45:19', NULL),
|
||||||
(5, 'joseph2321@gmail.com', 'Joseph Rossignol', '', 0, NULL, 0, '$2y$10$7eQ0nFxQpQkWaKwUbzTsQ.ufQpRN1rwUGY5ER1KsoXoLd6KbMIHnG', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'nv7Z37jhwAVdt87WCVzsqweY6wUbic7ll44FNmygMmwcnErafCrVpnw6Krys', '2016-12-13 03:50:55', '2016-12-13 03:50:55'),
|
(5, 'joseph2321@gmail.com', 'Joseph Rossignol', '', 0, NULL, 0, '$2y$10$7eQ0nFxQpQkWaKwUbzTsQ.ufQpRN1rwUGY5ER1KsoXoLd6KbMIHnG', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'nv7Z37jhwAVdt87WCVzsqweY6wUbic7ll44FNmygMmwcnErafCrVpnw6Krys', '2016-12-13 03:50:55', '2016-12-13 03:50:55', NULL),
|
||||||
(6, 'ichae1212@gmail.com', 'Ichae Semos', '', 0, NULL, 0, '$2y$10$aITz4IUuaxb0VHwF2V2CPefwf/Ft0VXpmHDC9feEfNXkW90GdjCFm', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'egq0NWPaxEkwkXmV3L0BJ4j4O6aKlgjzNZxea0XpYvCAeVvZLbXsjkKmWyBZ', '2016-12-13 03:55:54', '2016-12-13 03:55:54'),
|
(6, 'ichae1212@gmail.com', 'Ichae Semos', '', 0, NULL, 0, '$2y$10$aITz4IUuaxb0VHwF2V2CPefwf/Ft0VXpmHDC9feEfNXkW90GdjCFm', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', 'egq0NWPaxEkwkXmV3L0BJ4j4O6aKlgjzNZxea0XpYvCAeVvZLbXsjkKmWyBZ', '2016-12-13 03:55:54', '2016-12-13 03:55:54', NULL),
|
||||||
(7, 'kusti09@yahoo.com', 'Kusti Franti', '', 0, NULL, 0, '$2y$10$yNHebbyWfr6m1t4srRlYbuj2JN706ZBpyMI.gSJmuY9czJ3OzuQpq', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', '4JPKOO9UUjZ2yX1GI7WYaeljcdyFATmguwNGuUD9chDodCVfJVGBJvbepgOt', '2016-12-13 03:58:40', '2016-12-13 03:58:40');
|
(7, 'kusti09@yahoo.com', 'Kusti Franti', '', 0, NULL, 0, '$2y$10$yNHebbyWfr6m1t4srRlYbuj2JN706ZBpyMI.gSJmuY9czJ3OzuQpq', 1, 0, '', 0, '', NULL, '', '', '', NULL, NULL, '', '', '', '', '', '', 'user', '', '', '4JPKOO9UUjZ2yX1GI7WYaeljcdyFATmguwNGuUD9chDodCVfJVGBJvbepgOt', '2016-12-13 03:58:40', '2016-12-13 03:58:40', NULL);
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@@ -2260,8 +2263,6 @@ INSERT INTO `widgets` (`id`, `name`, `title`, `value`, `created_at`, `updated_at
|
|||||||
(2, 'footer2', 'Company', '<ul><li>About Us</li><li>Road Map</li><li>Privacy Policy</li><li>Cancellation & Refund Policy<br /></li><li>Term & Condition</li></ul>', '2016-12-13 03:19:30', '2016-12-13 03:21:40'),
|
(2, 'footer2', 'Company', '<ul><li>About Us</li><li>Road Map</li><li>Privacy Policy</li><li>Cancellation & Refund Policy<br /></li><li>Term & Condition</li></ul>', '2016-12-13 03:19:30', '2016-12-13 03:21:40'),
|
||||||
(3, 'footer3', 'Find out More', '<ul><li>Forums</li><li>News</li><li>Blog</li><li>Partner NOC Directory</li></ul>', '2016-12-13 03:19:30', '2016-12-13 03:22:06'),
|
(3, 'footer3', 'Find out More', '<ul><li>Forums</li><li>News</li><li>Blog</li><li>Partner NOC Directory</li></ul>', '2016-12-13 03:19:30', '2016-12-13 03:22:06'),
|
||||||
(4, 'footer4', 'Contact Us', '<div>\r\n <p><i>BTM Layout, No: #28<br />9th Cross First Stage BTM Layout Near Water Tank<br /></i><i>Bangalore – 560 029</i><br /><i>Karnataka – India<br /></i><i>Telephone: </i><i>+91 9999999999<br /></i><i>Email: </i><a><i> support@abcclothing.com</i></a></p></div>', '2016-12-13 03:19:30', '2016-12-13 03:22:34'),
|
(4, 'footer4', 'Contact Us', '<div>\r\n <p><i>BTM Layout, No: #28<br />9th Cross First Stage BTM Layout Near Water Tank<br /></i><i>Bangalore – 560 029</i><br /><i>Karnataka – India<br /></i><i>Telephone: </i><i>+91 9999999999<br /></i><i>Email: </i><a><i> support@abcclothing.com</i></a></p></div>', '2016-12-13 03:19:30', '2016-12-13 03:22:34'),
|
||||||
(5, 'side1', NULL, NULL, '2016-12-13 03:19:30', '2016-12-13 03:19:30'),
|
|
||||||
(6, 'side2', NULL, NULL, '2016-12-13 03:19:30', '2016-12-13 03:19:30'),
|
|
||||||
(7, 'linkedin', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
(7, 'linkedin', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
||||||
(8, 'stumble', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
(8, 'stumble', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
||||||
(9, 'google', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
(9, 'google', NULL, NULL, '2016-12-13 03:19:31', '2016-12-13 03:19:31'),
|
||||||
@@ -2565,6 +2566,12 @@ ALTER TABLE `mailbox_protocol`
|
|||||||
ALTER TABLE `mail_services`
|
ALTER TABLE `mail_services`
|
||||||
ADD PRIMARY KEY (`id`);
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indexes for table `migrations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `migrations`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Indexes for table `notifications`
|
-- Indexes for table `notifications`
|
||||||
--
|
--
|
||||||
@@ -2887,7 +2894,7 @@ ALTER TABLE `banlist`
|
|||||||
-- AUTO_INCREMENT for table `bar_notifications`
|
-- AUTO_INCREMENT for table `bar_notifications`
|
||||||
--
|
--
|
||||||
ALTER TABLE `bar_notifications`
|
ALTER TABLE `bar_notifications`
|
||||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
|
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
||||||
--
|
--
|
||||||
-- AUTO_INCREMENT for table `canned_response`
|
-- AUTO_INCREMENT for table `canned_response`
|
||||||
--
|
--
|
||||||
@@ -2897,7 +2904,7 @@ ALTER TABLE `canned_response`
|
|||||||
-- AUTO_INCREMENT for table `common_settings`
|
-- AUTO_INCREMENT for table `common_settings`
|
||||||
--
|
--
|
||||||
ALTER TABLE `common_settings`
|
ALTER TABLE `common_settings`
|
||||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
|
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
|
||||||
--
|
--
|
||||||
-- AUTO_INCREMENT for table `conditions`
|
-- AUTO_INCREMENT for table `conditions`
|
||||||
--
|
--
|
||||||
@@ -3034,6 +3041,11 @@ ALTER TABLE `mailbox_protocol`
|
|||||||
ALTER TABLE `mail_services`
|
ALTER TABLE `mail_services`
|
||||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
|
||||||
--
|
--
|
||||||
|
-- AUTO_INCREMENT for table `migrations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `migrations`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=99;
|
||||||
|
--
|
||||||
-- AUTO_INCREMENT for table `notifications`
|
-- AUTO_INCREMENT for table `notifications`
|
||||||
--
|
--
|
||||||
ALTER TABLE `notifications`
|
ALTER TABLE `notifications`
|
||||||
|
20
DB/update from v1.9.6 to v1.10/updatedatabase.sql
Normal file
20
DB/update from v1.9.6 to v1.10/updatedatabase.sql
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
--
|
||||||
|
-- Alter users table add user_language column
|
||||||
|
--
|
||||||
|
ALTER TABLE `users` ADD `user_language` VARCHAR(10) NULL DEFAULT NULL AFTER `updated_at`;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Alter emails table make user_name colums as nullable
|
||||||
|
--
|
||||||
|
ALTER TABLE `emails` CHANGE `user_name` `user_name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Alter migration table
|
||||||
|
--
|
||||||
|
ALTER TABLE `migrations` ADD `id` INT NOT NULL AUTO_INCREMENT AFTER `batch`, ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Delete side1 and side2 from widgets
|
||||||
|
--
|
||||||
|
DELETE FROM `widgets` WHERE `widgets`.`id` = 5;
|
||||||
|
DELETE FROM `widgets` WHERE `widgets`.`id` = 6;
|
@@ -18,8 +18,8 @@ Flavors of Faveo
|
|||||||
|
|
||||||
Faveo Documentation
|
Faveo Documentation
|
||||||
--------------------------
|
--------------------------
|
||||||
* <a href="http://www.ladybirdweb.com/support/knowledgebase" target="_blank">Faveo user Manual</a>
|
* <a href="https://www.support.faveohelpdesk.com/knowledgebase" target="_blank">Faveo user Manual</a>
|
||||||
* <a href="https://docs.google.com/document/d/1-ZQ9pueqBNPSD-FZ24sLO_2fgoifKLorN_ocCEYZ1hM/" target="_blank">Faveo API Documentation</a>
|
* <a href="https://docs.google.com/document/d/1WjpxazjUjbI8Hs5GYbbEE0ESDvpp_mVicfRbsoysH1A/edit?usp=sharing" target="_blank">Faveo API Documentation</a>
|
||||||
* <a href="https://docs.google.com/document/d/1pXpsQKcTyX5x6H4xA8unYxd5Duw2k94xt7wevTdoF_E/" target="_blank">Faveo Event List</a>
|
* <a href="https://docs.google.com/document/d/1pXpsQKcTyX5x6H4xA8unYxd5Duw2k94xt7wevTdoF_E/" target="_blank">Faveo Event List</a>
|
||||||
* <a href="https://docs.google.com/document/d/1PGcpB19Vr42rM_DrCzC3snujzEL8N9Ocy0yewfPNWqU/" target="_blank">Faveo Plugin creation guide</a>
|
* <a href="https://docs.google.com/document/d/1PGcpB19Vr42rM_DrCzC3snujzEL8N9Ocy0yewfPNWqU/" target="_blank">Faveo Plugin creation guide</a>
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ Requirements
|
|||||||
--------------------------
|
--------------------------
|
||||||
To run Faveo your host just needs a couple of things:
|
To run Faveo your host just needs a couple of things:
|
||||||
|
|
||||||
* PHP Version: 5.6+
|
* PHP Version: 7.1.3+
|
||||||
* Database: MySQL 5.0+
|
* Database: MySQL 5.0+
|
||||||
* Web Server: Apache / IIS / Nginx
|
* Web Server: Apache / IIS / Nginx
|
||||||
* PHP Extensions: Imap, Mbstring, Mcrypt, OpenSSL, PDO, Tokenizer, XML, Zip
|
* PHP Extensions: Imap, Mbstring, Mcrypt, OpenSSL, PDO, Tokenizer, XML, Zip
|
||||||
|
34
app/Api/ApiServiceProvider.php
Normal file
34
app/Api/ApiServiceProvider.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Api;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class ApiServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Bootstrap the application events.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the service provider.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
// Add routes
|
||||||
|
// if (isInstall()) {
|
||||||
|
$routes = app_path('/Api/routes.php');
|
||||||
|
if (file_exists($routes)) {
|
||||||
|
require $routes;
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
63
app/Api/routes.php
Normal file
63
app/Api/routes.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* ================================================================================================
|
||||||
|
* @version v1
|
||||||
|
* @access public
|
||||||
|
* @copyright (c) 2016, Ladybird web solution
|
||||||
|
* @author Vijay Sebastian<vijay.sebastian@ladybirdweb.com>
|
||||||
|
* @name Faveo
|
||||||
|
*/
|
||||||
|
Route::group(['prefix' => 'api/v1'], function () {
|
||||||
|
Route::post('authenticate', '\App\Api\v1\TokenAuthController@authenticate');
|
||||||
|
Route::get('authenticate/user', '\App\Api\v1\TokenAuthController@getAuthenticatedUser');
|
||||||
|
Route::get('/database-config', ['as' => 'database-config', 'uses' => '\App\Api\v1\InstallerApiController@config_database']);
|
||||||
|
Route::get('/system-config', ['as' => 'database-config', 'uses' => '\App\Api\v1\InstallerApiController@config_system']);
|
||||||
|
/*
|
||||||
|
* Helpdesk
|
||||||
|
*/
|
||||||
|
Route::group(['prefix' => 'helpdesk'], function () {
|
||||||
|
Route::post('create', '\App\Api\v1\ApiController@createTicket');
|
||||||
|
Route::post('reply', '\App\Api\v1\ApiController@ticketReply');
|
||||||
|
Route::post('edit', '\App\Api\v1\ApiController@editTicket');
|
||||||
|
Route::post('delete', '\App\Api\v1\ApiController@deleteTicket');
|
||||||
|
Route::post('assign', '\App\Api\v1\ApiController@assignTicket');
|
||||||
|
Route::get('open', '\App\Api\v1\ApiController@openedTickets');
|
||||||
|
Route::get('unassigned', '\App\Api\v1\ApiController@unassignedTickets');
|
||||||
|
Route::get('closed', '\App\Api\v1\ApiController@closeTickets');
|
||||||
|
Route::get('agents', '\App\Api\v1\ApiController@getAgents');
|
||||||
|
Route::get('teams', '\App\Api\v1\ApiController@getTeams');
|
||||||
|
Route::get('customers', '\App\Api\v1\ApiController@getCustomers');
|
||||||
|
Route::get('customer', '\App\Api\v1\ApiController@getCustomer');
|
||||||
|
Route::get('ticket-search', '\App\Api\v1\ApiController@searchTicket');
|
||||||
|
Route::get('ticket-thread', '\App\Api\v1\ApiController@ticketThreads');
|
||||||
|
Route::get('url', '\App\Api\v1\ApiExceptAuthController@checkUrl');
|
||||||
|
Route::get('check-url', '\App\Api\v1\ApiExceptAuthController@urlResult');
|
||||||
|
Route::get('api_key', '\App\Api\v1\ApiController@generateApiKey');
|
||||||
|
Route::get('help-topic', '\App\Api\v1\ApiController@getHelpTopic');
|
||||||
|
Route::get('sla-plan', '\App\Api\v1\ApiController@getSlaPlan');
|
||||||
|
Route::get('priority', '\App\Api\v1\ApiController@getPriority');
|
||||||
|
Route::get('department', '\App\Api\v1\ApiController@getDepartment');
|
||||||
|
Route::get('tickets', '\App\Api\v1\ApiController@getTickets');
|
||||||
|
Route::get('ticket', '\App\Api\v1\ApiController@getTicketById');
|
||||||
|
Route::get('inbox', '\App\Api\v1\ApiController@inbox');
|
||||||
|
Route::get('trash', '\App\Api\v1\ApiController@getTrash');
|
||||||
|
Route::get('my-tickets-agent', '\App\Api\v1\ApiController@getMyTicketsAgent');
|
||||||
|
Route::post('internal-note', '\App\Api\v1\ApiController@internalNote');
|
||||||
|
/*
|
||||||
|
* Newly added
|
||||||
|
*/
|
||||||
|
Route::get('customers-custom', '\App\Api\v1\ApiController@getCustomersWith');
|
||||||
|
Route::get('collaborator/search', '\App\Api\v1\ApiController@collaboratorSearch');
|
||||||
|
Route::post('collaborator/create', '\App\Api\v1\ApiController@addCollaboratorForTicket');
|
||||||
|
Route::post('collaborator/remove', '\App\Api\v1\ApiController@deleteCollaborator');
|
||||||
|
Route::post('collaborator/get-ticket', '\App\Api\v1\ApiController@getCollaboratorForTicket');
|
||||||
|
Route::get('my-tickets-user', '\App\Api\v1\ApiController@getMyTicketsUser');
|
||||||
|
Route::get('dependency', '\App\Api\v1\ApiController@dependency');
|
||||||
|
Route::post('register', '\App\Api\v1\ApiController@createUser');
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FCM token response
|
||||||
|
*/
|
||||||
|
Route::post('fcmtoken', ['as' => 'fcmtoken', 'uses' => 'Common\PushNotificationController@fcmToken']);
|
||||||
|
});
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Api\v1;
|
namespace App\Api\v1;
|
||||||
|
|
||||||
use App\Http\Controllers\Agent\helpdesk\TicketController as CoreTicketController;
|
use App\Http\Controllers\Agent\helpdesk\TicketController as CoreTicketController;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
@@ -59,7 +59,7 @@ class ApiController extends Controller
|
|||||||
{
|
{
|
||||||
$this->request = $request;
|
$this->request = $request;
|
||||||
|
|
||||||
$this->middleware('jwt.auth');
|
$this->middleware('jwt.authOveride');
|
||||||
$this->middleware('api', ['except' => 'GenerateApiKey']);
|
$this->middleware('api', ['except' => 'GenerateApiKey']);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -187,7 +187,7 @@ class ApiController extends Controller
|
|||||||
//dd($this->request->all());
|
//dd($this->request->all());
|
||||||
try {
|
try {
|
||||||
$v = \Validator::make($this->request->all(), [
|
$v = \Validator::make($this->request->all(), [
|
||||||
'ticket_ID' => 'required|exists:tickets,id',
|
'ticket_id' => 'required|exists:tickets,id',
|
||||||
'reply_content' => 'required',
|
'reply_content' => 'required',
|
||||||
]);
|
]);
|
||||||
if ($v->fails()) {
|
if ($v->fails()) {
|
||||||
@@ -316,9 +316,9 @@ class ApiController extends Controller
|
|||||||
->groupby('tickets.id')
|
->groupby('tickets.id')
|
||||||
->distinct()
|
->distinct()
|
||||||
->paginate(10)
|
->paginate(10)
|
||||||
->toJson();
|
->toArray();
|
||||||
|
|
||||||
return $result;
|
return response($result);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$error = $e->getMessage();
|
$error = $e->getMessage();
|
||||||
$line = $e->getLine();
|
$line = $e->getLine();
|
||||||
@@ -370,9 +370,9 @@ class ApiController extends Controller
|
|||||||
->groupby('tickets.id')
|
->groupby('tickets.id')
|
||||||
->distinct()
|
->distinct()
|
||||||
->paginate(10)
|
->paginate(10)
|
||||||
->toJson();
|
->toArray();
|
||||||
|
|
||||||
return $unassigned;
|
return response($unassigned);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$error = $e->getMessage();
|
$error = $e->getMessage();
|
||||||
$line = $e->getLine();
|
$line = $e->getLine();
|
||||||
@@ -423,9 +423,9 @@ class ApiController extends Controller
|
|||||||
->groupby('tickets.id')
|
->groupby('tickets.id')
|
||||||
->distinct()
|
->distinct()
|
||||||
->paginate(10)
|
->paginate(10)
|
||||||
->toJson();
|
->toArray();
|
||||||
|
|
||||||
return $result;
|
return response($result);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$error = $e->getMessage();
|
$error = $e->getMessage();
|
||||||
$line = $e->getLine();
|
$line = $e->getLine();
|
||||||
@@ -988,9 +988,9 @@ class ApiController extends Controller
|
|||||||
->groupby('tickets.id')
|
->groupby('tickets.id')
|
||||||
->distinct()
|
->distinct()
|
||||||
->paginate(10)
|
->paginate(10)
|
||||||
->toJson();
|
->toArray();
|
||||||
|
|
||||||
return $inbox;
|
return response($inbox);
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
$error = $ex->getMessage();
|
$error = $ex->getMessage();
|
||||||
$line = $ex->getLine();
|
$line = $ex->getLine();
|
||||||
@@ -1013,8 +1013,8 @@ class ApiController extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$v = \Validator::make($this->request->all(), [
|
$v = \Validator::make($this->request->all(), [
|
||||||
'userid' => 'required|exists:users,id',
|
'user_id' => 'required|exists:users,id',
|
||||||
'ticketid' => 'required|exists:tickets,id',
|
'ticket_id' => 'required|exists:tickets,id',
|
||||||
'body' => 'required',
|
'body' => 'required',
|
||||||
]);
|
]);
|
||||||
if ($v->fails()) {
|
if ($v->fails()) {
|
||||||
@@ -1022,8 +1022,8 @@ class ApiController extends Controller
|
|||||||
|
|
||||||
return response()->json(compact('error'));
|
return response()->json(compact('error'));
|
||||||
}
|
}
|
||||||
$userid = $this->request->input('userid');
|
$userid = $this->request->input('user_id');
|
||||||
$ticketid = $this->request->input('ticketid');
|
$ticketid = $this->request->input('ticket_id');
|
||||||
|
|
||||||
$body = preg_replace('/[ ](?=[^>]*(?:<|$))/', ' ', nl2br($this->request->input('body')));
|
$body = preg_replace('/[ ](?=[^>]*(?:<|$))/', ' ', nl2br($this->request->input('body')));
|
||||||
$thread = $this->thread->create(['ticket_id' => $ticketid, 'user_id' => $userid, 'is_internal' => 1, 'body' => $body]);
|
$thread = $this->thread->create(['ticket_id' => $ticketid, 'user_id' => $userid, 'is_internal' => 1, 'body' => $body]);
|
||||||
@@ -1072,9 +1072,9 @@ class ApiController extends Controller
|
|||||||
->groupby('tickets.id')
|
->groupby('tickets.id')
|
||||||
->distinct()
|
->distinct()
|
||||||
->paginate(10)
|
->paginate(10)
|
||||||
->toJson();
|
->toArray();
|
||||||
|
|
||||||
return $trash;
|
return response($trash);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$error = $e->getMessage();
|
$error = $e->getMessage();
|
||||||
$line = $e->getLine();
|
$line = $e->getLine();
|
||||||
@@ -1129,9 +1129,9 @@ class ApiController extends Controller
|
|||||||
->groupby('tickets.id')
|
->groupby('tickets.id')
|
||||||
->distinct()
|
->distinct()
|
||||||
->paginate(10)
|
->paginate(10)
|
||||||
->toJson();
|
->toArray();
|
||||||
|
|
||||||
return $result;
|
return response($result);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$error = $e->getMessage();
|
$error = $e->getMessage();
|
||||||
$line = $e->getLine();
|
$line = $e->getLine();
|
||||||
@@ -1206,14 +1206,14 @@ class ApiController extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$v = \Validator::make($this->request->all(), [
|
$v = \Validator::make($this->request->all(), [
|
||||||
'id' => 'required|exists:tickets,id',
|
'ticket_id' => 'required|exists:tickets,id',
|
||||||
]);
|
]);
|
||||||
if ($v->fails()) {
|
if ($v->fails()) {
|
||||||
$error = $v->errors();
|
$error = $v->errors();
|
||||||
|
|
||||||
return response()->json(compact('error'));
|
return response()->json(compact('error'));
|
||||||
}
|
}
|
||||||
$id = $this->request->input('id');
|
$id = $this->request->input('ticket_id');
|
||||||
if (!$this->model->where('id', $id)->first()) {
|
if (!$this->model->where('id', $id)->first()) {
|
||||||
$error = 'There is no Ticket as ticket id: '.$id;
|
$error = 'There is no Ticket as ticket id: '.$id;
|
||||||
|
|
||||||
@@ -1229,11 +1229,25 @@ class ApiController extends Controller
|
|||||||
->leftJoin('ticket_priority', 'tickets.priority_id', '=', 'ticket_priority.priority_id')
|
->leftJoin('ticket_priority', 'tickets.priority_id', '=', 'ticket_priority.priority_id')
|
||||||
->leftJoin('ticket_status', 'tickets.status', '=', 'ticket_status.id')
|
->leftJoin('ticket_status', 'tickets.status', '=', 'ticket_status.id')
|
||||||
->leftJoin('sla_plan', 'tickets.sla', '=', 'sla_plan.id')
|
->leftJoin('sla_plan', 'tickets.sla', '=', 'sla_plan.id')
|
||||||
->leftJoin('ticket_source', 'tickets.source', '=', 'ticket_source.id');
|
->leftJoin('ticket_source', 'tickets.source', '=', 'ticket_source.id')
|
||||||
|
->leftJoin('help_topic', 'tickets.help_topic_id', '=', 'help_topic.id');
|
||||||
//$select = 'users.email','users.user_name','users.first_name','users.last_name','tickets.id','ticket_number','num_sequence','user_id','priority_id','sla','max_open_ticket','captcha','status','lock_by','lock_at','source','isoverdue','reopened','isanswered','is_deleted', 'closed','is_transfer','transfer_at','reopened_at','duedate','closed_at','last_message_at';
|
//$select = 'users.email','users.user_name','users.first_name','users.last_name','tickets.id','ticket_number','num_sequence','user_id','priority_id','sla','max_open_ticket','captcha','status','lock_by','lock_at','source','isoverdue','reopened','isanswered','is_deleted', 'closed','is_transfer','transfer_at','reopened_at','duedate','closed_at','last_message_at';
|
||||||
|
|
||||||
$result = $response->addSelect(
|
$result = $response->addSelect(
|
||||||
'users.email', 'users.user_name', 'users.first_name', 'users.last_name', 'tickets.id', 'ticket_number', 'user_id', 'ticket_priority.priority_id', 'ticket_priority.priority as priority_name', 'department.name as dept_name', 'ticket_status.name as status_name', 'sla_plan.name as sla_name', 'ticket_source.name as source_name', 'sla_plan.id as sla', 'ticket_status.id as status', 'lock_by', 'lock_at', 'ticket_source.id as source', 'isoverdue', 'reopened', 'isanswered', 'is_deleted', 'closed', 'reopened_at', 'duedate', 'closed_at', 'tickets.created_at', 'tickets.updated_at')->first();
|
'users.email', 'users.user_name', 'users.first_name', 'users.last_name', 'tickets.id', 'ticket_number', 'user_id', 'ticket_priority.priority_id', 'ticket_priority.priority as priority_name', 'department.name as dept_name', 'ticket_status.name as status_name', 'sla_plan.name as sla_name', 'ticket_source.name as source_name', 'sla_plan.id as sla', 'ticket_status.id as status', 'lock_by', 'lock_at', 'ticket_source.id as source', 'isoverdue', 'reopened', 'isanswered', 'is_deleted', 'closed', 'reopened_at', 'duedate', 'closed_at', 'tickets.created_at', 'tickets.updated_at', 'ticket_priority.priority_color as priority_color', 'help_topic.id as helptopic_id', 'help_topic.topic as helptopic_name')->first();
|
||||||
|
// $resultticket_source
|
||||||
|
$result = $result->toArray();
|
||||||
|
$result['title'] = utfEncoding(Ticket_Thread::where('ticket_id', $id)->orderBy('id')->first()->value('title'));
|
||||||
|
$assigned = Tickets::where('id', $id)->select('assigned_to', 'team_id')->first()->toArray();
|
||||||
|
if (!empty($assigned)) {
|
||||||
|
if ($assigned['assigned_to'] != null) {
|
||||||
|
$result['assignee'] = User::where('id', $assigned['assigned_to'])->first()->name();
|
||||||
|
} elseif ($assigned['team_id'] != null) {
|
||||||
|
$result['assignee'] = Teams::where('id', $assigned['team_id'])->first()->value('name');
|
||||||
|
} else {
|
||||||
|
$result['assignee'] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json(compact('result'));
|
return response()->json(compact('result'));
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -1422,7 +1436,7 @@ class ApiController extends Controller
|
|||||||
$tickets = $tickets->whereIn('tickets.dept_id', $dept)->orWhere('assigned_to', '=', $user->id);
|
$tickets = $tickets->whereIn('tickets.dept_id', $dept)->orWhere('assigned_to', '=', $user->id);
|
||||||
}
|
}
|
||||||
$department = $this->department->select('name', 'id')->get()->toArray();
|
$department = $this->department->select('name', 'id')->get()->toArray();
|
||||||
$sla = $this->slaPlan->select('name', 'id')->get()->toArray();
|
$sla = $this->slaPlan->select('name', 'id', 'grace_period as sla_duration')->get()->toArray();
|
||||||
$staff = $this->user->where('role', 'agent')->select('email', 'id')->get()->toArray();
|
$staff = $this->user->where('role', 'agent')->select('email', 'id')->get()->toArray();
|
||||||
$team = $this->team->select('name', 'id')->get()->toArray();
|
$team = $this->team->select('name', 'id')->get()->toArray();
|
||||||
$priority = \DB::table('ticket_priority')->select('priority', 'priority_id')->get();
|
$priority = \DB::table('ticket_priority')->select('priority', 'priority_id')->get();
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Api\v1;
|
namespace App\Api\v1;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Api\v1;
|
namespace App\Api\v1;
|
||||||
|
|
||||||
// controllers
|
// controllers
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
@@ -36,6 +36,15 @@ class InstallerApiController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function config_database(Request $request)
|
public function config_database(Request $request)
|
||||||
{
|
{
|
||||||
|
$rules = [
|
||||||
|
'database' => 'required|min:1',
|
||||||
|
'host' => 'required',
|
||||||
|
'databasename' => 'required|min:1',
|
||||||
|
'dbusername' => 'required|min:1',
|
||||||
|
];
|
||||||
|
if ($request->port) {
|
||||||
|
$rules['port'] = 'integer|min:0';
|
||||||
|
}
|
||||||
$validator = \Validator::make(
|
$validator = \Validator::make(
|
||||||
[
|
[
|
||||||
'database' => $request->database,
|
'database' => $request->database,
|
||||||
@@ -43,14 +52,7 @@ class InstallerApiController extends Controller
|
|||||||
'databasename' => $request->databasename,
|
'databasename' => $request->databasename,
|
||||||
'dbusername' => $request->dbusername,
|
'dbusername' => $request->dbusername,
|
||||||
'port' => $request->port,
|
'port' => $request->port,
|
||||||
],
|
], $rules
|
||||||
[
|
|
||||||
'database' => 'required|min:1',
|
|
||||||
'host' => 'required',
|
|
||||||
'databasename' => 'required|min:1',
|
|
||||||
'dbusername' => 'required|min:1',
|
|
||||||
'port' => 'integer|min:0',
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
$jsons = $validator->messages();
|
$jsons = $validator->messages();
|
||||||
@@ -76,7 +78,7 @@ class InstallerApiController extends Controller
|
|||||||
$port = $request->port;
|
$port = $request->port;
|
||||||
if (isset($default) && isset($host) && isset($database) && isset($dbusername)) {
|
if (isset($default) && isset($host) && isset($database) && isset($dbusername)) {
|
||||||
// Setting environment values
|
// Setting environment values
|
||||||
$ENV['APP_ENV'] = 'production';
|
$ENV['APP_ENV'] = 'development';
|
||||||
$ENV['APP_DEBUG'] = 'false';
|
$ENV['APP_DEBUG'] = 'false';
|
||||||
$ENV['APP_KEY'] = 'SomeRandomString';
|
$ENV['APP_KEY'] = 'SomeRandomString';
|
||||||
$ENV['APP_URL'] = 'http://localhost';
|
$ENV['APP_URL'] = 'http://localhost';
|
||||||
@@ -96,7 +98,10 @@ class InstallerApiController extends Controller
|
|||||||
$ENV['CACHE_DRIVER'] = 'file';
|
$ENV['CACHE_DRIVER'] = 'file';
|
||||||
$ENV['SESSION_DRIVER'] = 'file';
|
$ENV['SESSION_DRIVER'] = 'file';
|
||||||
$ENV['QUEUE_DRIVER'] = 'sync';
|
$ENV['QUEUE_DRIVER'] = 'sync';
|
||||||
|
$ENV['JWT_TTL'] = 4;
|
||||||
|
$ENV['FCM_SERVER_KEY'] = 'AIzaSyCyx5OFnsRFUmDLTMbPV50ZMDUGSG-bLw4';
|
||||||
|
$ENV['FCM_SENDER_ID'] = '661051343223';
|
||||||
|
$ENV['REDIS_DATABASE'] = '0';
|
||||||
$config = '';
|
$config = '';
|
||||||
|
|
||||||
foreach ($ENV as $key => $val) {
|
foreach ($ENV as $key => $val) {
|
||||||
@@ -165,7 +170,8 @@ class InstallerApiController extends Controller
|
|||||||
// Migrate database
|
// Migrate database
|
||||||
Artisan::call('migrate', ['--force' => true]);
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
Artisan::call('db:seed', ['--force' => true]);
|
Artisan::call('db:seed', ['--force' => true]);
|
||||||
|
Artisan::call('key:generate');
|
||||||
|
Artisan::call('jwt:secret');
|
||||||
// checking requested timezone for the admin and system
|
// checking requested timezone for the admin and system
|
||||||
$timezones = Timezones::where('name', '=', $timezone)->first();
|
$timezones = Timezones::where('name', '=', $timezone)->first();
|
||||||
if ($timezones == null) {
|
if ($timezones == null) {
|
||||||
@@ -220,7 +226,9 @@ class InstallerApiController extends Controller
|
|||||||
$datacontent2 = File::get($app_url);
|
$datacontent2 = File::get($app_url);
|
||||||
$datacontent2 = str_replace('http://localhost', $link, $datacontent2);
|
$datacontent2 = str_replace('http://localhost', $link, $datacontent2);
|
||||||
File::put($app_url, $datacontent2);
|
File::put($app_url, $datacontent2);
|
||||||
Artisan::call('key:generate');
|
$datacontent3 = File::get($app_url);
|
||||||
|
$datacontent3 = str_replace('APP_ENV=development', 'APP_ENV=production', $datacontent3);
|
||||||
|
File::put($app_url, $datacontent3);
|
||||||
// If user created return success
|
// If user created return success
|
||||||
if ($user) {
|
if ($user) {
|
||||||
return ['response' => 'success', 'status' => '1'];
|
return ['response' => 'success', 'status' => '1'];
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Api\v1;
|
namespace App\Api\v1;
|
||||||
|
|
||||||
use App\Http\Controllers\Common\PhpMailController;
|
use App\Http\Controllers\Common\PhpMailController;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
@@ -266,7 +266,7 @@ class TicketController extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$check_attachment = null;
|
$check_attachment = null;
|
||||||
$eventthread = $thread->where('ticket_id', $request->input('ticket_ID'))->first();
|
$eventthread = $thread->where('ticket_id', $request->input('ticket_id'))->first();
|
||||||
//dd($request->input('ticket_ID'));
|
//dd($request->input('ticket_ID'));
|
||||||
//dd($eventthread);
|
//dd($eventthread);
|
||||||
$eventuserid = $eventthread->user_id;
|
$eventuserid = $eventthread->user_id;
|
||||||
@@ -276,13 +276,12 @@ class TicketController extends Controller
|
|||||||
|
|
||||||
$form_data = $request->except('reply_content', 'ticket_ID', 'attachment');
|
$form_data = $request->except('reply_content', 'ticket_ID', 'attachment');
|
||||||
\Event::fire(new \App\Events\ClientTicketFormPost($form_data, $emailadd, $source));
|
\Event::fire(new \App\Events\ClientTicketFormPost($form_data, $emailadd, $source));
|
||||||
//dd('yes');
|
|
||||||
$reply_content = $request->input('reply_content');
|
$reply_content = $request->input('reply_content');
|
||||||
$thread->ticket_id = $request->input('ticket_ID');
|
$thread->ticket_id = $request->input('ticket_id');
|
||||||
$thread->poster = 'support';
|
$thread->poster = 'support';
|
||||||
$thread->body = $request->input('reply_content');
|
$thread->body = $request->input('reply_content');
|
||||||
$thread->user_id = Auth::user()->id;
|
$thread->user_id = Auth::user()->id;
|
||||||
$ticket_id = $request->input('ticket_ID');
|
$ticket_id = $request->input('ticket_id');
|
||||||
$tickets = Tickets::where('id', '=', $ticket_id)->first();
|
$tickets = Tickets::where('id', '=', $ticket_id)->first();
|
||||||
$tickets->isanswered = '1';
|
$tickets->isanswered = '1';
|
||||||
$tickets->save();
|
$tickets->save();
|
||||||
@@ -377,7 +376,6 @@ class TicketController extends Controller
|
|||||||
|
|
||||||
return $thread;
|
return $thread;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
//dd($e);
|
|
||||||
return $e->getMessage();
|
return $e->getMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -627,7 +625,7 @@ class TicketController extends Controller
|
|||||||
public function autosearch()
|
public function autosearch()
|
||||||
{
|
{
|
||||||
$term = \Input::get('term');
|
$term = \Input::get('term');
|
||||||
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->orWhere('first_name', 'LIKE', '%'.$term.'%')->orWhere('last_name', 'LIKE', '%'.$term.'%')->orWhere('user_name', 'LIKE', '%'.$term.'%')->lists('email');
|
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->orWhere('first_name', 'LIKE', '%'.$term.'%')->orWhere('last_name', 'LIKE', '%'.$term.'%')->orWhere('user_name', 'LIKE', '%'.$term.'%')->pluck('email');
|
||||||
|
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Api\v1;
|
namespace App\Api\v1;
|
||||||
|
|
||||||
use App\Http\Controllers\Common\PhpMailController;
|
use App\Http\Controllers\Common\PhpMailController;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
@@ -29,7 +29,7 @@ class TokenAuthController extends Controller
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->middleware('api');
|
$this->middleware('api');
|
||||||
|
$this->middleware('jwt.authOveride')->only('getAuthenticatedUser');
|
||||||
$PhpMailController = new PhpMailController();
|
$PhpMailController = new PhpMailController();
|
||||||
$this->PhpMailController = $PhpMailController;
|
$this->PhpMailController = $PhpMailController;
|
||||||
}
|
}
|
@@ -17,18 +17,18 @@ class BaseModel extends Model
|
|||||||
{
|
{
|
||||||
public function setAttribute($property, $value)
|
public function setAttribute($property, $value)
|
||||||
{
|
{
|
||||||
require_once base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier.auto.php');
|
// require_once base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier.auto.php');
|
||||||
$path = base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier'.DIRECTORY_SEPARATOR.'DefinitionCache'.DIRECTORY_SEPARATOR.'Serializer');
|
// $path = base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier'.DIRECTORY_SEPARATOR.'DefinitionCache'.DIRECTORY_SEPARATOR.'Serializer');
|
||||||
if (!File::exists($path)) {
|
// if (!File::exists($path)) {
|
||||||
File::makeDirectory($path, $mode = 0777, true, true);
|
// File::makeDirectory($path, $mode = 0777, true, true);
|
||||||
}
|
// }
|
||||||
$config = \HTMLPurifier_Config::createDefault();
|
// $config = \HTMLPurifier_Config::createDefault();
|
||||||
$config->set('HTML.Trusted', true);
|
// $config->set('HTML.Trusted', true);
|
||||||
$config->set('Filter.YouTube', true);
|
// $config->set('Filter.YouTube', true);
|
||||||
$purifier = new \HTMLPurifier($config);
|
// $purifier = new \HTMLPurifier($config);
|
||||||
if ($value != strip_tags($value)) {
|
// if ($value != strip_tags($value)) {
|
||||||
$value = $purifier->purify($value);
|
// $value = $purifier->purify($value);
|
||||||
}
|
// }
|
||||||
parent::setAttribute($property, $value);
|
parent::setAttribute($property, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
56
app/Console/Commands/DropTables.php
Normal file
56
app/Console/Commands/DropTables.php
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use DB;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class DropTables extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'droptables';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Drops all tables';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$colname = 'Tables_in_'.env('DB_DATABASE');
|
||||||
|
|
||||||
|
$droplist = \Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
|
||||||
|
$droplist = implode(',', $droplist);
|
||||||
|
|
||||||
|
DB::beginTransaction();
|
||||||
|
//turn off referential integrity
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS = 0');
|
||||||
|
DB::statement("DROP TABLE $droplist");
|
||||||
|
//turn referential integrity back on
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS = 1');
|
||||||
|
DB::commit();
|
||||||
|
|
||||||
|
$this->comment(PHP_EOL.'If no errors showed up, all tables were dropped'.PHP_EOL);
|
||||||
|
}
|
||||||
|
}
|
93
app/Console/Commands/Install.php
Normal file
93
app/Console/Commands/Install.php
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Installer\helpdesk\InstallController;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class Install extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'install:faveo';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'to install faveo';
|
||||||
|
protected $install;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->install = new InstallController();
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->appEnv();
|
||||||
|
if ($this->confirm('Do you want to intall faveo?')) {
|
||||||
|
$default = $this->choice(
|
||||||
|
'Which sql engine would you like to use?', ['mysql']
|
||||||
|
);
|
||||||
|
$host = $this->ask('Enter your sql host');
|
||||||
|
$database = $this->ask('Enter your database name');
|
||||||
|
$dbusername = $this->ask('Enter your database username');
|
||||||
|
$dbpassword = $this->ask('Enter your database password (blank if not entered)', false);
|
||||||
|
$port = $this->ask('Enter your sql port (blank if not entered)', false);
|
||||||
|
$this->install->env($default, $host, $port, $database, $dbusername, $dbpassword);
|
||||||
|
$this->info('.env file has created');
|
||||||
|
$this->call('preinsatall:check');
|
||||||
|
$this->alert("please run 'php artisan install:db'");
|
||||||
|
} else {
|
||||||
|
$this->info('We hope, you will try next time');
|
||||||
|
}
|
||||||
|
} catch (\Exception $ex) {
|
||||||
|
$this->error($ex->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function appEnv()
|
||||||
|
{
|
||||||
|
$extensions = [
|
||||||
|
'curl', 'ctype', 'imap', 'mbstring',
|
||||||
|
'openssl', 'tokenizer', 'zip',
|
||||||
|
'pdo', 'mysqli', 'bcmath', 'iconv',
|
||||||
|
'XML', 'json', 'fileinfo',
|
||||||
|
];
|
||||||
|
$result = [];
|
||||||
|
foreach ($extensions as $key => $extension) {
|
||||||
|
$result[$key]['extension'] = $extension;
|
||||||
|
if (!extension_loaded($extension)) {
|
||||||
|
$result[$key]['status'] = "Not Loading, Please open '".php_ini_loaded_file()."' and add 'extension = ".$extension;
|
||||||
|
} else {
|
||||||
|
$result[$key]['status'] = 'Loading';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result['php']['extension'] = 'PHP';
|
||||||
|
if (phpversion() >= 7.1) {
|
||||||
|
$result['php']['status'] = 'PHP version supports';
|
||||||
|
} else {
|
||||||
|
$result['php']['status'] = "PHP version doesn't supports please upgrade to 7.1+";
|
||||||
|
}
|
||||||
|
|
||||||
|
$headers = ['Extension', 'Status'];
|
||||||
|
$this->table($headers, $result);
|
||||||
|
}
|
||||||
|
}
|
89
app/Console/Commands/InstallDB.php
Normal file
89
app/Console/Commands/InstallDB.php
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Installer\helpdesk\InstallController;
|
||||||
|
use DB;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class InstallDB extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'install:db';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'installing database';
|
||||||
|
protected $install;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->install = new InstallController();
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if ($this->confirm('Do you want to migrate tables now?')) {
|
||||||
|
$env = base_path().DIRECTORY_SEPARATOR.'.env';
|
||||||
|
if (!is_file($env)) {
|
||||||
|
throw new \Exception("Please run 'php artisan install:faveo'");
|
||||||
|
}
|
||||||
|
$dummy_confirm = $this->confirm('Would you like to install dummy data in database to test before going live?');
|
||||||
|
$this->call('key:generate', ['--force' => true]);
|
||||||
|
if (!$dummy_confirm) {
|
||||||
|
$this->call('install:migrate');
|
||||||
|
$this->call('install:seed');
|
||||||
|
} else {
|
||||||
|
$path = base_path().'/DB/dummy-data.sql';
|
||||||
|
DB::unprepared(file_get_contents($path));
|
||||||
|
}
|
||||||
|
$headers = ['user_name', 'email', 'password'];
|
||||||
|
$data = [
|
||||||
|
[
|
||||||
|
'user_name' => 'demo_admin',
|
||||||
|
'email' => '',
|
||||||
|
'password' => 'demopass',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
$this->table($headers, $data);
|
||||||
|
$this->warn('Please update your email and change the password immediately');
|
||||||
|
$this->install->updateInstalEnv();
|
||||||
|
$this->updateAppUrl();
|
||||||
|
}
|
||||||
|
} catch (\Exception $ex) {
|
||||||
|
$this->error($ex->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateAppUrl()
|
||||||
|
{
|
||||||
|
$url = $this->ask('Enter your app url (with http/https and www/non www)');
|
||||||
|
if (str_finish($url, '/')) {
|
||||||
|
$url = rtrim($url, '/ ');
|
||||||
|
}
|
||||||
|
$systems = new \App\Model\helpdesk\Settings\System();
|
||||||
|
$system = $systems->first();
|
||||||
|
$system->url = $url;
|
||||||
|
$system->save();
|
||||||
|
$this->info('Thank you! Faveo has been installed successfully');
|
||||||
|
}
|
||||||
|
}
|
47
app/Console/Commands/UpdateEncryption.php
Normal file
47
app/Console/Commands/UpdateEncryption.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class UpdateEncryption extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'encryption';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'This update the encryption value from old to AES-256-CBC';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$emails = \App\Model\helpdesk\Email\Emails::get();
|
||||||
|
|
||||||
|
foreach ($emails as $email) {
|
||||||
|
$email->password = encrypt('password');
|
||||||
|
$email->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -18,6 +18,10 @@ class Kernel extends ConsoleKernel
|
|||||||
'App\Console\Commands\SendReport',
|
'App\Console\Commands\SendReport',
|
||||||
'App\Console\Commands\CloseWork',
|
'App\Console\Commands\CloseWork',
|
||||||
'App\Console\Commands\TicketFetch',
|
'App\Console\Commands\TicketFetch',
|
||||||
|
'App\Console\Commands\UpdateEncryption',
|
||||||
|
\App\Console\Commands\DropTables::class,
|
||||||
|
\App\Console\Commands\Install::class,
|
||||||
|
\App\Console\Commands\InstallDB::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,12 +34,13 @@ class Kernel extends ConsoleKernel
|
|||||||
protected function schedule(Schedule $schedule)
|
protected function schedule(Schedule $schedule)
|
||||||
{
|
{
|
||||||
if (env('DB_INSTALL') == 1) {
|
if (env('DB_INSTALL') == 1) {
|
||||||
if ($this->getCurrentQueue() != 'sync') {
|
|
||||||
$schedule->command('queue:listen '.$this->getCurrentQueue().' --sleep 60')->everyMinute();
|
|
||||||
}
|
|
||||||
$this->execute($schedule, 'fetching');
|
$this->execute($schedule, 'fetching');
|
||||||
$this->execute($schedule, 'notification');
|
$this->execute($schedule, 'notification');
|
||||||
$this->execute($schedule, 'work');
|
$this->execute($schedule, 'work');
|
||||||
|
$schedule->command('sla-escalate')->everyThirtyMinutes();
|
||||||
|
if ($this->getCurrentQueue() != 'sync') {
|
||||||
|
$schedule->command('queue:listen '.$this->getCurrentQueue().' --sleep 60')->everyMinute();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,4 +119,14 @@ class Kernel extends ConsoleKernel
|
|||||||
|
|
||||||
return $queue;
|
return $queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the Closure based commands for the application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function commands()
|
||||||
|
{
|
||||||
|
require base_path('routes/console.php');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,15 +4,17 @@ namespace App\Exceptions;
|
|||||||
|
|
||||||
// controller
|
// controller
|
||||||
use Bugsnag;
|
use Bugsnag;
|
||||||
//use Illuminate\Validation\ValidationException;
|
|
||||||
use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
|
use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
|
||||||
|
use Config;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Auth\Access\AuthorizationException;
|
|
||||||
// use Symfony\Component\HttpKernel\Exception\HttpException;
|
// use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
// use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
// use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
|
use Illuminate\Auth\Access\AuthorizationException;
|
||||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||||
use Illuminate\Foundation\Validation\ValidationException;
|
use Illuminate\Foundation\Validation\ValidationException as foundation;
|
||||||
use Illuminate\Session\TokenMismatchException;
|
use Illuminate\Session\TokenMismatchException;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
@@ -25,11 +27,13 @@ class Handler extends ExceptionHandler
|
|||||||
protected $dontReport = [
|
protected $dontReport = [
|
||||||
// 'Symfony\Component\HttpKernel\Exception\HttpException',
|
// 'Symfony\Component\HttpKernel\Exception\HttpException',
|
||||||
\Illuminate\Http\Exception\HttpResponseException::class,
|
\Illuminate\Http\Exception\HttpResponseException::class,
|
||||||
ValidationException::class,
|
foundation::class,
|
||||||
AuthorizationException::class,
|
AuthorizationException::class,
|
||||||
HttpResponseException::class,
|
HttpResponseException::class,
|
||||||
ModelNotFoundException::class,
|
ModelNotFoundException::class,
|
||||||
\Symfony\Component\HttpKernel\Exception\HttpException::class,
|
\Symfony\Component\HttpKernel\Exception\HttpException::class,
|
||||||
|
ValidationException::class,
|
||||||
|
\DaveJamesMiller\Breadcrumbs\Exception::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,20 +47,37 @@ class Handler extends ExceptionHandler
|
|||||||
*/
|
*/
|
||||||
public function report(Exception $e)
|
public function report(Exception $e)
|
||||||
{
|
{
|
||||||
$debug = \Config::get('app.bugsnag_reporting');
|
Bugsnag::setBeforeNotifyFunction(function ($error) { //set bugsnag
|
||||||
$debug = ($debug) ? 'true' : 'false';
|
|
||||||
if ($debug == 'false') {
|
|
||||||
Bugsnag::setBeforeNotifyFunction(function ($error) {
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
} else {
|
// check if system is running in production environment
|
||||||
$version = \Config::get('app.version');
|
if (\App::environment() == 'production') {
|
||||||
|
$debug = Config::get('app.bugsnag_reporting'); //get bugsang reporting preference
|
||||||
|
if ($debug) { //if preference is true for reporting
|
||||||
|
$version = Config::get('app.version'); //set app version in report
|
||||||
Bugsnag::setAppVersion($version);
|
Bugsnag::setAppVersion($version);
|
||||||
|
Bugsnag::setBeforeNotifyFunction(function ($error) { //set bugsnag
|
||||||
|
return true;
|
||||||
|
}); //set bugsnag reporting as true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::report($e);
|
return parent::report($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert a validation exception into a JSON response.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Illuminate\Validation\ValidationException $exception
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
protected function invalidJson($request, ValidationException $exception)
|
||||||
|
{
|
||||||
|
return response()->json(['success' => false, 'errors' => $exception->errors()], $exception->status);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render an exception into an HTTP response.
|
* Render an exception into an HTTP response.
|
||||||
*
|
*
|
||||||
@@ -74,6 +95,14 @@ class Handler extends ExceptionHandler
|
|||||||
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
||||||
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException:
|
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenInvalidException:
|
||||||
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
||||||
|
case $e instanceof TokenMismatchException:
|
||||||
|
if ($request->ajax() || $request->wantsJson()) {
|
||||||
|
$result = ['fails' => \Lang::get('lang.session-expired')];
|
||||||
|
|
||||||
|
return response()->json(compact('result'), 402);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back()->with('fails', \Lang::get('lang.session-expired'));
|
||||||
default:
|
default:
|
||||||
return $this->common($request, $e);
|
return $this->common($request, $e);
|
||||||
}
|
}
|
||||||
@@ -89,10 +118,20 @@ class Handler extends ExceptionHandler
|
|||||||
*/
|
*/
|
||||||
public function render500($request, $e)
|
public function render500($request, $e)
|
||||||
{
|
{
|
||||||
|
$seg = $request->segments();
|
||||||
|
if (in_array('api', $seg)) {
|
||||||
|
if ($e instanceof ValidationException) {
|
||||||
|
return $this->invalidJson($request, $e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(['error' => $e->getMessage()], 500);
|
||||||
|
}
|
||||||
if (config('app.debug') == true) {
|
if (config('app.debug') == true) {
|
||||||
return parent::render($request, $e);
|
return parent::render($request, $e);
|
||||||
} elseif ($e instanceof ValidationException) {
|
} elseif ($e instanceof ValidationException) {
|
||||||
return parent::render($request, $e);
|
return parent::render($request, $e);
|
||||||
|
} elseif ($e instanceof \Illuminate\Validation\ValidationException) {
|
||||||
|
return parent::render($request, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->view('errors.500');
|
return response()->view('errors.500');
|
||||||
@@ -111,7 +150,7 @@ class Handler extends ExceptionHandler
|
|||||||
{
|
{
|
||||||
$seg = $request->segments();
|
$seg = $request->segments();
|
||||||
if (in_array('api', $seg)) {
|
if (in_array('api', $seg)) {
|
||||||
return response()->json(['status' => '404']);
|
return response()->json(['success' => false, 'message' => 'not-found'], 404);
|
||||||
}
|
}
|
||||||
if (config('app.debug') == true) {
|
if (config('app.debug') == true) {
|
||||||
if ($e->getStatusCode() == '404') {
|
if ($e->getStatusCode() == '404') {
|
||||||
@@ -173,7 +212,22 @@ class Handler extends ExceptionHandler
|
|||||||
// return parent::render($request, $e);
|
// return parent::render($request, $e);
|
||||||
// }
|
// }
|
||||||
case $e instanceof TokenMismatchException:
|
case $e instanceof TokenMismatchException:
|
||||||
|
if ($request->ajax() || $request->wantsJson()) {
|
||||||
|
$result = ['fails' => \Lang::get('lang.session-expired')];
|
||||||
|
|
||||||
|
return response()->json(compact('result'), 402);
|
||||||
|
}
|
||||||
|
|
||||||
return redirect()->back()->with('fails', \Lang::get('lang.session-expired'));
|
return redirect()->back()->with('fails', \Lang::get('lang.session-expired'));
|
||||||
|
case $e instanceof AuthorizationException:
|
||||||
|
return redirect('/')->with('fails', \Lang::get('lang.access-denied'));
|
||||||
|
case $e instanceof MethodNotAllowedHttpException:
|
||||||
|
if (stripos($request->url(), 'api')) {
|
||||||
|
$result = ['message' => \Lang::get('lang.methon_not_allowed'), 'success' => false];
|
||||||
|
|
||||||
|
return response()->json($result, 405);
|
||||||
|
}
|
||||||
|
$this->render500($request, $e);
|
||||||
default:
|
default:
|
||||||
return $this->render500($request, $e);
|
return $this->render500($request, $e);
|
||||||
}
|
}
|
||||||
|
@@ -181,4 +181,18 @@ class Finder
|
|||||||
|
|
||||||
return $contents;
|
return $contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SPECIAL CHECK FOR STATUS FOR APPROVAL
|
||||||
|
* This function is used to special check status for any type of checks.
|
||||||
|
*
|
||||||
|
* @return type array
|
||||||
|
*/
|
||||||
|
public static function getCustomedStatus()
|
||||||
|
{
|
||||||
|
$status = Ticket_Status::select('id', 'name', 'icon_class')
|
||||||
|
->whereIn('id', [1, 2, 3, 5])->get();
|
||||||
|
|
||||||
|
return $status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -87,7 +87,7 @@ class AgentController extends Controller
|
|||||||
// get all department
|
// get all department
|
||||||
$departments = $department->get();
|
$departments = $department->get();
|
||||||
// list all the teams in a single variable
|
// list all the teams in a single variable
|
||||||
$teams = $team->lists('id', 'name')->toArray();
|
$teams = $team->pluck('id', 'name')->toArray();
|
||||||
$location = GeoIP::getLocation();
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
||||||
// returns to the page with all the variables and their datas
|
// returns to the page with all the variables and their datas
|
||||||
@@ -187,13 +187,13 @@ class AgentController extends Controller
|
|||||||
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
||||||
$user = $user->whereId($id)->first();
|
$user = $user->whereId($id)->first();
|
||||||
$team = $team->where('status', '=', 1)->get();
|
$team = $team->where('status', '=', 1)->get();
|
||||||
$teams1 = $team->lists('name', 'id');
|
$teams1 = $team->pluck('name', 'id');
|
||||||
$timezones = $timezone->get();
|
$timezones = $timezone->get();
|
||||||
$groups = $group->where('group_status', '=', 1)->get();
|
$groups = $group->where('group_status', '=', 1)->get();
|
||||||
$departments = $department->get();
|
$departments = $department->get();
|
||||||
$table = $team_assign_agent->where('agent_id', $id)->first();
|
$table = $team_assign_agent->where('agent_id', $id)->first();
|
||||||
$teams = $team->lists('id', 'name')->toArray();
|
$teams = $team->pluck('id', 'name')->toArray();
|
||||||
$assign = $team_assign_agent->where('agent_id', $id)->lists('team_id')->toArray();
|
$assign = $team_assign_agent->where('agent_id', $id)->pluck('team_id')->toArray();
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'selectedTeams', 'user', 'timezones', 'groups', 'departments', 'team', 'exp', 'counted'))->with('phonecode', $phonecode->phonecode);
|
return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'selectedTeams', 'user', 'timezones', 'groups', 'departments', 'team', 'exp', 'counted'))->with('phonecode', $phonecode->phonecode);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@@ -84,7 +84,7 @@ class DepartmentController extends Controller
|
|||||||
$emails = $email->select('email_name', 'id')->get();
|
$emails = $email->select('email_name', 'id')->get();
|
||||||
$templates = $template->get();
|
$templates = $template->get();
|
||||||
$department = $department->get();
|
$department = $department->get();
|
||||||
$groups = $group->lists('id', 'name');
|
$groups = $group->pluck('id', 'name');
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.agent.departments.create', compact('department', 'templates', 'slas', 'user', 'emails', 'groups'));
|
return view('themes.default1.admin.helpdesk.agent.departments.create', compact('department', 'templates', 'slas', 'user', 'emails', 'groups'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
@@ -164,8 +164,8 @@ class DepartmentController extends Controller
|
|||||||
$emails = $email->select('email_name', 'id')->get();
|
$emails = $email->select('email_name', 'id')->get();
|
||||||
$templates = $template->get();
|
$templates = $template->get();
|
||||||
$departments = $department->whereId($id)->first();
|
$departments = $department->whereId($id)->first();
|
||||||
//$groups = $group->lists('id', 'name');
|
//$groups = $group->pluck('id', 'name');
|
||||||
$assign = $group_assign_department->where('department_id', $id)->lists('group_id');
|
$assign = $group_assign_department->where('department_id', $id)->pluck('group_id');
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.agent.departments.edit', compact('assign', 'team', 'templates', 'departments', 'slas', 'user', 'emails', 'sys_department'));
|
return view('themes.default1.admin.helpdesk.agent.departments.edit', compact('assign', 'team', 'templates', 'departments', 'slas', 'user', 'emails', 'sys_department'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@@ -82,7 +82,7 @@ class EmailsController extends Controller
|
|||||||
$mailbox_protocols = $mailbox_protocol->get();
|
$mailbox_protocols = $mailbox_protocol->get();
|
||||||
|
|
||||||
$service = new \App\Model\MailJob\MailService();
|
$service = new \App\Model\MailJob\MailService();
|
||||||
$services = $service->lists('name', 'id')->toArray();
|
$services = $service->pluck('name', 'id')->toArray();
|
||||||
|
|
||||||
// return with all the table data
|
// return with all the table data
|
||||||
return view('themes.default1.admin.helpdesk.emails.emails.create', compact('mailbox_protocols', 'priority', 'departments', 'helps', 'services'));
|
return view('themes.default1.admin.helpdesk.emails.emails.create', compact('mailbox_protocols', 'priority', 'departments', 'helps', 'services'));
|
||||||
@@ -253,10 +253,10 @@ class EmailsController extends Controller
|
|||||||
|
|
||||||
$this->emailService($driver, $service_request);
|
$this->emailService($driver, $service_request);
|
||||||
$this->setMailConfig($driver, $address, $name, $username, $password, $enc, $host, $port);
|
$this->setMailConfig($driver, $address, $name, $username, $password, $enc, $host, $port);
|
||||||
$transport = \Swift_SmtpTransport::newInstance($host, $port, $enc);
|
$transport = (new \Swift_SmtpTransport($host, $port, $enc));
|
||||||
$transport->setUsername($username);
|
$transport->setUsername($username);
|
||||||
$transport->setPassword($password);
|
$transport->setPassword($password);
|
||||||
$mailer = \Swift_Mailer::newInstance($transport);
|
$mailer = (new \Swift_Mailer($transport));
|
||||||
$mailer->getTransport()->start();
|
$mailer->getTransport()->start();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@@ -351,7 +351,7 @@ class EmailsController extends Controller
|
|||||||
$mailbox_protocols = $mailbox_protocol->get();
|
$mailbox_protocols = $mailbox_protocol->get();
|
||||||
|
|
||||||
$service = new \App\Model\MailJob\MailService();
|
$service = new \App\Model\MailJob\MailService();
|
||||||
$services = $service->lists('name', 'id')->toArray();
|
$services = $service->pluck('name', 'id')->toArray();
|
||||||
|
|
||||||
// return if the execution is succeeded
|
// return if the execution is succeeded
|
||||||
return view('themes.default1.admin.helpdesk.emails.emails.edit', compact('mailbox_protocols', 'priority', 'departments', 'helps', 'emails', 'sys_email', 'services'))->with('count', $count);
|
return view('themes.default1.admin.helpdesk.emails.emails.edit', compact('mailbox_protocols', 'priority', 'departments', 'helps', 'emails', 'sys_email', 'services'))->with('count', $count);
|
||||||
@@ -459,10 +459,13 @@ class EmailsController extends Controller
|
|||||||
$service = $request->input('fetching_protocol');
|
$service = $request->input('fetching_protocol');
|
||||||
$encryption = $request->input('fetching_encryption');
|
$encryption = $request->input('fetching_encryption');
|
||||||
$validate = $request->input('imap_validate');
|
$validate = $request->input('imap_validate');
|
||||||
$username = $request->input('user_name');
|
$username = $request->input('email_address');
|
||||||
$password = $request->input('password');
|
$password = $request->input('password');
|
||||||
$server = new Fetch($host, $port, $service);
|
$server = new Fetch($host, $port, $service);
|
||||||
//$server->setFlag('novalidate-cert');
|
//$server->setFlag('novalidate-cert');
|
||||||
|
if ($request->filled('user_name')) {
|
||||||
|
$username = $request->input('user_name');
|
||||||
|
}
|
||||||
if ($encryption != '') {
|
if ($encryption != '') {
|
||||||
$server->setFlag($encryption);
|
$server->setFlag($encryption);
|
||||||
}
|
}
|
||||||
|
@@ -190,7 +190,7 @@ class FormController extends Controller
|
|||||||
try {
|
try {
|
||||||
$forms = new Forms();
|
$forms = new Forms();
|
||||||
$form = $forms->find($id);
|
$form = $forms->find($id);
|
||||||
$select_forms = $forms->where('id', '!=', $id)->lists('formname', 'id')->toArray();
|
$select_forms = $forms->where('id', '!=', $id)->pluck('formname', 'id')->toArray();
|
||||||
//dd($form);
|
//dd($form);
|
||||||
if ($form) {
|
if ($form) {
|
||||||
$fields = $form->fields();
|
$fields = $form->fields();
|
||||||
@@ -209,7 +209,7 @@ class FormController extends Controller
|
|||||||
try {
|
try {
|
||||||
$forms = new Forms();
|
$forms = new Forms();
|
||||||
$form = $forms->find($id);
|
$form = $forms->find($id);
|
||||||
$select_forms = $forms->where('id', '!=', $id)->lists('formname', 'id')->toArray();
|
$select_forms = $forms->where('id', '!=', $id)->pluck('formname', 'id')->toArray();
|
||||||
//dd($form);
|
//dd($form);
|
||||||
if ($form) {
|
if ($form) {
|
||||||
$fields = $form->fields();
|
$fields = $form->fields();
|
||||||
@@ -541,7 +541,7 @@ class FormController extends Controller
|
|||||||
$session = self::getSession();
|
$session = self::getSession();
|
||||||
$script = self::jqueryScript($field_value = '', $field->id, $field->name, $field_type);
|
$script = self::jqueryScript($field_value = '', $field->id, $field->name, $field_type);
|
||||||
$form_hidden = Form::hidden('fieldid[]', $field->id, ['id' => 'hidden'.$session.$field->id]).Form::label($field->label, $field->label, ['class' => $required_class]);
|
$form_hidden = Form::hidden('fieldid[]', $field->id, ['id' => 'hidden'.$session.$field->id]).Form::label($field->label, $field->label, ['class' => $required_class]);
|
||||||
$select = Form::$field_type($field->name, ['' => 'Select', 'Selects' => self::removeUnderscoreFromDB($field->values()->lists('field_value', 'field_value')->toArray())], null, ['class' => "form-control $session$field->id", 'id' => $session.$field->id, 'required' => $required]).'</br>';
|
$select = Form::$field_type($field->name, ['' => 'Select', 'Selects' => self::removeUnderscoreFromDB($field->values()->pluck('field_value', 'field_value')->toArray())], null, ['class' => "form-control $session$field->id", 'id' => $session.$field->id, 'required' => $required]).'</br>';
|
||||||
$html = $script.$form_hidden.$select;
|
$html = $script.$form_hidden.$select;
|
||||||
$response_div = '<div id='.$session.$field->name.'></div>';
|
$response_div = '<div id='.$session.$field->name.'></div>';
|
||||||
|
|
||||||
@@ -552,7 +552,7 @@ class FormController extends Controller
|
|||||||
{
|
{
|
||||||
$radio = '';
|
$radio = '';
|
||||||
$html = '';
|
$html = '';
|
||||||
$values = $field->values()->lists('field_value')->toArray();
|
$values = $field->values()->pluck('field_value')->toArray();
|
||||||
if (count($values) > 0) {
|
if (count($values) > 0) {
|
||||||
foreach ($values as $field_value) {
|
foreach ($values as $field_value) {
|
||||||
$script = self::jqueryScript($field_value, $field->id, $field->name, $field_type);
|
$script = self::jqueryScript($field_value, $field->id, $field->name, $field_type);
|
||||||
@@ -570,7 +570,7 @@ class FormController extends Controller
|
|||||||
$session = self::getSession();
|
$session = self::getSession();
|
||||||
$checkbox = '';
|
$checkbox = '';
|
||||||
$html = '';
|
$html = '';
|
||||||
$values = $field->values()->lists('field_value')->toArray();
|
$values = $field->values()->pluck('field_value')->toArray();
|
||||||
if (count($values) > 0) {
|
if (count($values) > 0) {
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach ($values as $field_value) {
|
foreach ($values as $field_value) {
|
||||||
|
@@ -48,7 +48,7 @@ class GroupController extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$groups = $group->get();
|
$groups = $group->get();
|
||||||
$departments = $department->lists('id');
|
$departments = $department->pluck('id');
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.agent.groups.index', compact('departments', 'group_assign_department', 'groups'));
|
return view('themes.default1.admin.helpdesk.agent.groups.index', compact('departments', 'group_assign_department', 'groups'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@@ -84,30 +84,40 @@ class LanguageController extends Controller
|
|||||||
$path = base_path('resources/lang');
|
$path = base_path('resources/lang');
|
||||||
$values = scandir($path); //Extracts names of directories present in lang directory
|
$values = scandir($path); //Extracts names of directories present in lang directory
|
||||||
$values = array_slice($values, 2); // skips array element $value[0] = '.' & $value[1] = '..'
|
$values = array_slice($values, 2); // skips array element $value[0] = '.' & $value[1] = '..'
|
||||||
|
$sysLanguage = \Cache::get('language');
|
||||||
|
|
||||||
return \Datatable::collection(new Collection($values))
|
return \Datatable::collection(new Collection($values))
|
||||||
->addColumn('language', function ($model) {
|
->addColumn('language', function ($model) {
|
||||||
|
$img_src = 'lb-faveo/flags/'.$model.'.png';
|
||||||
if ($model == Config::get('app.fallback_locale')) {
|
if ($model == Config::get('app.fallback_locale')) {
|
||||||
return Config::get('languages.'.$model).' ('.Lang::get('lang.default').')';
|
return '<img src="'.asset($img_src).'"/> '.Config::get('languages.'.$model)[0].' ('.Lang::get('lang.default-fallback').')';
|
||||||
} else {
|
} else {
|
||||||
return Config::get('languages.'.$model);
|
return '<img src="'.asset($img_src).'"/> '.Config::get('languages.'.$model)[0];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->addColumn('name', function ($model) {
|
||||||
|
if ($model == Config::get('app.fallback_locale')) {
|
||||||
|
return Config::get('languages.'.$model)[1];
|
||||||
|
} else {
|
||||||
|
return Config::get('languages.'.$model)[1];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
->addColumn('id', function ($model) {
|
->addColumn('id', function ($model) {
|
||||||
return $model;
|
return $model;
|
||||||
})
|
})
|
||||||
->addColumn('status', function ($model) {
|
->addColumn('status', function ($model) use ($sysLanguage) {
|
||||||
if (Lang::getLocale() === $model) {
|
if ($sysLanguage === $model) {
|
||||||
return "<span style='color:green'>".Lang::trans('lang.active').'</span>';
|
return "<span style='color:green'>".Lang::trans('lang.yes').'</span>';
|
||||||
} else {
|
} else {
|
||||||
return "<span style='color:red'>".Lang::trans('lang.inactive').'</span>';
|
return "<span style='color:red'>".Lang::trans('lang.no').'</span>';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
->addColumn('Action', function ($model) {
|
->addColumn('Action', function ($model) use ($sysLanguage) {
|
||||||
if (Lang::getLocale() === $model) {
|
if ($model === $sysLanguage) {
|
||||||
return "<a href='change-language/".$model."'><input type='button' class='btn btn-info btn-xs btn-flat' disabled value='".Lang::trans('lang.disable')."'/></a>
|
return "<a href='change-language/".$model."' disabled><input type='button' class='btn btn-info btn-xs btn-flat' disabled value='".Lang::trans('lang.set_as_sys_lang')."'/></a>
|
||||||
<a href='change-language/".$model."' class='btn btn-danger btn-xs btn-flat' disabled><i class='fa fa-trash' style='color:black;'> </i> ".Lang::trans('lang.delete').'</a>';
|
<a href='change-language/".$model."' class='btn btn-danger btn-xs btn-flat' disabled><i class='fa fa-trash' style='color:black;'> </i> ".Lang::trans('lang.delete').'</a>';
|
||||||
} else {
|
} else {
|
||||||
return "<a href='change-language/".$model."'><input type='button' class='btn btn-info btn-xs btn-flat' value='".Lang::trans('lang.enable')."'/></a>
|
return "<a href='change-language/".$model."'><input type='button' class='btn btn-info btn-xs btn-flat' value='".Lang::trans('lang.set_as_sys_lang')."'/></a>
|
||||||
<a href='delete-language/".$model."' class='btn btn-danger btn-xs btn-flat'><i class='fa fa-trash' style='color:black;'> </i> ".Lang::trans('lang.delete').'</a>';
|
<a href='delete-language/".$model."' class='btn btn-danger btn-xs btn-flat'><i class='fa fa-trash' style='color:black;'> </i> ".Lang::trans('lang.delete').'</a>';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@@ -1049,4 +1049,102 @@ class SettingsController extends Controller
|
|||||||
|
|
||||||
return $char;
|
return $char;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @category function to return clean data view
|
||||||
|
*
|
||||||
|
* @param null
|
||||||
|
*
|
||||||
|
* @return respone/view
|
||||||
|
*/
|
||||||
|
public function getCleanUpView()
|
||||||
|
{
|
||||||
|
$system_check = CommonSettings::select('status')->where('option_name', '=', 'dummy_data_installation')->first();
|
||||||
|
if ($system_check) {
|
||||||
|
if ($system_check->status == 1 || $system_check->status == '1') {
|
||||||
|
return View('themes.default1.admin.helpdesk.settings.cleandata');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('error404')->with('fails', Lang::get('lang.no-dummy-data'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @category function to handle clean dummy data ajax request
|
||||||
|
*
|
||||||
|
* @param null
|
||||||
|
*
|
||||||
|
* @return json
|
||||||
|
*/
|
||||||
|
public function postCleanDummyData(Request $request)
|
||||||
|
{
|
||||||
|
$result = 'failed';
|
||||||
|
$system_check = CommonSettings::select('status')->where('option_name', '=', 'dummy_data_installation')->first();
|
||||||
|
if ($system_check->status == 1 || $system_check->status == '1') {
|
||||||
|
$result = Self::cleanDatabase();
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(compact('result'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @category function to clean dummy database and reseed tables with default options
|
||||||
|
*
|
||||||
|
* @param null
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* Very dangerous function should be call by admin only
|
||||||
|
*/
|
||||||
|
private function cleanDatabase()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$user = \App\User::select(
|
||||||
|
'user_name', 'first_name', 'last_name', 'email', 'password', 'agent_tzone'
|
||||||
|
)->where('id', '=', 1)->first();
|
||||||
|
$system = System::where('id', '=', 1)->first();
|
||||||
|
\Schema::disableForeignKeyConstraints();
|
||||||
|
$tableNames = \Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
|
||||||
|
foreach ($tableNames as $name) {
|
||||||
|
//if you don't want to truncate migrations
|
||||||
|
if ($name == 'migrations' ||
|
||||||
|
$name == 'sd_attachment_types' ||
|
||||||
|
$name == 'sd_change_priorities' ||
|
||||||
|
$name == 'sd_change_status' ||
|
||||||
|
$name == 'sd_change_types' ||
|
||||||
|
$name == 'sd_release_priorities' ||
|
||||||
|
$name == 'sd_release_status' ||
|
||||||
|
$name == 'sd_release_types' ||
|
||||||
|
$name == 'pro_serial_key') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
DB::table($name)->truncate();
|
||||||
|
}
|
||||||
|
\Schema::enableForeignKeyConstraints();
|
||||||
|
DB::commit();
|
||||||
|
\Artisan::call('db:seed', ['--force' => true]);
|
||||||
|
$user2 = \App\User::updateOrCreate(['id' => 1], [
|
||||||
|
'first_name' => $user->first_name,
|
||||||
|
'last_name' => $user->last_name,
|
||||||
|
'email' => $user->email,
|
||||||
|
'user_name' => $user->user_name,
|
||||||
|
'password' => $user->password,
|
||||||
|
'assign_group' => 1,
|
||||||
|
'primary_dpt' => 1,
|
||||||
|
'active' => 1,
|
||||||
|
'agent_tzone' => $user->agent_tzone,
|
||||||
|
'role' => 'admin',
|
||||||
|
]);
|
||||||
|
$system2 = System::find(1);
|
||||||
|
$system2->time_zone = $system->time_zone;
|
||||||
|
$system2->date_time_format = $system->date_time_format;
|
||||||
|
$system2->save();
|
||||||
|
$response = 'success';
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$error = $e->getMessage();
|
||||||
|
|
||||||
|
return $error;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,7 @@ class TeamController extends Controller
|
|||||||
try {
|
try {
|
||||||
$teams = $team->get();
|
$teams = $team->get();
|
||||||
/* find out the Number of Members in the Team */
|
/* find out the Number of Members in the Team */
|
||||||
$id = $teams->lists('id');
|
$id = $teams->pluck('id');
|
||||||
$assign_team_agent = $assign_team_agent->get();
|
$assign_team_agent = $assign_team_agent->get();
|
||||||
|
|
||||||
return view('themes.default1.admin.helpdesk.agent.teams.index', compact('assign_team_agent', 'teams'));
|
return view('themes.default1.admin.helpdesk.agent.teams.index', compact('assign_team_agent', 'teams'));
|
||||||
@@ -213,7 +213,7 @@ class TeamController extends Controller
|
|||||||
$a_id = [];
|
$a_id = [];
|
||||||
$teams = $team->whereId($id)->first();
|
$teams = $team->whereId($id)->first();
|
||||||
$agent_team = $assign_team_agent->where('team_id', $id)->get();
|
$agent_team = $assign_team_agent->where('team_id', $id)->get();
|
||||||
$agent_id = $agent_team->lists('agent_id', 'agent_id');
|
$agent_id = $agent_team->pluck('agent_id', 'agent_id');
|
||||||
foreach ($agent_id as $value) {
|
foreach ($agent_id as $value) {
|
||||||
array_push($a_id, $value);
|
array_push($a_id, $value);
|
||||||
}
|
}
|
||||||
|
@@ -144,8 +144,8 @@ class WorkflowController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function create(Emails $emails)
|
public function create(Emails $emails)
|
||||||
{
|
{
|
||||||
$email_data = '';
|
$email_data = [];
|
||||||
foreach ($emails->lists('email_address', 'id') as $key => $email) {
|
foreach ($emails->pluck('email_address', 'id') as $key => $email) {
|
||||||
$email_data["E-$key"] = $email;
|
$email_data["E-$key"] = $email;
|
||||||
}
|
}
|
||||||
$emails = $email_data;
|
$emails = $email_data;
|
||||||
|
@@ -156,7 +156,7 @@ class CannedController extends Controller
|
|||||||
/* Check whether function success or not */
|
/* Check whether function success or not */
|
||||||
$canned->delete();
|
$canned->delete();
|
||||||
/* redirect to Index page with Success Message */
|
/* redirect to Index page with Success Message */
|
||||||
return redirect()->route('canned.list')->with('success', Lang::get('lang.user_deleted_successfully'));
|
return redirect()->route('canned.list')->with('success', Lang::get('lang.canned_response_deleted'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
/* redirect to Index page with Fails Message */
|
/* redirect to Index page with Fails Message */
|
||||||
return redirect()->route('canned.list')->with('fails', $e->getMessage());
|
return redirect()->route('canned.list')->with('fails', $e->getMessage());
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,339 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Agent\helpdesk\Filter;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Agent\helpdesk\TicketController;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Model\helpdesk\Filters\Filter;
|
||||||
|
use App\Model\helpdesk\Filters\Label;
|
||||||
|
use App\Model\helpdesk\Ticket\Tickets;
|
||||||
|
use Auth;
|
||||||
|
use DB;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class FilterControllerOld extends Controller
|
||||||
|
{
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct(Request $req)
|
||||||
|
{
|
||||||
|
$this->middleware(['auth', 'role.agent']);
|
||||||
|
$this->request = $req;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFilter(Request $request)
|
||||||
|
{
|
||||||
|
$labels = $this->request->input('labels');
|
||||||
|
$tags = $this->request->input('tags');
|
||||||
|
if ($request->has('department')) {
|
||||||
|
$table = $this->departmentTickets($request->input('department'), $request->input('status'));
|
||||||
|
} else {
|
||||||
|
$segment = $this->request->input('segment');
|
||||||
|
$table = $this->segments($segment);
|
||||||
|
}
|
||||||
|
$tickets = [];
|
||||||
|
$render = false;
|
||||||
|
if (is_array($labels) && count($labels) > 0) {
|
||||||
|
$table = $table
|
||||||
|
->leftJoin('filters as label', function ($join) {
|
||||||
|
$join->on('tickets.id', '=', 'label.ticket_id')
|
||||||
|
->where('label.key', '=', 'label');
|
||||||
|
})
|
||||||
|
->whereIn('label.value', $labels);
|
||||||
|
}
|
||||||
|
if (is_array($tags) && count($tags) > 0) {
|
||||||
|
$table = $table
|
||||||
|
->leftJoin('filters as tag', function ($join) {
|
||||||
|
$join->on('tickets.id', '=', 'tag.ticket_id')
|
||||||
|
->where('tag.key', '=', 'tag');
|
||||||
|
})
|
||||||
|
->whereIn('tag.value', $tags);
|
||||||
|
}
|
||||||
|
if ((is_array($tags) && count($tags) > 0) || (is_array($labels) && count($labels) > 0)) {
|
||||||
|
$render = true;
|
||||||
|
}
|
||||||
|
// return \Datatables::of($table)->make();
|
||||||
|
return \Ttable::getTable($table);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function filterByKey($key, $labels = [])
|
||||||
|
{
|
||||||
|
$filter = new Filter();
|
||||||
|
$query = $filter->where('key', $key)
|
||||||
|
->where(function ($query) use ($labels) {
|
||||||
|
if (is_array($labels) && count($labels) > 0) {
|
||||||
|
for ($i = 0; $i < count($labels); $i++) {
|
||||||
|
$query->orWhere('value', 'LIKE', '%'.$labels[$i].'%');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->pluck('ticket_id')
|
||||||
|
->toArray();
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function segments($segment)
|
||||||
|
{
|
||||||
|
if (strpos($segment, 'user') !== false) {
|
||||||
|
return $this->formatUserTickets($segment);
|
||||||
|
}
|
||||||
|
$table = $this->table();
|
||||||
|
switch ($segment) {
|
||||||
|
case '/ticket/inbox':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id)->orWhere('assigned_to', '=', Auth::user()->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->Join('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status')
|
||||||
|
->whereIn('ticket_status.id', [1, 7]);
|
||||||
|
});
|
||||||
|
case '/ticket/closed':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->Join('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status')
|
||||||
|
->whereIn('ticket_status.state', ['closed']);
|
||||||
|
});
|
||||||
|
case '/ticket/myticket':
|
||||||
|
return $table
|
||||||
|
->leftJoin('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status');
|
||||||
|
})
|
||||||
|
->orWhere('tickets.assigned_to', '=', Auth::user()->id)
|
||||||
|
->where('tickets.status', '=', 1);
|
||||||
|
case '/unassigned':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->leftJoin('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status');
|
||||||
|
})
|
||||||
|
->where('tickets.assigned_to', '=', null)
|
||||||
|
->where('tickets.status', '=', 1);
|
||||||
|
case '/ticket/overdue':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->leftJoin('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status');
|
||||||
|
})
|
||||||
|
->where('tickets.status', '=', 1)
|
||||||
|
->where('tickets.isanswered', '=', 0)
|
||||||
|
->whereNotNull('tickets.duedate')
|
||||||
|
->where('tickets.duedate', '!=', '00-00-00 00:00:00')
|
||||||
|
|
||||||
|
// ->where('duedate','>',\Carbon\Carbon::now());
|
||||||
|
->where('tickets.duedate', '<', \Carbon\Carbon::now());
|
||||||
|
case '/ticket/approval/closed':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->Join('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status')
|
||||||
|
->where('tickets.status', '=', 7);
|
||||||
|
});
|
||||||
|
|
||||||
|
case '/trash':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->Join('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status')
|
||||||
|
->where('tickets.status', '=', 5);
|
||||||
|
});
|
||||||
|
|
||||||
|
case '/ticket/answered':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->Join('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status')
|
||||||
|
->where('tickets.status', '=', 1)
|
||||||
|
->where('tickets.isanswered', '=', 1);
|
||||||
|
});
|
||||||
|
case '/ticket/assigned':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->leftJoin('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status');
|
||||||
|
})
|
||||||
|
->where('tickets.assigned_to', '>', 0)
|
||||||
|
->where('tickets.status', '=', 1);
|
||||||
|
case '/ticket/open':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->leftJoin('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status');
|
||||||
|
})
|
||||||
|
->where('isanswered', '=', 0)
|
||||||
|
->where('tickets.status', '=', 1);
|
||||||
|
case '/duetoday':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->leftJoin('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status');
|
||||||
|
})
|
||||||
|
->where('tickets.status', '=', 1)
|
||||||
|
|
||||||
|
->whereNotNull('tickets.duedate')
|
||||||
|
->whereDate('tickets.duedate', '=', \Carbon\Carbon::now()->format('Y-m-d'));
|
||||||
|
|
||||||
|
case '/ticket/followup':
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
$id = Auth::user()->primary_dpt;
|
||||||
|
$table = $table->where('tickets.dept_id', '=', $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table
|
||||||
|
->leftJoin('ticket_status', function ($join) {
|
||||||
|
$join->on('ticket_status.id', '=', 'tickets.status');
|
||||||
|
})
|
||||||
|
->where('tickets.status', '=', 1)
|
||||||
|
// ->where('tickets.isanswered', '=', 0)
|
||||||
|
->where('tickets.follow_up', '=', 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function table()
|
||||||
|
{
|
||||||
|
// if (Auth::user()->role == 'admin') {
|
||||||
|
$ticket = new Tickets();
|
||||||
|
$tickets = $ticket
|
||||||
|
->leftJoin('ticket_thread', function ($join) {
|
||||||
|
$join->on('tickets.id', '=', 'ticket_thread.ticket_id')
|
||||||
|
->whereNotNull('title')
|
||||||
|
->where('ticket_thread.is_internal', '<>', 1);
|
||||||
|
})
|
||||||
|
->leftJoin('ticket_thread as ticket_thread2', 'ticket_thread2.ticket_id', '=', 'tickets.id')
|
||||||
|
->Join('ticket_source', 'ticket_source.id', '=', 'tickets.source')
|
||||||
|
->leftJoin('ticket_priority', 'ticket_priority.priority_id', '=', 'tickets.priority_id')
|
||||||
|
->leftJoin('users as u', 'u.id', '=', 'tickets.user_id')
|
||||||
|
->leftJoin('users as u1', 'u1.id', '=', 'tickets.assigned_to')
|
||||||
|
->leftJoin('ticket_attachment', 'ticket_attachment.thread_id', '=', 'ticket_thread.id')
|
||||||
|
|
||||||
|
->leftJoin('ticket_collaborator', 'ticket_collaborator.ticket_id', '=', 'tickets.id')
|
||||||
|
->select(
|
||||||
|
'tickets.id',
|
||||||
|
'ticket_thread.title',
|
||||||
|
'tickets.ticket_number',
|
||||||
|
'ticket_priority.priority',
|
||||||
|
'u.user_name as user_name',
|
||||||
|
'u1.user_name as assign_user_name',
|
||||||
|
\DB::raw('max(ticket_thread.updated_at) as updated_at'),
|
||||||
|
\DB::raw('min(ticket_thread.updated_at) as created_at'),
|
||||||
|
'u.first_name as first_name',
|
||||||
|
'u.last_name as last_name',
|
||||||
|
'u1.first_name as assign_first_name',
|
||||||
|
'u1.last_name as assign_last_name',
|
||||||
|
'ticket_priority.priority_color',
|
||||||
|
DB::raw('COUNT(DISTINCT ticket_thread2.id) as countthread'),
|
||||||
|
DB::raw('COUNT(ticket_attachment.thread_id) as countattachment'),
|
||||||
|
DB::raw('COUNT(ticket_collaborator.ticket_id) as countcollaborator'),
|
||||||
|
'tickets.status',
|
||||||
|
'tickets.user_id',
|
||||||
|
'tickets.priority_id', 'tickets.assigned_to',
|
||||||
|
'ticket_status.name as tickets_status',
|
||||||
|
'ticket_source.css_class as css',
|
||||||
|
DB::raw('substring_index(group_concat(ticket_thread.poster order by ticket_thread.id desc) , ",", 1) as last_replier'),
|
||||||
|
DB::raw('substring_index(group_concat(ticket_thread.title order by ticket_thread.id asc) , ",", 1) as ticket_title'),
|
||||||
|
'u.active as verified')
|
||||||
|
->groupby('tickets.id');
|
||||||
|
|
||||||
|
return $tickets;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function filter($render, $ticket_id = [])
|
||||||
|
{
|
||||||
|
if (Auth::user()->role == 'admin') {
|
||||||
|
$tickets = Tickets::whereIn('status', [1, 7]);
|
||||||
|
} else {
|
||||||
|
$dept = DB::table('department')->where('id', '=', Auth::user()->primary_dpt)->first();
|
||||||
|
$tickets = Tickets::whereIn('status', [1, 7])->where('dept_id', '=', $dept->id);
|
||||||
|
}
|
||||||
|
if ($render == true) {
|
||||||
|
$tickets = $tickets->whereIn('id', $ticket_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $tickets;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ticketController()
|
||||||
|
{
|
||||||
|
$PhpMailController = new \App\Http\Controllers\Common\PhpMailController();
|
||||||
|
$NotificationController = new \App\Http\Controllers\Common\NotificationController();
|
||||||
|
$ticket_controller = new TicketController($PhpMailController, $NotificationController);
|
||||||
|
|
||||||
|
return $ticket_controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function departmentTickets($dept, $status)
|
||||||
|
{
|
||||||
|
$table = $this->table();
|
||||||
|
|
||||||
|
return $table->leftJoin('department as dep', 'tickets.dept_id', '=', 'dep.id')
|
||||||
|
->leftJoin('ticket_status', 'tickets.status', '=', 'ticket_status.id')
|
||||||
|
->where('dep.name', $dept)
|
||||||
|
->where('ticket_status.name', $status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@category function to format and return user tickets
|
||||||
|
*
|
||||||
|
*@param string $segment
|
||||||
|
*
|
||||||
|
*@return builder
|
||||||
|
*/
|
||||||
|
public function formatUserTickets($segment)
|
||||||
|
{
|
||||||
|
$convert_to_array = explode('/', $segment);
|
||||||
|
$user_id = $convert_to_array[2];
|
||||||
|
$user = \DB::table('users')->select('role', 'id')->where('id', '=', $user_id)->first();
|
||||||
|
$table = $this->table();
|
||||||
|
if ($user->role == 'user') {
|
||||||
|
$table = $table->leftJoin('ticket_status', 'tickets.status', '=', 'ticket_status.id')
|
||||||
|
->where('tickets.user_id', '=', $user->id)
|
||||||
|
->where('ticket_status.name', $convert_to_array[3]);
|
||||||
|
} else {
|
||||||
|
$table = $table->leftJoin('ticket_status', 'tickets.status', '=', 'ticket_status.id')
|
||||||
|
->where('tickets.assigned_to', '=', $user->id)
|
||||||
|
->where('ticket_status.name', $convert_to_array[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $table;
|
||||||
|
}
|
||||||
|
}
|
@@ -70,126 +70,6 @@ class TicketController extends Controller
|
|||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the Inbox ticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function inbox_ticket_list()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.inbox', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the Open ticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function open_ticket_list()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.open', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the answered ticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function answered_ticket_list()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.answered', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the Myticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function myticket_ticket_list()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.myticket', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the Overdue ticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function overdue_ticket_list()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.overdue', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the Open ticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function dueTodayTicketlist()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.duetodayticket', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the Closed ticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function closed_ticket_list()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.closed', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the ticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function assigned_ticket_list()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.assigned', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the New ticket page.
|
* Show the New ticket page.
|
||||||
*
|
*
|
||||||
@@ -246,7 +126,7 @@ class TicketController extends Controller
|
|||||||
$source = Ticket_source::where('name', '=', 'agent')->first();
|
$source = Ticket_source::where('name', '=', 'agent')->first();
|
||||||
$headers = null;
|
$headers = null;
|
||||||
$help = Help_topic::where('id', '=', $helptopic)->first();
|
$help = Help_topic::where('id', '=', $helptopic)->first();
|
||||||
$form_data = null;
|
$form_data = $request->except('name', 'phone', 'email', 'subject', 'body', 'helptopic', '_wysihtml5_mode', '_token', 'mobile', 'code', 'priority', 'attachment', 'first_name', 'last_name', 'sla', 'duedate', 'assignto');
|
||||||
$auto_response = 0;
|
$auto_response = 0;
|
||||||
$status = 1;
|
$status = 1;
|
||||||
if ($phone != null || $mobile_number != null) {
|
if ($phone != null || $mobile_number != null) {
|
||||||
@@ -306,7 +186,6 @@ class TicketController extends Controller
|
|||||||
return Redirect('newticket')->with('fails', Lang::get('lang.failed-to-create-user-tcket-as-mobile-has-been-taken'))->withInput($request->except('password'));
|
return Redirect('newticket')->with('fails', Lang::get('lang.failed-to-create-user-tcket-as-mobile-has-been-taken'))->withInput($request->except('password'));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
dd($e);
|
|
||||||
if ($api != false) {
|
if ($api != false) {
|
||||||
return response()->json(['error' => $e->getMessage()], 500);
|
return response()->json(['error' => $e->getMessage()], 500);
|
||||||
}
|
}
|
||||||
@@ -362,11 +241,11 @@ class TicketController extends Controller
|
|||||||
|
|
||||||
public function size()
|
public function size()
|
||||||
{
|
{
|
||||||
|
$size = 0;
|
||||||
$files = Input::file('attachment');
|
$files = Input::file('attachment');
|
||||||
if (!$files) {
|
if (!$files) {
|
||||||
throw new \Exception('file size exceeded');
|
return $size;
|
||||||
}
|
}
|
||||||
$size = 0;
|
|
||||||
if (count($files) > 0) {
|
if (count($files) > 0) {
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$size += $file->getSize();
|
$size += $file->getSize();
|
||||||
@@ -1691,51 +1570,6 @@ class TicketController extends Controller
|
|||||||
return $system;
|
return $system;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* shows trashed tickets.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function trash()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.trash', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* shows unassigned tickets.
|
|
||||||
*
|
|
||||||
* @return type
|
|
||||||
*/
|
|
||||||
public function unassigned()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.unassigned', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* shows tickets assigned to Auth::user().
|
|
||||||
*
|
|
||||||
* @return type
|
|
||||||
*/
|
|
||||||
public function myticket()
|
|
||||||
{
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.ticket.myticket', compact('table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cleanMe.
|
* cleanMe.
|
||||||
*
|
*
|
||||||
@@ -1763,7 +1597,7 @@ class TicketController extends Controller
|
|||||||
public function autosearch($id)
|
public function autosearch($id)
|
||||||
{
|
{
|
||||||
$term = \Input::get('term');
|
$term = \Input::get('term');
|
||||||
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->lists('email');
|
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->pluck('email');
|
||||||
echo json_encode($user);
|
echo json_encode($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1776,7 +1610,7 @@ class TicketController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function autosearch2(User $user)
|
public function autosearch2(User $user)
|
||||||
{
|
{
|
||||||
$user = $user->lists('email');
|
$user = $user->pluck('email');
|
||||||
echo json_encode($user);
|
echo json_encode($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1892,6 +1726,8 @@ class TicketController extends Controller
|
|||||||
$this->delete($delete, new Tickets());
|
$this->delete($delete, new Tickets());
|
||||||
} elseif ($value == 'Close') {
|
} elseif ($value == 'Close') {
|
||||||
$this->close($delete, new Tickets());
|
$this->close($delete, new Tickets());
|
||||||
|
} elseif ($value == 'Resolve') {
|
||||||
|
$this->resolve($delete, new Tickets());
|
||||||
} elseif ($value == 'Open') {
|
} elseif ($value == 'Open') {
|
||||||
$this->open($delete, new Tickets());
|
$this->open($delete, new Tickets());
|
||||||
} elseif ($value == 'Delete forever') {
|
} elseif ($value == 'Delete forever') {
|
||||||
@@ -2011,41 +1847,6 @@ class TicketController extends Controller
|
|||||||
$ticket->save();
|
$ticket->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the deptopen ticket list page.
|
|
||||||
*
|
|
||||||
* @return type response
|
|
||||||
*/
|
|
||||||
public function deptopen($id)
|
|
||||||
{
|
|
||||||
$dept = Department::where('name', '=', $id)->first();
|
|
||||||
if (Auth::user()->role == 'agent') {
|
|
||||||
if (Auth::user()->primary_dpt == $dept->id) {
|
|
||||||
return view('themes.default1.agent.helpdesk.dept-ticket.tickets', compact('id'));
|
|
||||||
} else {
|
|
||||||
return redirect()->back()->with('fails', 'Unauthorised!');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return view('themes.default1.agent.helpdesk.dept-ticket.tickets', compact('id'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function deptTicket($dept, $status)
|
|
||||||
{
|
|
||||||
if (\Auth::user()->role === 'agent') {
|
|
||||||
$dept2 = Department::where('id', '=', \Auth::user()->primary_dpt)->first();
|
|
||||||
if ($dept !== $dept2->name) {
|
|
||||||
return redirect()->back()->with('fails', Lang::get('lang.unauthorized_access'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.dept-ticket.tickets', compact('dept', 'status', 'table'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the deptclose ticket list page.
|
* Show the deptclose ticket list page.
|
||||||
*
|
*
|
||||||
@@ -2479,110 +2280,6 @@ class TicketController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* chumper's function to return data to chumper datatable.
|
|
||||||
* @param Array-object $tickets
|
|
||||||
*
|
|
||||||
* @return Array-object
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static function getTable($tickets)
|
|
||||||
{
|
|
||||||
return \Datatables::of($tickets)
|
|
||||||
->addColumn('id', function ($tickets) {
|
|
||||||
return "<input type='checkbox' name='select_all[]' id='".$tickets->id."' onclick='someFunction(this.id)' class='selectval icheckbox_flat-blue' value='".$tickets->id."'></input>";
|
|
||||||
})
|
|
||||||
->addColumn('title', function ($tickets) {
|
|
||||||
if (isset($tickets->ticket_title)) {
|
|
||||||
$string = str_limit($tickets->ticket_title, 20);
|
|
||||||
} else {
|
|
||||||
$string = '(no subject)';
|
|
||||||
}
|
|
||||||
$collab = $tickets->countcollaborator;
|
|
||||||
if ($collab > 0) {
|
|
||||||
$collabString = ' <i class="fa fa-users"></i>';
|
|
||||||
} else {
|
|
||||||
$collabString = null;
|
|
||||||
}
|
|
||||||
$attachCount = $tickets->countattachment;
|
|
||||||
if ($attachCount > 0) {
|
|
||||||
$attachString = ' <i class="fa fa-paperclip"></i>';
|
|
||||||
} else {
|
|
||||||
$attachString = '';
|
|
||||||
}
|
|
||||||
$css = $tickets->css;
|
|
||||||
$titles = '';
|
|
||||||
if ($tickets->ticket_title) {
|
|
||||||
$titles = $tickets->ticket_title;
|
|
||||||
}
|
|
||||||
$tooltip_script = self::tooltip($tickets->id);
|
|
||||||
|
|
||||||
return "<div class='tooltip1' id='tool".$tickets->id."'>
|
|
||||||
<a href='".route('ticket.thread', [$tickets->id])."'>".ucfirst($string)." <span style='color:green'>(".$tickets->countthread.") <i class='".$css."'></i></span>
|
|
||||||
</a>".$collabString.$attachString.$tooltip_script.
|
|
||||||
"<span class='tooltiptext' id='tooltip".$tickets->id."'>Loading...</span></div>";
|
|
||||||
})
|
|
||||||
->addColumn('ticket_number', function ($tickets) {
|
|
||||||
return "<a href='".route('ticket.thread', [$tickets->id])."' title='".$tickets->ticket_number."'>#".$tickets->ticket_number.'</a>';
|
|
||||||
})
|
|
||||||
->addColumn('priority', function ($tickets) {
|
|
||||||
$rep = ($tickets->last_replier == 'client') ? '#F39C12' : '#000';
|
|
||||||
$priority = $tickets->priority;
|
|
||||||
if ($priority != null) {
|
|
||||||
$prio = '<button class="btn btn-xs '.$rep.'" style="background-color: '.$tickets->priority_color.'; color:#F7FBCB">'.ucfirst($tickets->priority).'</button>';
|
|
||||||
} else {
|
|
||||||
$prio = $tickets->last_relier_role;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $prio;
|
|
||||||
})
|
|
||||||
->addColumn('user_name', function ($tickets) {
|
|
||||||
$from = $tickets->first_name;
|
|
||||||
$url = route('user.show', $tickets->user_id);
|
|
||||||
$name = '';
|
|
||||||
if ($from) {
|
|
||||||
$name = $tickets->first_name.' '.$tickets->last_name;
|
|
||||||
} else {
|
|
||||||
$name = $tickets->user_name;
|
|
||||||
}
|
|
||||||
$color = '';
|
|
||||||
if ($tickets->verified == 0 || $tickets->verified == '0') {
|
|
||||||
$color = "<i class='fa fa-exclamation-triangle' title='".Lang::get('lang.accoutn-not-verified')."'></i>";
|
|
||||||
}
|
|
||||||
|
|
||||||
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.ucfirst($tickets->user_name).'''.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".ucfirst(str_limit($name, 30)).' <span style="color:#f75959">'.$color.'</span></span></a>';
|
|
||||||
})
|
|
||||||
->addColumn('assign_user_name', function ($tickets) {
|
|
||||||
if ($tickets->assigned_to == null) {
|
|
||||||
return "<span style='color:red'>Unassigned</span>";
|
|
||||||
} else {
|
|
||||||
$assign = $tickets->assign_user_name;
|
|
||||||
$url = route('user.show', $tickets->assigned_to);
|
|
||||||
|
|
||||||
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.ucfirst($tickets->assign_first_name).'''.Lang::get('lang.see-profile2')."'><span style='color:green'>".ucfirst($tickets->assign_first_name).' '.ucfirst($tickets->assign_last_name).'</span></a>';
|
|
||||||
}
|
|
||||||
})
|
|
||||||
->addColumn('updated_at', function ($tickets) {
|
|
||||||
$TicketDatarow = $tickets->updated_at;
|
|
||||||
$updated = '--';
|
|
||||||
if ($TicketDatarow) {
|
|
||||||
$updated = $tickets->updated_at;
|
|
||||||
}
|
|
||||||
|
|
||||||
return '<span style="display:none">'.$updated.'</span>'.UTC::usertimezone($updated);
|
|
||||||
})
|
|
||||||
->addColumn('created_at', function ($tickets) {
|
|
||||||
$TicketDatarow = $tickets->created_at;
|
|
||||||
$updated = '--';
|
|
||||||
if ($TicketDatarow) {
|
|
||||||
$updated = $tickets->created_at;
|
|
||||||
}
|
|
||||||
|
|
||||||
return '<span style="display:none">'.$updated.'</span>'.UTC::usertimezone($updated);
|
|
||||||
})
|
|
||||||
->make();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@category function to call and show ticket details in tool tip via ajax
|
*@category function to call and show ticket details in tool tip via ajax
|
||||||
*
|
*
|
||||||
@@ -2864,23 +2561,6 @@ class TicketController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return type
|
|
||||||
*/
|
|
||||||
public function followupTicketList()
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$table = \Datatable::table()
|
|
||||||
->addColumn(
|
|
||||||
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
|
||||||
->noScript();
|
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.followup.followup', compact('table'));
|
|
||||||
} catch (Exception $e) {
|
|
||||||
return Redirect()->back()->with('fails', $e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getSubject($subject)
|
public static function getSubject($subject)
|
||||||
{
|
{
|
||||||
//$subject = $this->attributes['title'];
|
//$subject = $this->attributes['title'];
|
||||||
@@ -2966,4 +2646,481 @@ class TicketController extends Controller
|
|||||||
//catch the exception
|
//catch the exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ticket table rendering related functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to get basic datatable format.
|
||||||
|
*
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
|
public function getTableFormat()
|
||||||
|
{
|
||||||
|
return \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'<a class="checkbox-toggle"><i class="fa fa-square-o fa-2x"></i></a>',
|
||||||
|
Lang::get('lang.subject'),
|
||||||
|
Lang::get('lang.ticket_id'),
|
||||||
|
Lang::get('lang.from'),
|
||||||
|
Lang::get('lang.assigned_to'),
|
||||||
|
Lang::get('lang.last_activity')
|
||||||
|
)->noScript();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to return new ticket table view.
|
||||||
|
*
|
||||||
|
* @return repsone/view
|
||||||
|
*/
|
||||||
|
public function getTicketsView()
|
||||||
|
{
|
||||||
|
$table = $this->getTableFormat();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.tickets', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* chumper's function to return data to chumper datatable.
|
||||||
|
*
|
||||||
|
* @param Array-object $tickets
|
||||||
|
*
|
||||||
|
* @return Array-object
|
||||||
|
*/
|
||||||
|
public static function genreateTableJson($tickets)
|
||||||
|
{
|
||||||
|
return \Datatables::of($tickets)
|
||||||
|
->editColumn('id', function ($tickets) {
|
||||||
|
$rep = ($tickets->last_replier == 'client') ? '#F39C12'
|
||||||
|
: '#000';
|
||||||
|
|
||||||
|
return "<center><input type='checkbox' name='select_all[]' id='".$tickets->id."' onclick='someFunction(this.id)' class='selectval icheckbox_flat-blue ".$tickets->color.' '.$rep."' value='".$tickets->id."'></input></center>";
|
||||||
|
})
|
||||||
|
->editColumn('title', function ($tickets) {
|
||||||
|
if (isset($tickets->ticket_title)) {
|
||||||
|
$string = utfEncoding($tickets->ticket_title);
|
||||||
|
if (strlen($string) > 25) {
|
||||||
|
$string = str_limit($string, 30).'...';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$string = Lang::get('lang.no-subject');
|
||||||
|
}
|
||||||
|
|
||||||
|
$collab = $tickets->countcollaborator;
|
||||||
|
if ($collab > 0) {
|
||||||
|
$collabString = ' <i class="fa fa-users" title="'.Lang::get('lang.ticket_has_collaborator').'"></i>';
|
||||||
|
} else {
|
||||||
|
$collabString = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$attachCount = $tickets->countattachment;
|
||||||
|
if ($attachCount > 0) {
|
||||||
|
$attachString = ' <i class="fa fa-paperclip" title="'.Lang::get('lang.ticket_has_attachments').'"></i>';
|
||||||
|
} else {
|
||||||
|
$attachString = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$css = $tickets->css;
|
||||||
|
$source = $tickets->source;
|
||||||
|
$titles = '';
|
||||||
|
if ($tickets->ticket_title) {
|
||||||
|
$titles = $tickets->ticket_title;
|
||||||
|
}
|
||||||
|
|
||||||
|
$due = '';
|
||||||
|
if ($tickets->duedate != null) {
|
||||||
|
$now = strtotime(\Carbon\Carbon::now()->tz(timezone()));
|
||||||
|
$duedate = strtotime($tickets->duedate);
|
||||||
|
|
||||||
|
if ($duedate - $now < 0) {
|
||||||
|
$due = ' <span style="background-color: rgba(221, 75, 57, 0.67) !important" title="'.Lang::get('lang.is_overdue').'" class="label label-danger">'.Lang::get('lang.overdue').'</span>';
|
||||||
|
} else {
|
||||||
|
if (date('Ymd', $duedate) == date('Ymd', $now)) {
|
||||||
|
$due = ' <span style="background-color: rgba(240, 173, 78, 0.67) !important" title="'.Lang::get('lang.going-overdue-today').'" class="label label-warning">'.Lang::get('lang.duetoday').'</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$thread_count = '('.$tickets->countthread.')';
|
||||||
|
if (Lang::getLocale() == 'ar') {
|
||||||
|
$thread_count = '‏('.$tickets->countthread.')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$tooltip_script = self::tooltip($tickets->id);
|
||||||
|
|
||||||
|
return "<div class='tooltip1' id='tool".$tickets->id."'>
|
||||||
|
<a href='".route('ticket.thread', [$tickets->id])."'>".$string." <span style='color:green'>".$thread_count."</span>
|
||||||
|
</a> <span><i style='color:green' title='".Lang::get('lang.ticket_created_source', ['source' => $source])."' class='".$css."'></i></span>".$collabString.$attachString.$due.$tooltip_script.
|
||||||
|
"<span class='tooltiptext' id='tooltip".$tickets->id."' style='height:auto;width:300px;background-color:#fff;color:black;border-radius:3px;border:2px solid gainsboro;position:absolute;z-index:1;top:150%;left:50%;margin-left:-23px;word-wrap:break-word;'>".Lang::get('lang.loading').'</span></div>';
|
||||||
|
})
|
||||||
|
->editColumn('ticket_number', function ($tickets) {
|
||||||
|
return "<a href='".route('ticket.thread', [$tickets->id])."' class='$".ucfirst($tickets->priority)."*' title='".Lang::get('lang.click-here-to-see-more-details')."'>#".$tickets->ticket_number.'</a>';
|
||||||
|
})
|
||||||
|
->editColumn('c_uname', function ($tickets) {
|
||||||
|
$from = $tickets->c_fname;
|
||||||
|
$url = route('user.show', $tickets->c_uid);
|
||||||
|
$name = $tickets->c_uname;
|
||||||
|
if ($from) {
|
||||||
|
$name = utfEncoding($tickets->c_fname).' '.utfEncoding($tickets->c_lname);
|
||||||
|
}
|
||||||
|
|
||||||
|
$color = '';
|
||||||
|
if ($tickets->verified == 0 || $tickets->verified == '0') {
|
||||||
|
$color = "<i class='fa fa-exclamation-triangle' title='".Lang::get('lang.accoutn-not-verified')."'></i>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.$name.'''.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".str_limit($name, 30).' <span style="color:#f75959">'.$color.'</span></span></a>';
|
||||||
|
})
|
||||||
|
->editColumn('a_uname', function ($tickets) {
|
||||||
|
if ($tickets->assigned_to == null && $tickets->name == null) {
|
||||||
|
return "<span style='color:red'>Unassigned</span>";
|
||||||
|
} else {
|
||||||
|
$assign = $tickets->assign_user_name;
|
||||||
|
if ($tickets->assigned_to != null) {
|
||||||
|
$assign = utfEncoding($tickets->a_fname).' '.utfEncoding($tickets->a_lname);
|
||||||
|
$url = route('user.show', $tickets->assigned_to);
|
||||||
|
|
||||||
|
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.$assign.'''.Lang::get('lang.see-profile2')."'><span style='color:green'>".mb_substr($assign, 0, 30, 'UTF-8').'</span></a>';
|
||||||
|
} else {
|
||||||
|
$url1 = '#';
|
||||||
|
|
||||||
|
return "<a href='".$url1."' title='".Lang::get('lang.see-profile1').' '.ucfirst($tickets->name).'''.Lang::get('lang.see-profile2')."'><span style='color:green'>".mb_substr(ucfirst($tickets->name), 0, 30, 'UTF-8').'</span></a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
->make();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* =====================================================================
|
||||||
|
* DEPRECATED FUNCTIONS BLOCK
|
||||||
|
* =====================================================================
|
||||||
|
* Functions under this block have been deprecated and are no
|
||||||
|
* longer used by the system.Though we have not removed these functions
|
||||||
|
* in v1.10 but we will remove these routes in upcoming releas
|
||||||
|
* =====================================================================.
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the Inbox ticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function inbox_ticket_list()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.inbox', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the Open ticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function open_ticket_list()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.open', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the answered ticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function answered_ticket_list()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.answered', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the Myticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function myticket_ticket_list()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.myticket', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the Overdue ticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function overdue_ticket_list()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.overdue', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the Open ticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function dueTodayTicketlist()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.duetodayticket', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the Closed ticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function closed_ticket_list()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.closed', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the ticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function assigned_ticket_list()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.assigned', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the deptopen ticket list page.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function deptopen($id)
|
||||||
|
{
|
||||||
|
$dept = Department::where('name', '=', $id)->first();
|
||||||
|
if (Auth::user()->role == 'agent') {
|
||||||
|
if (Auth::user()->primary_dpt == $dept->id) {
|
||||||
|
return view('themes.default1.agent.helpdesk.dept-ticket.tickets', compact('id'));
|
||||||
|
} else {
|
||||||
|
return redirect()->back()->with('fails', 'Unauthorised!');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return view('themes.default1.agent.helpdesk.dept-ticket.tickets', compact('id'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deptTicket($dept, $status)
|
||||||
|
{
|
||||||
|
if (\Auth::user()->role === 'agent') {
|
||||||
|
$dept2 = Department::where('id', '=', \Auth::user()->primary_dpt)->first();
|
||||||
|
if ($dept !== $dept2->name) {
|
||||||
|
return redirect()->back()->with('fails', Lang::get('lang.unauthorized_access'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.dept-ticket.tickets', compact('dept', 'status', 'table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* shows trashed tickets.
|
||||||
|
*
|
||||||
|
* @return type response
|
||||||
|
*/
|
||||||
|
public function trash()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.trash', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* shows unassigned tickets.
|
||||||
|
*
|
||||||
|
* @return type
|
||||||
|
*/
|
||||||
|
public function unassigned()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.unassigned', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* shows tickets assigned to Auth::user().
|
||||||
|
*
|
||||||
|
* @return type
|
||||||
|
*/
|
||||||
|
public function myticket()
|
||||||
|
{
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.ticket.myticket', compact('table'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return type
|
||||||
|
*/
|
||||||
|
public function followupTicketList()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$table = \Datatable::table()
|
||||||
|
->addColumn(
|
||||||
|
'', Lang::get('lang.subject'), Lang::get('lang.ticket_id'), Lang::get('lang.priority'), Lang::get('lang.from'), Lang::get('lang.assigned_to'), Lang::get('lang.last_activity'), Lang::get('lang.created-at'))
|
||||||
|
->noScript();
|
||||||
|
|
||||||
|
return view('themes.default1.agent.helpdesk.followup.followup', compact('table'));
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return Redirect()->back()->with('fails', $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* chumper's function to return data to chumper datatable.
|
||||||
|
* @param Array-object $tickets
|
||||||
|
*
|
||||||
|
* @return Array-object
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static function getTable($tickets)
|
||||||
|
{
|
||||||
|
return \Datatables::of($tickets)
|
||||||
|
->addColumn('id', function ($tickets) {
|
||||||
|
return "<input type='checkbox' name='select_all[]' id='".$tickets->id."' onclick='someFunction(this.id)' class='selectval icheckbox_flat-blue' value='".$tickets->id."'></input>";
|
||||||
|
})
|
||||||
|
->addColumn('title', function ($tickets) {
|
||||||
|
if (isset($tickets->ticket_title)) {
|
||||||
|
$string = str_limit($tickets->ticket_title, 20);
|
||||||
|
} else {
|
||||||
|
$string = '(no subject)';
|
||||||
|
}
|
||||||
|
$collab = $tickets->countcollaborator;
|
||||||
|
if ($collab > 0) {
|
||||||
|
$collabString = ' <i class="fa fa-users"></i>';
|
||||||
|
} else {
|
||||||
|
$collabString = null;
|
||||||
|
}
|
||||||
|
$attachCount = $tickets->countattachment;
|
||||||
|
if ($attachCount > 0) {
|
||||||
|
$attachString = ' <i class="fa fa-paperclip"></i>';
|
||||||
|
} else {
|
||||||
|
$attachString = '';
|
||||||
|
}
|
||||||
|
$css = $tickets->css;
|
||||||
|
$titles = '';
|
||||||
|
if ($tickets->ticket_title) {
|
||||||
|
$titles = $tickets->ticket_title;
|
||||||
|
}
|
||||||
|
$tooltip_script = self::tooltip($tickets->id);
|
||||||
|
|
||||||
|
return "<div class='tooltip1' id='tool".$tickets->id."'>
|
||||||
|
<a href='".route('ticket.thread', [$tickets->id])."'>".ucfirst($string)." <span style='color:green'>(".$tickets->countthread.") <i class='".$css."'></i></span>
|
||||||
|
</a>".$collabString.$attachString.$tooltip_script.
|
||||||
|
"<span class='tooltiptext' id='tooltip".$tickets->id."'>Loading...</span></div>";
|
||||||
|
})
|
||||||
|
->addColumn('ticket_number', function ($tickets) {
|
||||||
|
return "<a href='".route('ticket.thread', [$tickets->id])."' title='".$tickets->ticket_number."'>#".$tickets->ticket_number.'</a>';
|
||||||
|
})
|
||||||
|
->addColumn('priority', function ($tickets) {
|
||||||
|
$rep = ($tickets->last_replier == 'client') ? '#F39C12' : '#000';
|
||||||
|
$priority = $tickets->priority;
|
||||||
|
if ($priority != null) {
|
||||||
|
$prio = '<button class="btn btn-xs '.$rep.'" style="background-color: '.$tickets->priority_color.'; color:#F7FBCB">'.ucfirst($tickets->priority).'</button>';
|
||||||
|
} else {
|
||||||
|
$prio = $tickets->last_relier_role;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $prio;
|
||||||
|
})
|
||||||
|
->addColumn('user_name', function ($tickets) {
|
||||||
|
$from = $tickets->first_name;
|
||||||
|
$url = route('user.show', $tickets->user_id);
|
||||||
|
$name = '';
|
||||||
|
if ($from) {
|
||||||
|
$name = $tickets->first_name.' '.$tickets->last_name;
|
||||||
|
} else {
|
||||||
|
$name = $tickets->user_name;
|
||||||
|
}
|
||||||
|
$color = '';
|
||||||
|
if ($tickets->verified == 0 || $tickets->verified == '0') {
|
||||||
|
$color = "<i class='fa fa-exclamation-triangle' title='".Lang::get('lang.accoutn-not-verified')."'></i>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.ucfirst($tickets->user_name).'''.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".ucfirst(str_limit($name, 30)).' <span style="color:#f75959">'.$color.'</span></span></a>';
|
||||||
|
})
|
||||||
|
->addColumn('assign_user_name', function ($tickets) {
|
||||||
|
if ($tickets->assigned_to == null) {
|
||||||
|
return "<span style='color:red'>Unassigned</span>";
|
||||||
|
} else {
|
||||||
|
$assign = $tickets->assign_user_name;
|
||||||
|
$url = route('user.show', $tickets->assigned_to);
|
||||||
|
|
||||||
|
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.ucfirst($tickets->assign_first_name).'''.Lang::get('lang.see-profile2')."'><span style='color:green'>".ucfirst($tickets->assign_first_name).' '.ucfirst($tickets->assign_last_name).'</span></a>';
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->addColumn('updated_at', function ($tickets) {
|
||||||
|
$TicketDatarow = $tickets->updated_at;
|
||||||
|
$updated = '--';
|
||||||
|
if ($TicketDatarow) {
|
||||||
|
$updated = $tickets->updated_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
return '<span style="display:none">'.$updated.'</span>'.UTC::usertimezone($updated);
|
||||||
|
})
|
||||||
|
->addColumn('created_at', function ($tickets) {
|
||||||
|
$TicketDatarow = $tickets->created_at;
|
||||||
|
$updated = '--';
|
||||||
|
if ($TicketDatarow) {
|
||||||
|
$updated = $tickets->created_at;
|
||||||
|
}
|
||||||
|
|
||||||
|
return '<span style="display:none">'.$updated.'</span>'.UTC::usertimezone($updated);
|
||||||
|
})
|
||||||
|
->make();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -257,7 +257,7 @@ class UserController extends Controller
|
|||||||
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
|
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
|
||||||
$location = GeoIP::getLocation();
|
$location = GeoIP::getLocation();
|
||||||
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
||||||
$org = Organization::lists('name', 'id')->toArray();
|
$org = Organization::pluck('name', 'id')->toArray();
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.user.create', compact('org', 'settings', 'email_mandatory'))->with('phonecode', $phonecode->phonecode);
|
return view('themes.default1.agent.helpdesk.user.create', compact('org', 'settings', 'email_mandatory'))->with('phonecode', $phonecode->phonecode);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
@@ -614,12 +614,14 @@ class UserController extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$users = User::where('id', '=', $id)->first();
|
$users = User::where('id', '=', $id)->first();
|
||||||
if (count($users) > 0) {
|
if ($users && $users->count() > 0) {
|
||||||
return view('themes.default1.agent.helpdesk.user.show', compact('users'));
|
return view('themes.default1.agent.helpdesk.user.show', compact('users'));
|
||||||
} else {
|
} else {
|
||||||
return redirect()->back()->with('fails', Lang::get('lang.user-not-found'));
|
return redirect()->back()->with('fails', Lang::get('lang.user-not-found'));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
dd($e);
|
||||||
|
|
||||||
return redirect()->back()->with('fails', $e->getMessage());
|
return redirect()->back()->with('fails', $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -647,9 +649,9 @@ class UserController extends Controller
|
|||||||
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
$phonecode = $code->where('iso', '=', $location->iso_code)->first();
|
||||||
$orgs = Organization::all();
|
$orgs = Organization::all();
|
||||||
// dd($org);
|
// dd($org);
|
||||||
$organization_id = User_org::where('user_id', '=', $id)->lists('org_id')->first();
|
$organization_id = User_org::where('user_id', '=', $id)->pluck('org_id')->first();
|
||||||
|
|
||||||
// $org_name=Organization::where('id','=',$org_id)->lists('name')->first();
|
// $org_name=Organization::where('id','=',$org_id)->pluck('name')->first();
|
||||||
// dd($org_name);
|
// dd($org_name);
|
||||||
|
|
||||||
return view('themes.default1.agent.helpdesk.user.edit', compact('users', 'orgs', '$settings', '$email_mandatory', 'organization_id'))->with('phonecode', $phonecode->phonecode);
|
return view('themes.default1.agent.helpdesk.user.edit', compact('users', 'orgs', '$settings', '$email_mandatory', 'organization_id'))->with('phonecode', $phonecode->phonecode);
|
||||||
@@ -833,7 +835,7 @@ class UserController extends Controller
|
|||||||
$org_name = Input::get('org');
|
$org_name = Input::get('org');
|
||||||
|
|
||||||
if ($org_name) {
|
if ($org_name) {
|
||||||
$org = Organization::where('name', '=', $org_name)->lists('id')->first();
|
$org = Organization::where('name', '=', $org_name)->pluck('id')->first();
|
||||||
if ($org) {
|
if ($org) {
|
||||||
$user_org = new User_org();
|
$user_org = new User_org();
|
||||||
$user_org->org_id = $org;
|
$user_org->org_id = $org;
|
||||||
@@ -854,7 +856,7 @@ class UserController extends Controller
|
|||||||
$org_name = Input::get('org');
|
$org_name = Input::get('org');
|
||||||
|
|
||||||
if ($org_name) {
|
if ($org_name) {
|
||||||
$org = Organization::where('name', '=', $org_name)->lists('id')->first();
|
$org = Organization::where('name', '=', $org_name)->pluck('id')->first();
|
||||||
if ($org) {
|
if ($org) {
|
||||||
$user_org = User_org::where('user_id', '=', $id)->first();
|
$user_org = User_org::where('user_id', '=', $id)->first();
|
||||||
$user_org->org_id = $org;
|
$user_org->org_id = $org;
|
||||||
|
@@ -134,7 +134,7 @@ class ArticleController extends Controller
|
|||||||
public function create(Category $category)
|
public function create(Category $category)
|
||||||
{
|
{
|
||||||
/* get the attributes of the category */
|
/* get the attributes of the category */
|
||||||
$category = $category->lists('id', 'name');
|
$category = $category->pluck('id', 'name');
|
||||||
/* get the create page */
|
/* get the create page */
|
||||||
try {
|
try {
|
||||||
return view('themes.default1.agent.kb.article.create', compact('category'));
|
return view('themes.default1.agent.kb.article.create', compact('category'));
|
||||||
@@ -196,9 +196,9 @@ class ArticleController extends Controller
|
|||||||
$aid = $article->where('id', $slug)->first();
|
$aid = $article->where('id', $slug)->first();
|
||||||
$id = $aid->id;
|
$id = $aid->id;
|
||||||
/* define the selected fields */
|
/* define the selected fields */
|
||||||
$assign = $relation->where('article_id', $id)->lists('category_id');
|
$assign = $relation->where('article_id', $id)->pluck('category_id');
|
||||||
/* get the attributes of the category */
|
/* get the attributes of the category */
|
||||||
$category = $category->lists('id', 'name');
|
$category = $category->pluck('id', 'name');
|
||||||
/* get the selected article and display it at edit page */
|
/* get the selected article and display it at edit page */
|
||||||
/* Get the selected article with id */
|
/* Get the selected article with id */
|
||||||
$article = $article->whereId($id)->first();
|
$article = $article->whereId($id)->first();
|
||||||
|
@@ -121,7 +121,7 @@ class CategoryController extends Controller
|
|||||||
public function create(Category $category)
|
public function create(Category $category)
|
||||||
{
|
{
|
||||||
/* Get the all attributes in the category model */
|
/* Get the all attributes in the category model */
|
||||||
$category = $category->lists('name', 'id')->toArray();
|
$category = $category->pluck('name', 'id')->toArray();
|
||||||
/* get the view page to create new category with all attributes
|
/* get the view page to create new category with all attributes
|
||||||
of category model */
|
of category model */
|
||||||
try {
|
try {
|
||||||
@@ -167,7 +167,7 @@ class CategoryController extends Controller
|
|||||||
{
|
{
|
||||||
/* get the atributes of the category model whose id == $id */
|
/* get the atributes of the category model whose id == $id */
|
||||||
$category = Category::whereId($id)->first();
|
$category = Category::whereId($id)->first();
|
||||||
$categories = Category::lists('name', 'id')->toArray();
|
$categories = Category::pluck('name', 'id')->toArray();
|
||||||
/* get the Edit page the selected category via id */
|
/* get the Edit page the selected category via id */
|
||||||
return view('themes.default1.agent.kb.category.edit', compact('category', 'categories'));
|
return view('themes.default1.agent.kb.category.edit', compact('category', 'categories'));
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@ use Auth;
|
|||||||
use DateTime;
|
use DateTime;
|
||||||
use DB;
|
use DB;
|
||||||
use Hash;
|
use Hash;
|
||||||
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
|
use Illuminate\Http\Request;
|
||||||
use Lang;
|
use Lang;
|
||||||
use Socialite;
|
use Socialite;
|
||||||
|
|
||||||
@@ -38,7 +38,6 @@ use Socialite;
|
|||||||
*/
|
*/
|
||||||
class AuthController extends Controller
|
class AuthController extends Controller
|
||||||
{
|
{
|
||||||
use AuthenticatesAndRegistersUsers;
|
|
||||||
/* to redirect after login */
|
/* to redirect after login */
|
||||||
|
|
||||||
// if auth is agent
|
// if auth is agent
|
||||||
@@ -644,4 +643,27 @@ class AuthController extends Controller
|
|||||||
\Session::set($provider.'redirect', $url);
|
\Session::set($provider.'redirect', $url);
|
||||||
$this->changeRedirect();
|
$this->changeRedirect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log the user out of the application.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function getLogout(Request $request)
|
||||||
|
{
|
||||||
|
\Event::fire('user.logout', []);
|
||||||
|
$login = new LoginController();
|
||||||
|
|
||||||
|
return $login->logout($request);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function redirectPath()
|
||||||
|
{
|
||||||
|
$auth = Auth::user();
|
||||||
|
if ($auth && $auth->role != 'user') {
|
||||||
|
return 'dashboard';
|
||||||
|
} else {
|
||||||
|
return '/';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
89
app/Http/Controllers/Auth/ForgotPasswordController.php
Normal file
89
app/Http/Controllers/Auth/ForgotPasswordController.php
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Common\PhpMailController;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\User;
|
||||||
|
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Lang;
|
||||||
|
|
||||||
|
class ForgotPasswordController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller is responsible for handling password reset emails and
|
||||||
|
| includes a trait which assists in sending these notifications from
|
||||||
|
| your application to your users. Feel free to explore this trait.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
use SendsPasswordResetEmails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(PhpMailController $PhpMailController)
|
||||||
|
{
|
||||||
|
$this->middleware('guest');
|
||||||
|
$this->PhpMailController = $PhpMailController;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a reset link to the given user.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
|
*/
|
||||||
|
public function sendResetLinkEmail(Request $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$date = date('Y-m-d H:i:s');
|
||||||
|
$this->validate($request, ['email' => 'required']);
|
||||||
|
\Event::fire('reset.password', []);
|
||||||
|
$user = User::where('email', '=', $request->all('email'))->orWhere('mobile', '=', $request->all('email'))->first();
|
||||||
|
if (isset($user)) {
|
||||||
|
$user1 = $user->email;
|
||||||
|
//gen new code and pass
|
||||||
|
$code = str_random(60);
|
||||||
|
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first();
|
||||||
|
if (isset($password_reset_table)) {
|
||||||
|
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
|
||||||
|
// $password_reset_table->token = $code;
|
||||||
|
// $password_reset_table->update(['token' => $code]);
|
||||||
|
} else {
|
||||||
|
$create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
|
||||||
|
}
|
||||||
|
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $user->user_name, 'email' => $user->email], $message = ['subject' => 'Your Password Reset Link', 'scenario' => 'reset-password'], $template_variables = ['user' => $user->first_name, 'email_address' => $user->email, 'password_reset_link' => url('password/reset/'.$code.'?email='.$user->email)], true);
|
||||||
|
if ($user->mobile != '' && $user->mobile != null) {
|
||||||
|
if ($user->first_name) {
|
||||||
|
$name = $user->first_name;
|
||||||
|
} else {
|
||||||
|
$name = $user->user_name;
|
||||||
|
}
|
||||||
|
$value = [
|
||||||
|
'url' => url('password/reset/'.$code),
|
||||||
|
'name' => $name,
|
||||||
|
'mobile' => $user->mobile,
|
||||||
|
'code' => $user->country_code, ];
|
||||||
|
\Event::fire('reset.password2', [$value]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back()->with('status', Lang::get('lang.we_have_e-mailed_your_password_reset_link'));
|
||||||
|
} else {
|
||||||
|
return redirect()->back()->with('fails', Lang::get("lang.we_can't_find_a_user_with_that_e-mail_address"));
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
dd($e);
|
||||||
|
|
||||||
|
return redirect()->back()->with('fails', $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
38
app/Http/Controllers/Auth/LoginController.php
Normal file
38
app/Http/Controllers/Auth/LoginController.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||||
|
|
||||||
|
class LoginController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Login Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller handles authenticating users for the application and
|
||||||
|
| redirecting them to your home screen. The controller uses a trait
|
||||||
|
| to conveniently provide its functionality to your applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
use AuthenticatesUsers;
|
||||||
|
//use AuthenticatesAndRegistersUsers, ThrottlesLogins;
|
||||||
|
/**
|
||||||
|
* Where to redirect users after login.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $redirectTo = '/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('guest', ['except' => 'logout']);
|
||||||
|
}
|
||||||
|
}
|
@@ -54,7 +54,7 @@ class PasswordController extends Controller
|
|||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
$this->validate($request, ['email' => 'required']);
|
$this->validate($request, ['email' => 'required']);
|
||||||
\Event::fire('reset.password', []);
|
\Event::fire('reset.password', []);
|
||||||
$user = User::where('email', '=', $request->only('email'))->orWhere('mobile', '=', $request->only('email'))->first();
|
$user = User::where('email', '=', $request->all('email'))->orWhere('mobile', '=', $request->all('email'))->first();
|
||||||
if (isset($user)) {
|
if (isset($user)) {
|
||||||
$user1 = $user->email;
|
$user1 = $user->email;
|
||||||
//gen new code and pass
|
//gen new code and pass
|
||||||
@@ -102,11 +102,10 @@ class PasswordController extends Controller
|
|||||||
{
|
{
|
||||||
$this->validate(
|
$this->validate(
|
||||||
$request,
|
$request,
|
||||||
$this->getResetValidationRules(),
|
$this->rules(),
|
||||||
$this->getResetValidationMessages(),
|
$this->validationErrorMessages()
|
||||||
$this->getResetValidationCustomAttributes()
|
|
||||||
);
|
);
|
||||||
$credentials = $this->getResetCredentials($request);
|
$credentials = $this->credentials($request);
|
||||||
// dd($credentials);
|
// dd($credentials);
|
||||||
$email = $credentials['email'];
|
$email = $credentials['email'];
|
||||||
$password = $credentials['password'];
|
$password = $credentials['password'];
|
||||||
|
72
app/Http/Controllers/Auth/RegisterController.php
Normal file
72
app/Http/Controllers/Auth/RegisterController.php
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\User;
|
||||||
|
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
|
||||||
|
class RegisterController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller handles the registration of new users as well as their
|
||||||
|
| validation and creation. By default this controller uses a trait to
|
||||||
|
| provide this functionality without requiring any additional code.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
use RegistersUsers;
|
||||||
|
use AuthenticatesAndRegistersUsers;
|
||||||
|
/**
|
||||||
|
* Where to redirect users after registration.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $redirectTo = '/home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('guest');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a validator for an incoming registration request.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Contracts\Validation\Validator
|
||||||
|
*/
|
||||||
|
protected function validator(array $data)
|
||||||
|
{
|
||||||
|
return Validator::make($data, [
|
||||||
|
'name' => 'required|max:255',
|
||||||
|
'email' => 'required|email|max:255|unique:users',
|
||||||
|
'password' => 'required|min:6|confirmed',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new user instance after a valid registration.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
*
|
||||||
|
* @return User
|
||||||
|
*/
|
||||||
|
protected function create(array $data)
|
||||||
|
{
|
||||||
|
return User::create([
|
||||||
|
'name' => $data['name'],
|
||||||
|
'email' => $data['email'],
|
||||||
|
'password' => bcrypt($data['password']),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
45
app/Http/Controllers/Auth/ResetPasswordController.php
Normal file
45
app/Http/Controllers/Auth/ResetPasswordController.php
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ResetPasswordController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller is responsible for handling password reset requests
|
||||||
|
| and uses a simple trait to include this behavior. You're free to
|
||||||
|
| explore this trait and override any methods you wish to tweak.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
use ResetsPasswords;
|
||||||
|
/**
|
||||||
|
* Where to redirect users after resetting their password.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $redirectTo = '/home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('guest');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showResetForm(Request $request, $token = null)
|
||||||
|
{
|
||||||
|
return view('auth.reset')->with(
|
||||||
|
['token' => $token, 'email' => $request->email]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@@ -248,8 +248,6 @@ class FormController extends Controller
|
|||||||
return Redirect::back()->withInput($request->except('password'))->with('fails', Lang::get('lang.failed-to-create-user-tcket-as-mobile-has-been-taken'));
|
return Redirect::back()->withInput($request->except('password'))->with('fails', Lang::get('lang.failed-to-create-user-tcket-as-mobile-has-been-taken'));
|
||||||
}
|
}
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
dd($ex);
|
|
||||||
|
|
||||||
return redirect()->back()->with('fails', $ex->getMessage());
|
return redirect()->back()->with('fails', $ex->getMessage());
|
||||||
}
|
}
|
||||||
// dd($result);
|
// dd($result);
|
||||||
|
@@ -19,6 +19,7 @@ use Hash;
|
|||||||
// classes
|
// classes
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Lang;
|
use Lang;
|
||||||
|
use Session;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GuestController.
|
* GuestController.
|
||||||
@@ -415,4 +416,30 @@ class UnAuthController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to chnage user language preference.
|
||||||
|
*
|
||||||
|
* @param string $lang //desired language's iso code
|
||||||
|
*
|
||||||
|
* @category function to change system's language
|
||||||
|
*
|
||||||
|
* @return response
|
||||||
|
*/
|
||||||
|
public static function changeUserLanguage($lang)
|
||||||
|
{
|
||||||
|
$path = base_path('resources/lang'); // Path to check available language packages
|
||||||
|
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
|
||||||
|
if (\Auth::check()) {
|
||||||
|
$id = \Auth::user()->id;
|
||||||
|
$user = User::find($id);
|
||||||
|
$user->user_language = $lang;
|
||||||
|
$user->save();
|
||||||
|
} else {
|
||||||
|
Session::put('language', $lang);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -142,7 +142,7 @@ class UserController extends Controller
|
|||||||
$all = $relation->where('category_id', $id)->get();
|
$all = $relation->where('category_id', $id)->get();
|
||||||
// $all->setPath('');
|
// $all->setPath('');
|
||||||
/* from whole attribute pick the article_id */
|
/* from whole attribute pick the article_id */
|
||||||
$article_id = $all->lists('article_id');
|
$article_id = $all->pluck('article_id');
|
||||||
$categorys = $category->get();
|
$categorys = $category->get();
|
||||||
/* direct to view with $article_id */
|
/* direct to view with $article_id */
|
||||||
return view('themes.default1.client.kb.article-list.category', compact('all', 'id', 'categorys', 'article_id'));
|
return view('themes.default1.client.kb.article-list.category', compact('all', 'id', 'categorys', 'article_id'));
|
||||||
|
@@ -34,7 +34,7 @@ class ApiSettings extends Controller
|
|||||||
$ticket_detail = '';
|
$ticket_detail = '';
|
||||||
$settings = $this->api;
|
$settings = $this->api;
|
||||||
if ($settings->get()->count() > 0) {
|
if ($settings->get()->count() > 0) {
|
||||||
$details = $this->api->lists('value', 'key')->toArray();
|
$details = $this->api->pluck('value', 'key')->toArray();
|
||||||
}
|
}
|
||||||
if (array_key_exists('ticket_detail', $details)) {
|
if (array_key_exists('ticket_detail', $details)) {
|
||||||
$ticket_detail = $details['ticket_detail'];
|
$ticket_detail = $details['ticket_detail'];
|
||||||
|
43
app/Http/Controllers/Common/CommonMailer.php
Normal file
43
app/Http/Controllers/Common/CommonMailer.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Common;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
|
||||||
|
class CommonMailer
|
||||||
|
{
|
||||||
|
public function setSmtpDriver($config)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if (!$config) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$https = [];
|
||||||
|
$https['ssl']['verify_peer'] = false;
|
||||||
|
$https['ssl']['verify_peer_name'] = false;
|
||||||
|
$transport = new \Swift_SmtpTransport($config['host'], $config['port'], $config['security']);
|
||||||
|
$transport->setUsername($config['username']);
|
||||||
|
$transport->setPassword($config['password']);
|
||||||
|
$transport->setStreamOptions($https);
|
||||||
|
$set = new \Swift_Mailer($transport);
|
||||||
|
|
||||||
|
// Set the mailer
|
||||||
|
\Mail::setSwiftMailer($set);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
loging($e->getMessage());
|
||||||
|
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMailGunDriver($config)
|
||||||
|
{
|
||||||
|
if (!$config) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@@ -16,6 +16,14 @@ use Mail;
|
|||||||
|
|
||||||
class PhpMailController extends Controller
|
class PhpMailController extends Controller
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
*@var variable to instantiate common mailer class
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->commonMailer = new CommonMailer();
|
||||||
|
}
|
||||||
|
|
||||||
public function fetch_smtp_details($id)
|
public function fetch_smtp_details($id)
|
||||||
{
|
{
|
||||||
$emails = Emails::where('id', '=', $id)->first();
|
$emails = Emails::where('id', '=', $id)->first();
|
||||||
@@ -161,52 +169,49 @@ class PhpMailController extends Controller
|
|||||||
$content = $messagebody;
|
$content = $messagebody;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$send = $this->laravelMail($recipants, $recipantname, $subject, $content, $cc, $attachment);
|
$send = $this->laravelMail($recipants, $recipantname, $subject, $content, $from_address, $cc, $attachment);
|
||||||
|
|
||||||
return $send;
|
return $send;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMailConfig($from_address)
|
public function setMailConfig($mail)
|
||||||
{
|
{
|
||||||
$username = $from_address->email_address;
|
switch ($mail->sending_protocol) {
|
||||||
$fromname = $from_address->email_name;
|
case 'smtp':
|
||||||
$password = $from_address->password;
|
$config = ['host' => $mail->sending_host,
|
||||||
$smtpsecure = $from_address->sending_encryption;
|
'port' => $mail->sending_port,
|
||||||
$host = $from_address->sending_host;
|
'security' => $mail->sending_encryption,
|
||||||
$port = $from_address->sending_port;
|
'username' => $mail->email_address,
|
||||||
$protocol = $from_address->sending_protocol;
|
'password' => $mail->password,
|
||||||
$this->setServices($from_address->id, $protocol);
|
|
||||||
if ($protocol == 'mail') {
|
|
||||||
$username = '';
|
|
||||||
$fromname = '';
|
|
||||||
$host = '';
|
|
||||||
$smtpsecure = '';
|
|
||||||
$port = '';
|
|
||||||
}
|
|
||||||
$configs = [
|
|
||||||
'username' => $username,
|
|
||||||
'from' => ['address' => $username, 'name' => $fromname],
|
|
||||||
'password' => $password,
|
|
||||||
'encryption' => $smtpsecure,
|
|
||||||
'host' => $host,
|
|
||||||
'port' => $port,
|
|
||||||
'driver' => $protocol,
|
|
||||||
];
|
];
|
||||||
foreach ($configs as $key => $config) {
|
if (!$this->commonMailer->setSmtpDriver($config)) {
|
||||||
if (is_array($config)) {
|
\Log::info('Invaid configuration :- '.$config);
|
||||||
foreach ($config as $from) {
|
|
||||||
\Config::set('mail.'.$key, $config);
|
return 'invalid mail configuration';
|
||||||
}
|
|
||||||
} else {
|
|
||||||
\Config::set('mail.'.$key, $config);
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case 'send_mail':
|
||||||
|
$config = [
|
||||||
|
'host' => \Config::get('mail.host'),
|
||||||
|
'port' => \Config::get('mail.port'),
|
||||||
|
'security' => \Config::get('mail.encryption'),
|
||||||
|
'username' => \Config::get('mail.username'),
|
||||||
|
'password' => \Config::get('mail.password'),
|
||||||
|
];
|
||||||
|
$this->commonMailer->setSmtpDriver($config);
|
||||||
|
break;
|
||||||
|
case 'mailgun':
|
||||||
|
$this->commonMailer->setMailGunDriver(null);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 'Mail driver not supported';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setServices($emailid, $protocol)
|
public function setServices($emailid, $protocol)
|
||||||
{
|
{
|
||||||
$service = new \App\Model\MailJob\FaveoMail();
|
$service = new \App\Model\MailJob\FaveoMail();
|
||||||
$services = $service->where('email_id', $emailid)->lists('value', 'key')->toArray();
|
$services = $service->where('email_id', $emailid)->pluck('value', 'key')->toArray();
|
||||||
$controller = new \App\Http\Controllers\Admin\helpdesk\EmailsController();
|
$controller = new \App\Http\Controllers\Admin\helpdesk\EmailsController();
|
||||||
$controller->setServiceConfig($protocol, $services);
|
$controller->setServiceConfig($protocol, $services);
|
||||||
}
|
}
|
||||||
@@ -223,14 +228,14 @@ class PhpMailController extends Controller
|
|||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function laravelMail($to, $toname, $subject, $data, $cc, $attach)
|
public function laravelMail($to, $toname, $subject, $data, $from_address, $cc, $attach)
|
||||||
{
|
{
|
||||||
//dd($to, $toname, $subject, $data, $cc, $attach);
|
//dd($to, $toname, $subject, $data, $cc, $attach);
|
||||||
//dd(\Config::get('mail'));
|
//dd(\Config::get('mail'));
|
||||||
//dd($attach);
|
//dd($attach);
|
||||||
$mail = Mail::send('emails.mail', ['data' => $data], function ($m) use ($to, $subject, $toname, $cc, $attach) {
|
$mail = Mail::send('emails.mail', ['data' => $data], function ($m) use ($to, $subject, $toname, $cc, $attach, $from_address) {
|
||||||
$m->to($to, $toname)->subject($subject);
|
$m->to($to, $toname)->subject($subject);
|
||||||
|
$m->from($from_address->email_address, $from_address->email_name);
|
||||||
if ($cc != null) {
|
if ($cc != null) {
|
||||||
foreach ($cc as $collaborator) {
|
foreach ($cc as $collaborator) {
|
||||||
//mail to collaborators
|
//mail to collaborators
|
||||||
@@ -242,7 +247,7 @@ class PhpMailController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $mail->addBCC($bc);
|
// $mail->addBCC($bc);
|
||||||
$size = count($attach);
|
$size = ($attach) ? count($attach) : 0;
|
||||||
if ($size > 0) {
|
if ($size > 0) {
|
||||||
for ($i = 0; $i < $size; $i++) {
|
for ($i = 0; $i < $size; $i++) {
|
||||||
if (is_array($attach) && array_key_exists($i, $attach)) {
|
if (is_array($attach) && array_key_exists($i, $attach)) {
|
||||||
@@ -279,7 +284,7 @@ class PhpMailController extends Controller
|
|||||||
if ($active_queue) {
|
if ($active_queue) {
|
||||||
$short = $active_queue->short_name;
|
$short = $active_queue->short_name;
|
||||||
$fields = new \App\Model\MailJob\FaveoQueue();
|
$fields = new \App\Model\MailJob\FaveoQueue();
|
||||||
$field = $fields->where('service_id', $active_queue->id)->lists('value', 'key')->toArray();
|
$field = $fields->where('service_id', $active_queue->id)->pluck('value', 'key')->toArray();
|
||||||
}
|
}
|
||||||
$this->setQueueConfig($short, $field);
|
$this->setQueueConfig($short, $field);
|
||||||
}
|
}
|
||||||
|
@@ -97,7 +97,7 @@ class TemplateController extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$i = $this->template->orderBy('created_at', 'desc')->first()->id + 1;
|
$i = $this->template->orderBy('created_at', 'desc')->first()->id + 1;
|
||||||
$type = $this->type->lists('name', 'id')->toArray();
|
$type = $this->type->pluck('name', 'id')->toArray();
|
||||||
|
|
||||||
return view('themes.default1.common.template.create', compact('type'));
|
return view('themes.default1.common.template.create', compact('type'));
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
@@ -135,7 +135,7 @@ class TemplateController extends Controller
|
|||||||
try {
|
try {
|
||||||
$i = $this->template->orderBy('created_at', 'desc')->first()->id + 1;
|
$i = $this->template->orderBy('created_at', 'desc')->first()->id + 1;
|
||||||
$template = $this->template->where('id', $id)->first();
|
$template = $this->template->where('id', $id)->first();
|
||||||
$type = $this->type->lists('name', 'id')->toArray();
|
$type = $this->type->pluck('name', 'id')->toArray();
|
||||||
|
|
||||||
return view('themes.default1.common.template.edit', compact('type', 'template'));
|
return view('themes.default1.common.template.edit', compact('type', 'template'));
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
|
@@ -5,7 +5,6 @@ namespace App\Http\Controllers\Installer\helpdesk;
|
|||||||
// controllers
|
// controllers
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
// requests
|
// requests
|
||||||
use App\Http\Requests\helpdesk\DatabaseRequest;
|
|
||||||
use App\Http\Requests\helpdesk\InstallerRequest;
|
use App\Http\Requests\helpdesk\InstallerRequest;
|
||||||
use App\Model\helpdesk\Settings\System;
|
use App\Model\helpdesk\Settings\System;
|
||||||
// models
|
// models
|
||||||
@@ -46,15 +45,10 @@ class InstallController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function licence()
|
public function licence()
|
||||||
{
|
{
|
||||||
// checking if the installation is running for the first time or not
|
if (Cache::get('step1') == 'step1') {
|
||||||
$directory = base_path();
|
return View::make('themes/default1/installer/helpdesk/view1');
|
||||||
if (file_exists($directory.DIRECTORY_SEPARATOR.'.env')) {
|
|
||||||
return redirect('/auth/login');
|
|
||||||
} else {
|
} else {
|
||||||
Cache::flush();
|
return Redirect::route('prerequisites');
|
||||||
Artisan::call('config:clear');
|
|
||||||
|
|
||||||
return view('themes/default1/installer/helpdesk/view1');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,11 +60,10 @@ class InstallController extends Controller
|
|||||||
public function licencecheck(Request $request)
|
public function licencecheck(Request $request)
|
||||||
{
|
{
|
||||||
// checking if the user have accepted the licence agreement
|
// checking if the user have accepted the licence agreement
|
||||||
$accept = (Input::has('accept1')) ? true : false;
|
if (Input::has('acceptme')) {
|
||||||
if ($accept == 'accept') {
|
Cache::forever('step2', 'step2');
|
||||||
Cache::forever('step1', 'step1');
|
|
||||||
|
|
||||||
return Redirect::route('prerequisites');
|
return Redirect::route('configuration');
|
||||||
} else {
|
} else {
|
||||||
return Redirect::route('licence')->with('fails', 'Failed! first accept the licence agreeement');
|
return Redirect::route('licence')->with('fails', 'Failed! first accept the licence agreeement');
|
||||||
}
|
}
|
||||||
@@ -87,10 +80,14 @@ class InstallController extends Controller
|
|||||||
public function prerequisites(Request $request)
|
public function prerequisites(Request $request)
|
||||||
{
|
{
|
||||||
// checking if the installation is running for the first time or not
|
// checking if the installation is running for the first time or not
|
||||||
if (Cache::get('step1') == 'step1') {
|
$directory = base_path();
|
||||||
return View::make('themes/default1/installer/helpdesk/view2');
|
if (file_exists($directory.DIRECTORY_SEPARATOR.'.env')) {
|
||||||
|
return redirect('/auth/login');
|
||||||
} else {
|
} else {
|
||||||
return Redirect::route('licence');
|
Cache::flush();
|
||||||
|
Artisan::call('config:clear');
|
||||||
|
|
||||||
|
return view('themes/default1/installer/helpdesk/view2');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,9 +99,9 @@ class InstallController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function prerequisitescheck(Request $request)
|
public function prerequisitescheck(Request $request)
|
||||||
{
|
{
|
||||||
Cache::forever('step2', 'step2');
|
Cache::forever('step1', 'step1');
|
||||||
|
|
||||||
return Redirect::route('configuration');
|
return Redirect::route('licence');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -164,69 +161,25 @@ class InstallController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function configurationcheck(DatabaseRequest $request)
|
public function configurationcheck(Request $request)
|
||||||
{
|
{
|
||||||
Cache::forever('step4', 'step4');
|
Cache::forever('step4', 'step4');
|
||||||
|
|
||||||
Session::set('default', $request->input('default'));
|
Session::put('default', $request->input('default'));
|
||||||
Session::set('host', $request->input('host'));
|
Session::put('host', $request->input('host'));
|
||||||
Session::set('databasename', $request->input('databasename'));
|
Session::put('databasename', $request->input('databasename'));
|
||||||
Session::set('username', $request->input('username'));
|
Session::put('username', $request->input('username'));
|
||||||
Session::set('password', $request->input('password'));
|
Session::put('password', $request->input('password'));
|
||||||
Session::set('port', $request->input('port'));
|
Session::put('port', $request->input('port'));
|
||||||
|
Cache::forever('dummy_data_installation', false);
|
||||||
|
if ($request->has('dummy-data')) {
|
||||||
|
Cache::forget('dummy_data_installation');
|
||||||
|
Cache::forever('dummy_data_installation', true);
|
||||||
|
}
|
||||||
|
|
||||||
return Redirect::route('database');
|
return Redirect::route('database');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* postconnection.
|
|
||||||
*
|
|
||||||
* @return type view
|
|
||||||
*/
|
|
||||||
public function postconnection(Request $request)
|
|
||||||
{
|
|
||||||
error_reporting(E_ALL & ~E_NOTICE);
|
|
||||||
$default = Input::get('default');
|
|
||||||
$host = Input::get('host');
|
|
||||||
$database = Input::get('databasename');
|
|
||||||
$dbusername = Input::get('username');
|
|
||||||
$dbpassword = Input::get('password');
|
|
||||||
$port = Input::get('port');
|
|
||||||
|
|
||||||
$ENV['APP_ENV'] = 'production';
|
|
||||||
$ENV['APP_DEBUG'] = 'false';
|
|
||||||
$ENV['APP_KEY'] = 'SomeRandomString';
|
|
||||||
$ENV['APP_BUGSNAG'] = 'true';
|
|
||||||
$ENV['APP_URL'] = 'http://localhost';
|
|
||||||
$ENV['DB_INSTALL'] = '%0%';
|
|
||||||
$ENV['DB_TYPE'] = $default;
|
|
||||||
$ENV['DB_HOST'] = $host;
|
|
||||||
$ENV['DB_PORT'] = $port;
|
|
||||||
$ENV['DB_DATABASE'] = $database;
|
|
||||||
$ENV['DB_USERNAME'] = $dbusername;
|
|
||||||
$ENV['DB_PASSWORD'] = $dbpassword;
|
|
||||||
$ENV['MAIL_DRIVER'] = 'smtp';
|
|
||||||
$ENV['MAIL_HOST'] = 'mailtrap.io';
|
|
||||||
$ENV['MAIL_PORT'] = '2525';
|
|
||||||
$ENV['MAIL_USERNAME'] = 'null';
|
|
||||||
$ENV['MAIL_PASSWORD'] = 'null';
|
|
||||||
$ENV['CACHE_DRIVER'] = 'file';
|
|
||||||
$ENV['SESSION_DRIVER'] = 'file';
|
|
||||||
$ENV['QUEUE_DRIVER'] = 'sync';
|
|
||||||
|
|
||||||
$config = '';
|
|
||||||
foreach ($ENV as $key => $val) {
|
|
||||||
$config .= "{$key}={$val}\n";
|
|
||||||
}
|
|
||||||
// Write environment file
|
|
||||||
$fp = fopen(base_path().DIRECTORY_SEPARATOR.'example.env', 'w');
|
|
||||||
fwrite($fp, $config);
|
|
||||||
fclose($fp);
|
|
||||||
rename(base_path().DIRECTORY_SEPARATOR.'example.env', base_path().DIRECTORY_SEPARATOR.'.env');
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get database
|
* Get database
|
||||||
* checking prerequisites.
|
* checking prerequisites.
|
||||||
@@ -269,28 +222,24 @@ class InstallController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type view
|
* @return type view
|
||||||
*/
|
*/
|
||||||
public function accountcheck(InstallerRequest $request)
|
public function accountcheck(Request $request)
|
||||||
{
|
{
|
||||||
// checking is the installation was done previously
|
$validator = \Validator::make($request->all(), [
|
||||||
try {
|
'firstname' => 'required|max:20',
|
||||||
$check_for_pre_installation = System::all();
|
'Lastname' => 'required|max:20',
|
||||||
if ($check_for_pre_installation) {
|
'email' => 'required|max:50|email',
|
||||||
rename(base_path().DIRECTORY_SEPARATOR.'.env', base_path().DIRECTORY_SEPARATOR.'example.env');
|
'username' => 'required|max:50|min:3',
|
||||||
Cache::put('fails', 'The data in database already exist. Please provide fresh database', 2);
|
'password' => 'required|min:6',
|
||||||
|
'confirmpassword' => 'required|same:password',
|
||||||
|
]);
|
||||||
|
|
||||||
return redirect()->route('configuration');
|
if ($validator->fails()) {
|
||||||
|
return redirect('step5')
|
||||||
|
->withErrors($validator)
|
||||||
|
->withInput();
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
// checking is the installation was done previously
|
||||||
}
|
// Set variables fetched from input request
|
||||||
if ($request->input('dummy-data') == 'on') {
|
|
||||||
$path = base_path().'/DB/dummy-data.sql';
|
|
||||||
DB::unprepared(file_get_contents($path));
|
|
||||||
} else {
|
|
||||||
// migrate database
|
|
||||||
Artisan::call('migrate', ['--force' => true]);
|
|
||||||
Artisan::call('db:seed', ['--force' => true]);
|
|
||||||
}
|
|
||||||
// create user
|
|
||||||
$firstname = $request->input('firstname');
|
$firstname = $request->input('firstname');
|
||||||
$lastname = $request->input('Lastname');
|
$lastname = $request->input('Lastname');
|
||||||
$email = $request->input('email');
|
$email = $request->input('email');
|
||||||
@@ -298,49 +247,56 @@ class InstallController extends Controller
|
|||||||
$password = $request->input('password');
|
$password = $request->input('password');
|
||||||
|
|
||||||
$language = $request->input('language');
|
$language = $request->input('language');
|
||||||
$timezone = $request->input('timezone');
|
|
||||||
$date = $request->input('date');
|
|
||||||
$datetime = $request->input('datetime');
|
|
||||||
$changed = UnAuth::changeLanguage($language);
|
|
||||||
if (!$changed) {
|
|
||||||
return \Redirect::back()->with('fails', 'Invalid language');
|
|
||||||
}
|
|
||||||
// checking requested timezone for the admin and system
|
// checking requested timezone for the admin and system
|
||||||
$timezones = Timezones::where('name', '=', $timezone)->first();
|
$timezones = Timezones::where('name', '=', $request->input('timezone'))->first();
|
||||||
if ($timezones == null) {
|
if ($timezones == null) {
|
||||||
return redirect()->back()->with('fails', 'Invalid time-zone');
|
return redirect()->back()->with('fails', 'Invalid time-zone');
|
||||||
}
|
}
|
||||||
|
|
||||||
// checking requested date time format for the admin and system
|
// checking requested date time format for the admin and system
|
||||||
$date_time_format = Date_time_format::where('format', '=', $datetime)->first();
|
$date_time_format = Date_time_format::where('format', '=', $request->input('datetime'))->first();
|
||||||
if ($date_time_format == null) {
|
if ($date_time_format == null) {
|
||||||
return redirect()->back()->with('fails', 'invalid date-time format');
|
return redirect()->back()->with('fails', 'invalid date-time format');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creating minum settings for system
|
$lang_path = base_path('resources/lang');
|
||||||
$system = new System();
|
|
||||||
|
//check user input language package is available or not in the system
|
||||||
|
if (array_key_exists($language, \Config::get('languages')) && in_array($language, scandir($lang_path))) {
|
||||||
|
// do something here
|
||||||
|
} else {
|
||||||
|
return \Redirect::back()->with('fails', 'Invalid language');
|
||||||
|
}
|
||||||
|
|
||||||
|
$changed = UnAuth::changeLanguage($language);
|
||||||
|
if (!$changed) {
|
||||||
|
return \Redirect::back()->with('fails', 'Invalid language');
|
||||||
|
}
|
||||||
|
|
||||||
|
$system = System::where('id', '=', 1)->first();
|
||||||
$system->status = 1;
|
$system->status = 1;
|
||||||
$system->department = 1;
|
$system->department = 1;
|
||||||
$system->date_time_format = $date_time_format->id;
|
$system->date_time_format = $date_time_format->id;
|
||||||
$system->time_zone = $timezones->id;
|
$system->time_zone = $timezones->id;
|
||||||
$version = \Config::get('app.version');
|
$version = \Config::get('app.tags');
|
||||||
$version = explode(' ', $version);
|
// $version = explode(' ', $version);
|
||||||
$version = $version[1];
|
// $version = $version[1];
|
||||||
$system->version = $version;
|
$system->version = $version;
|
||||||
$system->save();
|
$system->save();
|
||||||
|
|
||||||
|
$admin_tzone = $timezones->id;
|
||||||
// creating an user
|
// creating an user
|
||||||
$user = User::create([
|
$user = User::updateOrCreate(['id' => 1], [
|
||||||
'first_name' => $firstname,
|
'first_name' => $firstname,
|
||||||
'last_name' => $lastname,
|
'last_name' => $lastname,
|
||||||
'email' => $email,
|
'email' => $email,
|
||||||
'user_name' => $username,
|
'user_name' => $username,
|
||||||
'password' => Hash::make($password),
|
'password' => Hash::make($password),
|
||||||
'assign_group' => 1,
|
//'assign_group' => 1,
|
||||||
'primary_dpt' => 1,
|
'primary_dpt' => 1,
|
||||||
'active' => 1,
|
'active' => 1,
|
||||||
'role' => 'admin',
|
'role' => 'admin',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// checking if the user have been created
|
// checking if the user have been created
|
||||||
if ($user) {
|
if ($user) {
|
||||||
Cache::forever('step6', 'step6');
|
Cache::forever('step6', 'step6');
|
||||||
@@ -359,34 +315,20 @@ class InstallController extends Controller
|
|||||||
{
|
{
|
||||||
// checking if the installation have been completed or not
|
// checking if the installation have been completed or not
|
||||||
if (Cache::get('step6') == 'step6') {
|
if (Cache::get('step6') == 'step6') {
|
||||||
$value = '1';
|
|
||||||
$install = base_path().DIRECTORY_SEPARATOR.'.env';
|
|
||||||
$datacontent = File::get($install);
|
|
||||||
$datacontent = str_replace('%0%', $value, $datacontent);
|
|
||||||
File::put($install, $datacontent);
|
|
||||||
// setting email settings in route
|
|
||||||
$smtpfilepath = "\App\Http\Controllers\Common\SettingsController::smtp()";
|
|
||||||
|
|
||||||
$link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
|
||||||
$pos = strpos($link, 'final');
|
|
||||||
$link = substr($link, 0, $pos);
|
|
||||||
$app_url = base_path().DIRECTORY_SEPARATOR.'.env';
|
|
||||||
$datacontent2 = File::get($app_url);
|
|
||||||
$datacontent2 = str_replace('http://localhost', $link, $datacontent2);
|
|
||||||
File::put($app_url, $datacontent2);
|
|
||||||
$language = Cache::get('language');
|
$language = Cache::get('language');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Cache::flush();
|
\Cache::flush();
|
||||||
|
|
||||||
Artisan::call('key:generate');
|
|
||||||
\Cache::forever('language', $language);
|
\Cache::forever('language', $language);
|
||||||
|
$this->updateInstalEnv();
|
||||||
|
|
||||||
return View::make('themes/default1/installer/helpdesk/view6');
|
return View::make('themes/default1/installer/helpdesk/view6');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return Redirect::route('account')->with('fails', $e->getMessage());
|
return Redirect::route('account')->with('fails', $e->getMessage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$this->updateInstalEnv();
|
||||||
|
|
||||||
return redirect('/auth/login');
|
return redirect('/auth/login');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -400,9 +342,11 @@ class InstallController extends Controller
|
|||||||
public function finalcheck()
|
public function finalcheck()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->updateInstalEnv();
|
||||||
|
|
||||||
return redirect('/auth/login');
|
return redirect('/auth/login');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return redirect('/auth/login');
|
return redirect('/auth/login')->with('fails', $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,10 +358,16 @@ class InstallController extends Controller
|
|||||||
if ($f1 >= '644') {
|
if ($f1 >= '644') {
|
||||||
return Redirect::back();
|
return Redirect::back();
|
||||||
} else {
|
} else {
|
||||||
return Redirect::back()->with('fail_to_change', 'We are unable to change file permission on your server please try to change permission manually.');
|
return Redirect::back()->with(
|
||||||
|
'fail_to_change',
|
||||||
|
'We are unable to change file permission on your server please try to change permission manually.'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Redirect::back()->with('fail_to_change', 'We are unable to change file permission on your server please try to change permission manually.');
|
return Redirect::back()->with(
|
||||||
|
'fail_to_change',
|
||||||
|
'We are unable to change file permission on your server please try to change permission manually.'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,4 +375,198 @@ class InstallController extends Controller
|
|||||||
{
|
{
|
||||||
return view('themes/default1/installer/helpdesk/check-js')->with('url', 'step1');
|
return view('themes/default1/installer/helpdesk/check-js')->with('url', 'step1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createEnv($api = true)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if (Input::get('default')) {
|
||||||
|
$default = Input::get('default');
|
||||||
|
} else {
|
||||||
|
$default = Session::get('default');
|
||||||
|
}
|
||||||
|
if (Input::get('host')) {
|
||||||
|
$host = Input::get('host');
|
||||||
|
} else {
|
||||||
|
$host = Session::get('host');
|
||||||
|
}
|
||||||
|
if (Input::get('databasename')) {
|
||||||
|
$database = Input::get('databasename');
|
||||||
|
} else {
|
||||||
|
$database = Session::get('databasename');
|
||||||
|
}
|
||||||
|
if (Input::get('username')) {
|
||||||
|
$dbusername = Input::get('username');
|
||||||
|
} else {
|
||||||
|
$dbusername = Session::get('username');
|
||||||
|
}
|
||||||
|
if (Input::get('password')) {
|
||||||
|
$dbpassword = Input::get('password');
|
||||||
|
} else {
|
||||||
|
$dbpassword = Session::get('password');
|
||||||
|
}
|
||||||
|
if (Input::get('port')) {
|
||||||
|
$port = Input::get('port');
|
||||||
|
} else {
|
||||||
|
$port = Session::get('port');
|
||||||
|
}
|
||||||
|
$this->env($default, $host, $port, $database, $dbusername, $dbpassword);
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
$result = ['error' => $ex->getMessage()];
|
||||||
|
|
||||||
|
return response()->json(compact('result'), 500);
|
||||||
|
}
|
||||||
|
if ($api) {
|
||||||
|
$url = url('preinstall/check');
|
||||||
|
$result = ['success' => 'Environment configuration file has been created successfully', 'next' => 'Running pre migration test', 'api' => $url];
|
||||||
|
|
||||||
|
return response()->json(compact('result'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function env($default, $host, $port, $database, $dbusername, $dbpassword)
|
||||||
|
{
|
||||||
|
$ENV['APP_DEBUG'] = 'false';
|
||||||
|
$ENV['APP_BUGSNAG'] = 'true';
|
||||||
|
$ENV['APP_URL'] = url('/');
|
||||||
|
$ENV['DB_TYPE'] = $default;
|
||||||
|
$ENV['DB_HOST'] = '"'.$host.'"';
|
||||||
|
$ENV['DB_PORT'] = '"'.$port.'"';
|
||||||
|
$ENV['DB_DATABASE'] = '"'.$database.'"';
|
||||||
|
$ENV['DB_USERNAME'] = '"'.$dbusername.'"';
|
||||||
|
$ENV['DB_PASSWORD'] = '"'.$dbpassword.'"';
|
||||||
|
$ENV['MAIL_DRIVER'] = 'smtp';
|
||||||
|
$ENV['MAIL_HOST'] = 'mailtrap.io';
|
||||||
|
$ENV['MAIL_PORT'] = '2525';
|
||||||
|
$ENV['MAIL_USERNAME'] = 'null';
|
||||||
|
$ENV['MAIL_PASSWORD'] = 'null';
|
||||||
|
$ENV['CACHE_DRIVER'] = 'file';
|
||||||
|
$ENV['SESSION_DRIVER'] = 'file';
|
||||||
|
$ENV['SESSION_COOKIE_NAME'] = 'faveo_'.rand(0, 10000);
|
||||||
|
$ENV['QUEUE_DRIVER'] = 'sync';
|
||||||
|
$ENV['JWT_TTL'] = 4;
|
||||||
|
$ENV['FCM_SERVER_KEY'] = 'AIzaSyCyx5OFnsRFUmDLTMbPV50ZMDUGSG-bLw4';
|
||||||
|
$ENV['FCM_SENDER_ID'] = '661051343223';
|
||||||
|
$ENV['REDIS_DATABASE'] = '0';
|
||||||
|
|
||||||
|
$config = '';
|
||||||
|
foreach ($ENV as $key => $val) {
|
||||||
|
$config .= "{$key}={$val}\n";
|
||||||
|
}
|
||||||
|
if (is_file(base_path().DIRECTORY_SEPARATOR.'.env')) {
|
||||||
|
unlink(base_path().DIRECTORY_SEPARATOR.'.env');
|
||||||
|
}
|
||||||
|
if (!is_file(base_path().DIRECTORY_SEPARATOR.'example.env')) {
|
||||||
|
fopen(base_path().DIRECTORY_SEPARATOR.'example.env', 'w');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write environment file
|
||||||
|
$fp = fopen(base_path().DIRECTORY_SEPARATOR.'example.env', 'w');
|
||||||
|
fwrite($fp, $config);
|
||||||
|
fclose($fp);
|
||||||
|
rename(base_path().DIRECTORY_SEPARATOR.'example.env', base_path().DIRECTORY_SEPARATOR.'.env');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkPreInstall()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$check_for_pre_installation = System::select('id')->first();
|
||||||
|
if ($check_for_pre_installation) {
|
||||||
|
throw new Exception('This database already has tables and data. Please provide fresh database', 100);
|
||||||
|
}
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
if ($ex->getCode() == 100) {
|
||||||
|
Artisan::call('droptables');
|
||||||
|
$this->createEnv(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Artisan::call('key:generate', ['--force' => true]);
|
||||||
|
|
||||||
|
$url = url('migrate');
|
||||||
|
$result = ['success' => 'Pre migration test has run successfully', 'next' => 'Migrating tables in database', 'api' => $url];
|
||||||
|
|
||||||
|
return response()->json(compact('result'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function migrate()
|
||||||
|
{
|
||||||
|
$db_install_method = '';
|
||||||
|
|
||||||
|
try {
|
||||||
|
$tableNames = \Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
|
||||||
|
if (count($tableNames) === 0) {
|
||||||
|
if (!Cache::get('dummy_data_installation')) {
|
||||||
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
|
$db_install_method = 'migrate';
|
||||||
|
} else {
|
||||||
|
$path = base_path().DIRECTORY_SEPARATOR.'DB'.DIRECTORY_SEPARATOR.'dummy-data.sql';
|
||||||
|
DB::unprepared(file_get_contents($path));
|
||||||
|
$db_install_method = 'dump';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
$this->rollBackMigration();
|
||||||
|
$result = ['error' => $ex->getMessage()];
|
||||||
|
|
||||||
|
return response()->json(compact('result'), 500);
|
||||||
|
}
|
||||||
|
$url = ($db_install_method == 'migrate') ? url('seed') : '';
|
||||||
|
$message = ($db_install_method == 'migrate') ? 'Tables have been migrated successfully in database.' : 'Database has been setup successfully.';
|
||||||
|
$result = ['success' => $message, 'next' => 'Seeding pre configurations data', 'api' => $url];
|
||||||
|
|
||||||
|
return response()->json(compact('result'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function rollBackMigration()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
Artisan::call('migrate:reset', ['--force' => true]);
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
$result = ['error' => $ex->getMessage()];
|
||||||
|
|
||||||
|
return response()->json(compact('result'), 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function seed(Request $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if ($request->input('dummy-data') == 'on') {
|
||||||
|
$path = base_path().'/DB/dummy-data.sql';
|
||||||
|
DB::unprepared(DB::raw(file_get_contents($path)));
|
||||||
|
} else {
|
||||||
|
\Schema::disableForeignKeyConstraints();
|
||||||
|
$tableNames = \Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
|
||||||
|
foreach ($tableNames as $name) {
|
||||||
|
//if you don't want to truncate migrations
|
||||||
|
if ($name == 'migrations') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
DB::table($name)->truncate();
|
||||||
|
}
|
||||||
|
Artisan::call('db:seed', ['--force' => true]);
|
||||||
|
}
|
||||||
|
//$this->updateInstalEnv();
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
$result = ['error' => $ex->getMessage()];
|
||||||
|
|
||||||
|
return response()->json(compact('result'), 500);
|
||||||
|
}
|
||||||
|
$result = ['success' => 'Database has been setup successfully.'];
|
||||||
|
|
||||||
|
return response()->json(compact('result'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateInstalEnv()
|
||||||
|
{
|
||||||
|
$env = base_path().DIRECTORY_SEPARATOR.'.env';
|
||||||
|
if (is_file($env)) {
|
||||||
|
$txt = 'DB_INSTALL=1';
|
||||||
|
$txt1 = 'APP_ENV=production';
|
||||||
|
file_put_contents($env, $txt.PHP_EOL, FILE_APPEND | LOCK_EX);
|
||||||
|
file_put_contents($env, $txt1, FILE_APPEND | LOCK_EX);
|
||||||
|
} else {
|
||||||
|
throw new Exception('.env not found');
|
||||||
|
}
|
||||||
|
Artisan::call('jwt:secret');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -34,9 +34,11 @@ class Kernel extends HttpKernel
|
|||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
\App\Http\Middleware\LanguageMiddleware::class,
|
\App\Http\Middleware\LanguageMiddleware::class,
|
||||||
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
],
|
],
|
||||||
'api' => [
|
'api' => [
|
||||||
'throttle:60,1',
|
'throttle:60,1',
|
||||||
|
'bindings',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -48,7 +50,7 @@ class Kernel extends HttpKernel
|
|||||||
protected $routeMiddleware = [
|
protected $routeMiddleware = [
|
||||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
'roles' => \App\Http\Middleware\CheckRole::class,
|
'roles' => \App\Http\Middleware\CheckRole::class,
|
||||||
@@ -57,8 +59,13 @@ class Kernel extends HttpKernel
|
|||||||
'api' => \App\Http\Middleware\ApiKey::class,
|
'api' => \App\Http\Middleware\ApiKey::class,
|
||||||
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
|
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
|
||||||
'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
|
'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
|
||||||
|
'jwt.authOveride' => \App\Http\Middleware\JwtAuthenticate::class,
|
||||||
'update' => \App\Http\Middleware\CheckUpdate::class,
|
'update' => \App\Http\Middleware\CheckUpdate::class,
|
||||||
'board' => \App\Http\Middleware\CheckBoard::class,
|
'board' => \App\Http\Middleware\CheckBoard::class,
|
||||||
'install' => \App\Http\Middleware\Install::class,
|
'install' => \App\Http\Middleware\Install::class,
|
||||||
|
'redirect' => \App\Http\Middleware\Redirect::class,
|
||||||
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
'installer' => \App\Http\Middleware\IsInstalled::class,
|
||||||
|
'force.option' => \App\Http\Middleware\TicketViewURL::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,6 @@ class CheckRoleAgent
|
|||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect('dashboard')->with('fails', 'You are not Authorised');
|
return redirect('dashboard')->with('fails', 'You are not Autherised');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -57,7 +57,7 @@ class CheckUpdate
|
|||||||
if ($not->count() > 0) {
|
if ($not->count() > 0) {
|
||||||
$now = \Carbon\Carbon::now();
|
$now = \Carbon\Carbon::now();
|
||||||
$yesterday = \Carbon\Carbon::yesterday();
|
$yesterday = \Carbon\Carbon::yesterday();
|
||||||
$notifications = $notify->whereBetween('created_at', [$yesterday, $now])->lists('value', 'key');
|
$notifications = $notify->whereBetween('created_at', [$yesterday, $now])->pluck('value', 'key');
|
||||||
$todelete = $notify->where('created_at', '<', $yesterday)->get();
|
$todelete = $notify->where('created_at', '<', $yesterday)->get();
|
||||||
if ($todelete->count() > 0) {
|
if ($todelete->count() > 0) {
|
||||||
foreach ($todelete as $delete) {
|
foreach ($todelete as $delete) {
|
||||||
@@ -114,7 +114,7 @@ class CheckUpdate
|
|||||||
if ($n) {
|
if ($n) {
|
||||||
$now = \Carbon\Carbon::now();
|
$now = \Carbon\Carbon::now();
|
||||||
$yesterday = \Carbon\Carbon::yesterday();
|
$yesterday = \Carbon\Carbon::yesterday();
|
||||||
$notifications = $notify->where('key', 'new-version')->whereBetween('created_at', [$yesterday, $now])->lists('value', 'key');
|
$notifications = $notify->where('key', 'new-version')->whereBetween('created_at', [$yesterday, $now])->pluck('value', 'key');
|
||||||
if ($notifications->count() > 0) {
|
if ($notifications->count() > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
32
app/Http/Middleware/IsInstalled.php
Normal file
32
app/Http/Middleware/IsInstalled.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
|
||||||
|
class IsInstalled
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
if (!isInstall()) {
|
||||||
|
return $next($request);
|
||||||
|
} else {
|
||||||
|
if ($request->isJson()) {
|
||||||
|
$url = url('/');
|
||||||
|
$result = ['fails' => 'already installed', 'api' => $url];
|
||||||
|
|
||||||
|
return response()->json(compact('result'));
|
||||||
|
} else {
|
||||||
|
return redirect('/');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
49
app/Http/Middleware/JwtAuthenticate.php
Normal file
49
app/Http/Middleware/JwtAuthenticate.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* This file is part of jwt-auth.
|
||||||
|
*
|
||||||
|
* (c) Sean Tymon <tymon148@gmail.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Tymon\JWTAuth\Http\Middleware\BaseMiddleware;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Middleware to handle JWT Authentication for the API call which requires
|
||||||
|
* a valid token.
|
||||||
|
*
|
||||||
|
* @author Manish Verma <manish.verma@ladybirdweb.com>
|
||||||
|
*
|
||||||
|
* @since v1.10
|
||||||
|
*/
|
||||||
|
class JwtAuthenticate extends BaseMiddleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
*
|
||||||
|
* @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->authenticate($request);
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return response(
|
||||||
|
['success' => false, 'message' => $e->getMessage()],
|
||||||
|
$e->getStatusCode()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -4,20 +4,44 @@ namespace App\Http\Middleware;
|
|||||||
|
|
||||||
use Cache;
|
use Cache;
|
||||||
use Closure;
|
use Closure;
|
||||||
// use Illuminate\Contracts\Routing\Middleware;
|
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
|
// use Illuminate\Contracts\Routing\Middleware;
|
||||||
use Illuminate\Support\Facades\Config;
|
use Illuminate\Support\Facades\Config;
|
||||||
|
use Session;
|
||||||
|
|
||||||
class LanguageMiddleware
|
class LanguageMiddleware
|
||||||
{
|
{
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if (Cache::has('language') and array_key_exists(Cache::get('language'), Config::get('languages'))) {
|
$lang = '';
|
||||||
App::setLocale(Cache::get('language'));
|
if (\Auth::check()) {
|
||||||
|
if (\Auth::user()->user_language != null) {
|
||||||
|
$lang = \Auth::user()->user_language;
|
||||||
|
} else {
|
||||||
|
$lang = $this->getLangFromSessionOrCache();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$lang = $this->getLangFromSessionOrCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($lang != '' and array_key_exists($lang, Config::get('languages'))) {
|
||||||
|
App::setLocale($lang);
|
||||||
} else { // This is optional as Laravel will automatically set the fallback language if there is none specified
|
} else { // This is optional as Laravel will automatically set the fallback language if there is none specified
|
||||||
App::setLocale(Config::get('app.fallback_locale'));
|
App::setLocale(Config::get('app.fallback_locale'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLangFromSessionOrCache()
|
||||||
|
{
|
||||||
|
$lang = '';
|
||||||
|
if (Session::has('language')) {
|
||||||
|
$lang = Session::get('language');
|
||||||
|
} elseif (Cache::has('language')) {
|
||||||
|
$lang = Cache::get('language');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $lang;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
49
app/Http/Middleware/Redirect.php
Normal file
49
app/Http/Middleware/Redirect.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
|
||||||
|
class Redirect
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
$root = $request->root(); //http://localhost/faveo/Faveo-Helpdesk-Pro-fork/public
|
||||||
|
$url = $this->setAppUrl($request);
|
||||||
|
if ($url == $root) {
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
$seg = '';
|
||||||
|
$segments = $request->segments();
|
||||||
|
if (count($segments) > 0) {
|
||||||
|
foreach ($segments as $segment) {
|
||||||
|
$seg .= '/'.$segment;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$url = $url.$seg;
|
||||||
|
|
||||||
|
return redirect($url);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAppUrl($request)
|
||||||
|
{
|
||||||
|
$url = $request->root();
|
||||||
|
if (isInstall()) {
|
||||||
|
$schema = new \App\Model\helpdesk\Settings\CommonSettings();
|
||||||
|
$row = $schema->getOptionValue('url', 'app_url', true);
|
||||||
|
if ($row) {
|
||||||
|
$url = $row->option_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
}
|
47
app/Http/Middleware/TicketViewURL.php
Normal file
47
app/Http/Middleware/TicketViewURL.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Input;
|
||||||
|
|
||||||
|
//use Redirect;
|
||||||
|
|
||||||
|
class TicketViewURL
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
// dd(\Input::all(), $request->fullUrl());
|
||||||
|
$request_str = $request->fullUrl();
|
||||||
|
if (preg_match('([^D]=)', $request_str) == 1) {
|
||||||
|
$request_str = str_replace('=', '%5B%5D=', $request_str);
|
||||||
|
$request_str = str_replace('%5B%5D%5B%5D=', '%5B%5D=', $request_str);
|
||||||
|
}
|
||||||
|
if (count(Input::all()) == 0) {
|
||||||
|
return \Redirect::to('tickets?show%5B%5D=inbox&departments%5B%5D=All');
|
||||||
|
} else {
|
||||||
|
if (!array_key_exists('show', Input::all()) && !array_key_exists('departments', Input::all())) {
|
||||||
|
return \Redirect::to($request_str.'&show%5B%5D=inbox&departments%5B%5D=All');
|
||||||
|
} elseif (!array_key_exists('show', Input::all()) && array_key_exists('departments', Input::all())) {
|
||||||
|
return \Redirect::to($request_str.'&show%5B%5D=inbox');
|
||||||
|
} elseif (array_key_exists('show', Input::all()) && !array_key_exists('departments', Input::all())) {
|
||||||
|
return \Redirect::to($request_str.'&departments%5B%5D=All');
|
||||||
|
} else {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
if (preg_match('([^D]=)', $request->fullUrl()) == 1) {
|
||||||
|
return \Redirect::to($request_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -13,8 +13,11 @@ class VerifyCsrfToken extends BaseVerifier
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $except = [
|
protected $except = [
|
||||||
'CheckSerial',
|
|
||||||
'api/v1/*',
|
'api/v1/*',
|
||||||
|
'chunk/upload',
|
||||||
|
'chunk/upload/public',
|
||||||
|
'media/files/public',
|
||||||
|
'media/files',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -31,7 +31,6 @@ class ClientRequest extends Request
|
|||||||
{
|
{
|
||||||
$check = $this->check(new CommonSettings());
|
$check = $this->check(new CommonSettings());
|
||||||
if ($check != 0) {
|
if ($check != 0) {
|
||||||
return $check;
|
|
||||||
$custom_rule = $this->getCustomRule();
|
$custom_rule = $this->getCustomRule();
|
||||||
$rules = array_merge($check, $custom_rule);
|
$rules = array_merge($check, $custom_rule);
|
||||||
|
|
||||||
|
@@ -3,6 +3,8 @@
|
|||||||
namespace App\Http\ViewComposers;
|
namespace App\Http\ViewComposers;
|
||||||
|
|
||||||
use App\Model\helpdesk\Agent\Department;
|
use App\Model\helpdesk\Agent\Department;
|
||||||
|
use App\Model\helpdesk\Email\Emails;
|
||||||
|
use App\Model\helpdesk\Settings\CommonSettings;
|
||||||
use App\Model\helpdesk\Settings\Company;
|
use App\Model\helpdesk\Settings\Company;
|
||||||
use App\Model\helpdesk\Ticket\Tickets;
|
use App\Model\helpdesk\Ticket\Tickets;
|
||||||
use App\User;
|
use App\User;
|
||||||
@@ -28,13 +30,15 @@ class AgentLayout
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(Company $company, User $users, Tickets $tickets, Department $department)
|
public function __construct(Company $company, User $users, Tickets $tickets, Department $department, Emails $emails, CommonSettings $common_settings)
|
||||||
{
|
{
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
$this->auth = Auth::user();
|
$this->auth = Auth::user();
|
||||||
$this->users = $users;
|
$this->users = $users;
|
||||||
$this->tickets = $tickets;
|
$this->tickets = $tickets;
|
||||||
$this->department = $department;
|
$this->department = $department;
|
||||||
|
$this->emails = $emails;
|
||||||
|
$this->common_settings = $common_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,6 +62,8 @@ class AgentLayout
|
|||||||
'department' => $this->departments(),
|
'department' => $this->departments(),
|
||||||
'overdues' => $this->overdues(),
|
'overdues' => $this->overdues(),
|
||||||
'due_today' => $this->getDueToday(),
|
'due_today' => $this->getDueToday(),
|
||||||
|
'is_mail_conigured' => $this->getEmailConfig(),
|
||||||
|
'dummy_installation' => $this->getDummyDataInstallation(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,4 +200,40 @@ class AgentLayout
|
|||||||
->whereRaw('date(duedate) = ?', [date('Y-m-d')]);
|
->whereRaw('date(duedate) = ?', [date('Y-m-d')]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @category function to check configured mails
|
||||||
|
*
|
||||||
|
* @var
|
||||||
|
*
|
||||||
|
* @return bool true/false
|
||||||
|
*/
|
||||||
|
public function getEmailConfig()
|
||||||
|
{
|
||||||
|
$emails = $this->emails->where('sending_status', '=', 1)->where('fetching_status', '=', 1)->count();
|
||||||
|
if ($emails >= 1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @category function to check if dummy data is installed in the system or not
|
||||||
|
*
|
||||||
|
* @param null
|
||||||
|
*
|
||||||
|
* @return builder
|
||||||
|
*/
|
||||||
|
public function getDummyDataInstallation()
|
||||||
|
{
|
||||||
|
$return_collection = $this->common_settings->select('status')->where('option_name', '=', 'dummy_data_installation')->first();
|
||||||
|
if (!$return_collection) {
|
||||||
|
$return_collection = collect(['status' => 0]);
|
||||||
|
|
||||||
|
return $return_collection['status'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return_collection->status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
26
app/Http/ViewComposers/UserLanguage.php
Normal file
26
app/Http/ViewComposers/UserLanguage.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\ViewComposers;
|
||||||
|
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class UserLanguage
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function compose(View $view)
|
||||||
|
{
|
||||||
|
$path = base_path().DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'lang';
|
||||||
|
$langs = scandir($path);
|
||||||
|
$langs = array_diff($langs, ['.', '..']);
|
||||||
|
$languages = [];
|
||||||
|
foreach ($langs as $lang) {
|
||||||
|
$languages[$lang] = \Config::get('languages.'.$lang);
|
||||||
|
}
|
||||||
|
$view->with([
|
||||||
|
'langs' => $languages,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
@@ -146,3 +146,79 @@ function faveotime($date, $hour = 0, $min = 0, $sec = 0)
|
|||||||
|
|
||||||
return $date1->hour($hour)->minute($min)->second($sec);
|
return $date1->hour($hour)->minute($min)->second($sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @category function to return array values if status id
|
||||||
|
*
|
||||||
|
* @param string purpose of status
|
||||||
|
*
|
||||||
|
* @return array ids of status with purpose passed as string
|
||||||
|
*/
|
||||||
|
function getStatusArray($status)
|
||||||
|
{
|
||||||
|
$type = new App\Model\helpdesk\Ticket\Ticket_Status();
|
||||||
|
$values = $type->where('state', '=', $status)->pluck('id')->toArray();
|
||||||
|
|
||||||
|
return $values;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @category function to UTF encoding
|
||||||
|
*
|
||||||
|
* @param string name
|
||||||
|
*
|
||||||
|
* @return string name
|
||||||
|
*/
|
||||||
|
function utfEncoding($name)
|
||||||
|
{
|
||||||
|
$title = '';
|
||||||
|
$array = imap_mime_header_decode($name);
|
||||||
|
if (is_array($array) && count($array) > 0) {
|
||||||
|
foreach ($array as $text) {
|
||||||
|
$title .= $text->text;
|
||||||
|
}
|
||||||
|
$name = $title;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
function faveoDate($date = '', $format = '', $tz = '')
|
||||||
|
{
|
||||||
|
if (!$date) {
|
||||||
|
$date = \Carbon\Carbon::now();
|
||||||
|
}
|
||||||
|
if (!is_object($date)) {
|
||||||
|
$date = carbon($date);
|
||||||
|
}
|
||||||
|
if (!$format || !$tz) {
|
||||||
|
$system = App\Model\helpdesk\Settings\System::select('time_zone', 'date_time_format')->first();
|
||||||
|
}
|
||||||
|
if (!$format) {
|
||||||
|
$format = $system->date_time_format;
|
||||||
|
}
|
||||||
|
if (!$tz) {
|
||||||
|
$tz = $system->time_zone;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ($format == 'human-read') {
|
||||||
|
return $date->tz($tz)->diffForHumans();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $date->tz($tz)->format($format);
|
||||||
|
} catch (\Exception $ex) {
|
||||||
|
return 'invalid';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function timezone()
|
||||||
|
{
|
||||||
|
$system = App\Model\helpdesk\Settings\System::select('time_zone')->first();
|
||||||
|
$tz = 'UTC';
|
||||||
|
if ($system) {
|
||||||
|
$tz = App\Model\helpdesk\Utility\Timezones::where('id', $system->time_zone)->first()->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $tz;
|
||||||
|
}
|
||||||
|
@@ -1,841 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Application Routes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here is where you can register all of the routes for an application.
|
|
||||||
| It's a breeze. Simply tell Laravel the URIs it should respond to
|
|
||||||
| and give it the controller to call when that URI is requested.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
Route::group(['middleware' => ['web']], function () {
|
|
||||||
Route::group(['middleware' => 'update', 'middleware' => 'install'], function () {
|
|
||||||
Route::controllers([
|
|
||||||
'auth' => 'Auth\AuthController',
|
|
||||||
'password' => 'Auth\PasswordController',
|
|
||||||
]);
|
|
||||||
Route::get('social/login/redirect/{provider}/{redirect?}', ['uses' => 'Auth\AuthController@redirectToProvider', 'as' => 'social.login']);
|
|
||||||
Route::get('social/login/{provider}', ['as'=>'social.login.callback', 'uses'=>'Auth\AuthController@handleProviderCallback']);
|
|
||||||
Route::get('social-sync', ['as'=>'social.sync', 'uses'=>'Client\helpdesk\GuestController@sync']);
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
|
||||||
|-------------------------------------------------------------------------------
|
|
||||||
| @Anjali
|
|
||||||
|-------------------------------------------------------------------------------
|
|
||||||
| Here is defining entire routes for the Admin Panel
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
Route::get('password/email/{one?}/{two?}/{three?}/{four?}/{five?}', ['as' => 'password.email', 'uses' => 'Auth\PasswordController@getEmail']);
|
|
||||||
Breadcrumbs::register('password.email', function ($breadcrumbs) {
|
|
||||||
$breadcrumbs->parent('/');
|
|
||||||
$breadcrumbs->push('Login', url('auth/login'));
|
|
||||||
$breadcrumbs->push('Forgot Password', url('password/email'));
|
|
||||||
});
|
|
||||||
|
|
||||||
// register page
|
|
||||||
Route::get('auth/register/{one?}/{two?}/{three?}/{four?}/{five?}', ['as' => 'auth.register', 'uses' => 'Auth\AuthController@getRegister']);
|
|
||||||
Breadcrumbs::register('auth.register', function ($breadcrumbs) {
|
|
||||||
$breadcrumbs->parent('/');
|
|
||||||
$breadcrumbs->push('Login', url('auth/login'));
|
|
||||||
$breadcrumbs->push('Create Account', url('auth/register'));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Auth login
|
|
||||||
Route::get('auth/login/{one?}/{two?}/{three?}/{four?}/{five?}', ['as' => 'auth.login', 'uses' => 'Auth\AuthController@getLogin']);
|
|
||||||
Breadcrumbs::register('auth.login', function ($breadcrumbs) {
|
|
||||||
$breadcrumbs->parent('/');
|
|
||||||
$breadcrumbs->push('Create Account', url('auth/register'));
|
|
||||||
$breadcrumbs->push('Login', url('auth/login'));
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('account/activate/{token}', ['as' => 'account.activate', 'uses' => 'Auth\AuthController@accountActivate']);
|
|
||||||
Route::get('getmail/{token}', 'Auth\AuthController@getMail');
|
|
||||||
Route::get('verify-otp', ['as' => 'otp-verification', 'uses' => 'Auth\AuthController@getVerifyOTP']);
|
|
||||||
Route::post('verify-otp', ['as' => 'otp-verification', 'uses' => 'Auth\AuthController@verifyOTP']);
|
|
||||||
Route::post('resend/opt', ['as' => 'resend-otp', 'uses' => 'Auth\AuthController@resendOTP']);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|-------------------------------------------------------------------------------
|
|
||||||
| Admin Routes
|
|
||||||
|-------------------------------------------------------------------------------
|
|
||||||
| Here is defining entire routes for the Admin Panel
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
Route::group(['middleware' => 'roles', 'middleware' => 'auth', 'middleware' => 'install', 'middleware' => 'update'], function () {
|
|
||||||
//Notification marking
|
|
||||||
Route::post('mark-read/{id}', 'Common\NotificationController@markRead');
|
|
||||||
Route::post('mark-all-read/{id}', 'Common\NotificationController@markAllRead');
|
|
||||||
|
|
||||||
Route::get('notifications-list', ['as' => 'notification.list', 'uses' => 'Common\NotificationController@show']);
|
|
||||||
Route::post('notification-delete/{id}', ['as' => 'notification.delete', 'uses' => 'Common\NotificationController@delete']);
|
|
||||||
Route::get('notifications-list/delete', ['as' => 'notification.delete.all', 'uses' => 'Common\NotificationController@deleteAll']);
|
|
||||||
|
|
||||||
Route::get('settings-notification', ['as' => 'notification.settings', 'uses' => 'Admin\helpdesk\SettingsController@notificationSettings']);
|
|
||||||
Route::get('delete-read-notification', 'Admin\helpdesk\SettingsController@deleteReadNoti');
|
|
||||||
Route::post('delete-notification-log', 'Admin\helpdesk\SettingsController@deleteNotificationLog');
|
|
||||||
// resource is a function to process create,edit,read and delete
|
|
||||||
Route::resource('groups', 'Admin\helpdesk\GroupController'); // for group module, for CRUD
|
|
||||||
|
|
||||||
Route::resource('departments', 'Admin\helpdesk\DepartmentController'); // for departments module, for CRUD
|
|
||||||
|
|
||||||
Route::resource('teams', 'Admin\helpdesk\TeamController'); // in teams module, for CRUD
|
|
||||||
Route::get('/teams/show/{id}', ['as' => 'teams.show', 'uses' => 'Admin\helpdesk\TeamController@show']); /* Get Team View */
|
|
||||||
Breadcrumbs::register('teams.show', function ($breadcrumbs) {
|
|
||||||
$breadcrumbs->parent('teams.index');
|
|
||||||
$breadcrumbs->push(Lang::get('lang.show'), url('teams/{teams}/show'));
|
|
||||||
});
|
|
||||||
Route::get('getshow/{id}', ['as' => 'teams.getshow.list', 'uses' => 'Admin\helpdesk\TeamController@getshow']);
|
|
||||||
Route::resource('agents', 'Admin\helpdesk\AgentController'); // in agents module, for CRUD
|
|
||||||
|
|
||||||
Route::resource('emails', 'Admin\helpdesk\EmailsController'); // in emails module, for CRUD
|
|
||||||
|
|
||||||
Route::resource('banlist', 'Admin\helpdesk\BanlistController'); // in banlist module, for CRUD
|
|
||||||
|
|
||||||
Route::get('banlist/delete/{id}', ['as' => 'banlist.delete', 'uses' => 'Admin\helpdesk\BanlistController@delete']); // in banlist module, for CRUD
|
|
||||||
/*
|
|
||||||
* Templates
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::resource('templates', 'Common\TemplateController');
|
|
||||||
Route::get('get-templates', 'Common\TemplateController@GetTemplates');
|
|
||||||
Route::get('templates-delete', 'Common\TemplateController@destroy');
|
|
||||||
Route::get('testmail/{id}', 'Common\TemplateController@mailtest');
|
|
||||||
Route::resource('template-sets', 'Common\TemplateSetController'); // in template module, for CRUD
|
|
||||||
Route::get('delete-sets/{id}', ['as' => 'sets.delete', 'uses' => 'Common\TemplateSetController@deleteSet']);
|
|
||||||
Route::get('show-template/{id}', ['as' => 'show.templates', 'uses' => 'Common\TemplateController@showTemplate']);
|
|
||||||
Route::get('activate-templateset/{name}', ['as' => 'active.template-set', 'uses' => 'Common\TemplateSetController@activateSet']);
|
|
||||||
Route::resource('template', 'Admin\helpdesk\TemplateController'); // in template module, for CRUD
|
|
||||||
Route::get('list-directories', 'Admin\helpdesk\TemplateController@listdirectories');
|
|
||||||
Route::get('activate-set/{dir}', ['as' => 'active.set', 'uses' => 'Admin\helpdesk\TemplateController@activateset']);
|
|
||||||
Route::get('list-templates/{template}/{directory}', ['as' => 'template.list', 'uses' => 'Admin\helpdesk\TemplateController@listtemplates']);
|
|
||||||
Route::get('read-templates/{template}/{directory}', ['as' => 'template.read', 'uses' => 'Admin\helpdesk\TemplateController@readtemplate']);
|
|
||||||
Route::patch('write-templates/{contents}/{directory}', ['as' => 'template.write', 'uses' => 'Admin\helpdesk\TemplateController@writetemplate']);
|
|
||||||
Route::post('create-templates', ['as' => 'template.createnew', 'uses' => 'Admin\helpdesk\TemplateController@createtemplate']);
|
|
||||||
Route::get('delete-template/{template}/{path}', ['as' => 'templates.delete', 'uses' => 'Admin\helpdesk\TemplateController@deletetemplate']);
|
|
||||||
Route::get('getdiagno', ['as' => 'getdiagno', 'uses' => 'Admin\helpdesk\TemplateController@formDiagno']); // for getting form for diagnostic
|
|
||||||
|
|
||||||
Route::post('postdiagno', ['as' => 'postdiagno', 'uses' => 'Admin\helpdesk\TemplateController@postDiagno']); // for getting form for diagnostic
|
|
||||||
Route::resource('helptopic', 'Admin\helpdesk\HelptopicController'); // in helptopics module, for CRUD
|
|
||||||
|
|
||||||
Route::resource('sla', 'Admin\helpdesk\SlaController'); // in SLA Plan module, for CRUD
|
|
||||||
|
|
||||||
Route::resource('forms', 'Admin\helpdesk\FormController');
|
|
||||||
Route::get('forms/add-child/{formid}', ['as' => 'forms.add.child', 'uses' => 'Admin\helpdesk\FormController@addChildForm']);
|
|
||||||
Route::post('forms/field/{fieldid}/child', [
|
|
||||||
'as' => 'forms.field.child',
|
|
||||||
'uses' => 'Admin\helpdesk\FormController@addChild',
|
|
||||||
]);
|
|
||||||
Route::get('forms/render/child', [
|
|
||||||
'as' => 'forms.field.child',
|
|
||||||
'uses' => 'Admin\helpdesk\FormController@renderChild',
|
|
||||||
]);
|
|
||||||
|
|
||||||
Route::get('delete-forms/{id}', ['as' => 'forms.delete', 'uses' => 'Admin\helpdesk\FormController@delete']);
|
|
||||||
//$router->model('id','getcompany');
|
|
||||||
Route::get('job-scheduler', ['as' => 'get.job.scheder', 'uses' => 'Admin\helpdesk\SettingsController@getSchedular']); //to get ob scheduler form page
|
|
||||||
|
|
||||||
Route::patch('post-scheduler', ['as' => 'post.job.scheduler', 'uses' => 'Admin\helpdesk\SettingsController@postSchedular']); //to update job scheduler
|
|
||||||
Route::get('agent-profile-page/{id}', ['as' => 'agent.profile.page', 'uses' => 'Admin\helpdesk\AgentController@agent_profile']);
|
|
||||||
Route::get('getcompany', ['as' => 'getcompany', 'uses' => 'Admin\helpdesk\SettingsController@getcompany']); // direct to company setting page
|
|
||||||
|
|
||||||
Route::patch('postcompany/{id}', 'Admin\helpdesk\SettingsController@postcompany'); // Updating the Company table with requests
|
|
||||||
Route::get('delete-logo', ['as' => 'delete.logo', 'uses' => 'Admin\helpdesk\SettingsController@deleteLogo']); // deleting a logo
|
|
||||||
Route::get('getsystem', ['as' => 'getsystem', 'uses' => 'Admin\helpdesk\SettingsController@getsystem']); // direct to system setting page
|
|
||||||
|
|
||||||
Route::patch('postsystem/{id}', 'Admin\helpdesk\SettingsController@postsystem'); // Updating the System table with requests
|
|
||||||
Route::get('getticket', ['as' => 'getticket', 'uses' => 'Admin\helpdesk\SettingsController@getticket']); // direct to ticket setting page
|
|
||||||
|
|
||||||
Route::patch('postticket/{id}', 'Admin\helpdesk\SettingsController@postticket'); // Updating the Ticket table with requests
|
|
||||||
Route::get('getemail', ['as' => 'getemail', 'uses' => 'Admin\helpdesk\SettingsController@getemail']); // direct to email setting page
|
|
||||||
|
|
||||||
Route::get('ticket/tooltip', ['as'=>'ticket.tooltip', 'uses'=>'Agent\helpdesk\TicketController@getTooltip']);
|
|
||||||
|
|
||||||
Route::patch('postemail/{id}', 'Admin\helpdesk\SettingsController@postemail'); // Updating the Email table with requests
|
|
||||||
// Route::get('getaccess', 'Admin\helpdesk\SettingsController@getaccess'); // direct to access setting page
|
|
||||||
// Route::patch('postaccess/{id}', 'Admin\helpdesk\SettingsController@postaccess'); // Updating the Access table with requests
|
|
||||||
Route::get('getresponder', ['as' => 'getresponder', 'uses' => 'Admin\helpdesk\SettingsController@getresponder']); // direct to responder setting page
|
|
||||||
|
|
||||||
Route::patch('postresponder/{id}', 'Admin\helpdesk\SettingsController@postresponder'); // Updating the Responder table with requests
|
|
||||||
Route::get('getalert', ['as' => 'getalert', 'uses' => 'Admin\helpdesk\SettingsController@getalert']); // direct to alert setting page
|
|
||||||
|
|
||||||
Route::patch('postalert/{id}', 'Admin\helpdesk\SettingsController@postalert'); // Updating the Alert table with requests
|
|
||||||
// Templates
|
|
||||||
|
|
||||||
Route::get('security', ['as' => 'security.index', 'uses' => 'Admin\helpdesk\SecurityController@index']); // direct to security setting page
|
|
||||||
Route::resource('close-workflow', 'Admin\helpdesk\CloseWrokflowController'); // direct to security setting page
|
|
||||||
|
|
||||||
Route::resource('close-workflow', 'Admin\helpdesk\CloseWrokflowController'); // direct to security setting page
|
|
||||||
Route::patch('security/{id}', ['as' => 'securitys.update', 'uses' => 'Admin\helpdesk\SecurityController@update']); // direct to security setting page
|
|
||||||
Route::get('setting-status', ['as' => 'statuss.index', 'uses' => 'Admin\helpdesk\SettingsController@getStatuses']); // direct to status setting page
|
|
||||||
|
|
||||||
Route::patch('status-update/{id}', ['as' => 'statuss.update', 'uses' => 'Admin\helpdesk\SettingsController@editStatuses']);
|
|
||||||
|
|
||||||
Route::get('status/edit/{id}', ['as' => 'status.edit', 'uses' => 'Admin\helpdesk\SettingsController@getEditStatuses']);
|
|
||||||
Route::post('status-create', ['as' => 'statuss.create', 'uses' => 'Admin\helpdesk\SettingsController@createStatuses']);
|
|
||||||
Route::get('status-delete/{id}', ['as' => 'statuss.delete', 'uses' => 'Admin\helpdesk\SettingsController@deleteStatuses']);
|
|
||||||
Route::get('ticket/status/{id}/{state}', ['as' => 'statuss.state', 'uses' => 'Agent\helpdesk\TicketController@updateStatuses']);
|
|
||||||
Route::get('getratings', ['as' => 'ratings.index', 'uses' => 'Admin\helpdesk\SettingsController@RatingSettings']);
|
|
||||||
|
|
||||||
Route::get('deleter/{rating}', ['as' => 'ratings.delete', 'uses' => 'Admin\helpdesk\SettingsController@RatingDelete']);
|
|
||||||
|
|
||||||
Route::get('create-ratings', ['as' => 'rating.create', 'uses' => 'Admin\helpdesk\SettingsController@createRating']);
|
|
||||||
Route::post('store-ratings', ['as' => 'rating.store', 'uses' => 'Admin\helpdesk\SettingsController@storeRating']);
|
|
||||||
|
|
||||||
Route::get('editratings/{slug}', ['as' => 'rating.edit', 'uses' => 'Admin\helpdesk\SettingsController@editRatingSettings']);
|
|
||||||
Route::patch('postratings/{slug}', ['as' => 'settings.rating', 'uses' => 'Admin\helpdesk\SettingsController@PostRatingSettings']);
|
|
||||||
Route::get('remove-user-org/{id}', ['as' => 'removeuser.org', 'uses' => 'Agent\helpdesk\UserController@removeUserOrg']);
|
|
||||||
Route::get('admin-profile', ['as' => 'admin-profile', 'uses' => 'Admin\helpdesk\ProfileController@getProfile']); /* User profile edit get */
|
|
||||||
|
|
||||||
Route::get('admin-profile-edit', 'Admin\helpdesk\ProfileController@getProfileedit'); /* Admin profile get */
|
|
||||||
Route::patch('admin-profile', 'Admin\helpdesk\ProfileController@postProfileedit'); /* Admin Profile Post */
|
|
||||||
Route::patch('admin-profile-password', 'Admin\helpdesk\ProfileController@postProfilePassword'); /* Admin Profile Password Post */
|
|
||||||
Route::get('widgets', ['as' => 'widgets', 'uses' => 'Common\SettingsController@widgets']); /* get the create footer page for admin */
|
|
||||||
|
|
||||||
Route::get('list-widget', 'Common\SettingsController@list_widget'); /* get the list widget page for admin */
|
|
||||||
Route::post('edit-widget/{id}', 'Common\SettingsController@edit_widget'); /* get the create footer page for admin */
|
|
||||||
Route::get('social-buttons', ['as' => 'social.buttons', 'uses' => 'Common\SettingsController@social_buttons']); /* get the create footer page for admin */
|
|
||||||
|
|
||||||
Route::get('list-social-buttons', ['as' => 'list.social.buttons', 'uses' => 'Common\SettingsController@list_social_buttons']); /* get the list widget page for admin */
|
|
||||||
Route::post('edit-widget/{id}', 'Common\SettingsController@edit_social_buttons'); /* get the create footer page for admin */
|
|
||||||
Route::get('version-check', ['as' => 'version-check', 'uses' => 'Common\SettingsController@version_check']); /* Check version */
|
|
||||||
Route::post('post-version-check', ['as' => 'post-version-check', 'uses' => 'Common\SettingsController@post_version_check']); /* post Check version */
|
|
||||||
Route::get('admin', ['as' => 'setting', 'uses' => 'Admin\helpdesk\SettingsController@settings']);
|
|
||||||
|
|
||||||
Route::get('plugins', ['as' => 'plugins', 'uses' => 'Common\SettingsController@Plugins']);
|
|
||||||
|
|
||||||
Route::get('getplugin', ['as' => 'get.plugin', 'uses' => 'Common\SettingsController@GetPlugin']);
|
|
||||||
Route::post('post-plugin', ['as' => 'post.plugin', 'uses' => 'Common\SettingsController@PostPlugins']);
|
|
||||||
Route::get('getconfig', ['as' => 'get.config', 'uses' => 'Common\SettingsController@fetchConfig']);
|
|
||||||
Route::get('plugin/delete/{slug}', ['as' => 'delete.plugin', 'uses' => 'Common\SettingsController@DeletePlugin']);
|
|
||||||
Route::get('plugin/status/{slug}', ['as' => 'status.plugin', 'uses' => 'Common\SettingsController@StatusPlugin']);
|
|
||||||
//Routes for showing language table and switching language
|
|
||||||
Route::get('languages', ['as' => 'LanguageController', 'uses' => 'Admin\helpdesk\LanguageController@index']);
|
|
||||||
|
|
||||||
Route::get('get-languages', ['as' => 'getAllLanguages', 'uses' => 'Admin\helpdesk\LanguageController@getLanguages']);
|
|
||||||
Route::get('change-language/{lang}', ['as' => 'lang.switch', 'uses' => 'Admin\helpdesk\LanguageController@switchLanguage']);
|
|
||||||
//Route for download language template package
|
|
||||||
Route::get('/download-template', ['as' => 'download', 'uses' => 'Admin\helpdesk\LanguageController@download']);
|
|
||||||
//Routes for language file upload form-----------You may want to use csrf protection for these route--------------
|
|
||||||
Route::post('language/add', 'Admin\helpdesk\LanguageController@postForm');
|
|
||||||
Route::get('language/add', ['as' => 'add-language', 'uses' => 'Admin\helpdesk\LanguageController@getForm']);
|
|
||||||
|
|
||||||
//Routes for delete language package
|
|
||||||
Route::get('delete-language/{lang}', ['as' => 'lang.delete', 'uses' => 'Admin\helpdesk\LanguageController@deleteLanguage']);
|
|
||||||
Route::get('generate-api-key', 'Admin\helpdesk\SettingsController@GenerateApiKey'); // route to generate api key
|
|
||||||
Route::post('validating-email-settings', ['as' => 'validating.email.settings', 'uses' => 'Admin\helpdesk\EmailsController@validatingEmailSettings']); // route to check email input validation
|
|
||||||
Route::post('validating-email-settings-on-update/{id}', ['as' => 'validating.email.settings.update', 'uses' => 'Admin\helpdesk\EmailsController@validatingEmailSettingsUpdate']); // route to check email input validation
|
|
||||||
Route::get('workflow', ['as' => 'workflow', 'uses' => 'Admin\helpdesk\WorkflowController@index']);
|
|
||||||
|
|
||||||
Route::get('workflow-list', ['as' => 'workflow.list', 'uses' => 'Admin\helpdesk\WorkflowController@workFlowList']);
|
|
||||||
Route::get('workflow/create', ['as' => 'workflow.create', 'uses' => 'Admin\helpdesk\WorkflowController@create']);
|
|
||||||
|
|
||||||
Route::post('workflow/store', ['as' => 'workflow.store', 'uses' => 'Admin\helpdesk\WorkflowController@store']);
|
|
||||||
Route::get('workflow/edit/{id}', ['as' => 'workflow.edit', 'uses' => 'Admin\helpdesk\WorkflowController@edit']);
|
|
||||||
|
|
||||||
Route::post('workflow/update/{id}', ['as' => 'workflow.update', 'uses' => 'Admin\helpdesk\WorkflowController@update']);
|
|
||||||
Route::get('workflow/action-rule/{id}', ['as' => 'workflow.dept', 'uses' => 'Admin\helpdesk\WorkflowController@selectAction']);
|
|
||||||
Route::get('workflow/delete/{id}', ['as' => 'workflow.delete', 'uses' => 'Admin\helpdesk\WorkflowController@destroy']);
|
|
||||||
/*
|
|
||||||
* Api Settings
|
|
||||||
*/
|
|
||||||
Route::get('api', ['as' => 'api.settings.get', 'uses' => 'Common\ApiSettings@show']);
|
|
||||||
|
|
||||||
Route::post('api', ['as' => 'api.settings.post', 'uses' => 'Common\ApiSettings@postSettings']);
|
|
||||||
/*
|
|
||||||
* Error and debugging
|
|
||||||
*/
|
|
||||||
//route for showing error and debugging setting form page
|
|
||||||
Route::get('error-and-debugging-options', ['as' => 'err.debug.settings', 'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@showSettings']);
|
|
||||||
|
|
||||||
//route for submit error and debugging setting form page
|
|
||||||
Route::post('post-settings', ['as' => 'post.error.debug.settings',
|
|
||||||
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@postSettings', ]);
|
|
||||||
//route to error logs table page
|
|
||||||
Route::get('show-error-logs', [
|
|
||||||
'as' => 'error.logs',
|
|
||||||
'uses' => 'Admin\helpdesk\ErrorAndDebuggingController@showErrorLogs',
|
|
||||||
]);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Approval
|
|
||||||
*/
|
|
||||||
Route::get('approval/settings', ['as' => 'approval.settings', 'uses' => 'Agent\helpdesk\TicketController@settingsApproval']);
|
|
||||||
Route::post('settingsUpdateApproval/settings', ['as' => 'settingsUpdateApproval.settings', 'uses' => 'Agent\helpdesk\TicketController@settingsUpdateApproval']);
|
|
||||||
|
|
||||||
Route::get('/ticket/approval/closed', ['as' => 'closed.approvel.ticket', 'uses' => 'Agent\helpdesk\TicketController@approverClosedTicketList']); /* Get Closed Ticket */
|
|
||||||
|
|
||||||
Route::get('/ticket/get-approval', ['as' => 'get.approval.ticket', 'uses' => 'Agent\helpdesk\TicketController@getApproval']); /* Get tickets in datatable */
|
|
||||||
Route::get('/ticket/close/get-approval/{id}', ['as' => 'get.close.approval.ticket', 'uses' => 'Agent\helpdesk\TicketController@getCloseapproval']); /* Get tickets in datatable */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Labels
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::resource('labels', 'Admin\helpdesk\Label\LabelController');
|
|
||||||
Route::get('labels-ajax', ['as'=>'labels.ajax', 'uses'=>'Admin\helpdesk\Label\LabelController@ajaxTable']);
|
|
||||||
Route::get('labels/delete/{id}', ['as' => 'labels.destroy', 'uses' => 'Admin\helpdesk\Label\LabelController@destroy']);
|
|
||||||
});
|
|
||||||
/*
|
|
||||||
|------------------------------------------------------------------
|
|
||||||
|Agent Routes
|
|
||||||
|--------------------------------------------------------------------
|
|
||||||
| Here defining entire Agent Panel routers
|
|
||||||
|
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
Route::group(['middleware' => 'role.agent', 'middleware' => 'auth', 'middleware' => 'install', 'middleware' => 'update'], function () {
|
|
||||||
Route::post('chart-range/{date1}/{date2}', ['as' => 'post.chart', 'uses' => 'Agent\helpdesk\DashboardController@ChartData']);
|
|
||||||
Route::get('agen1', 'Agent\helpdesk\DashboardController@ChartData');
|
|
||||||
Route::post('chart-range', ['as' => 'post.chart', 'uses' => 'Agent\helpdesk\DashboardController@ChartData']);
|
|
||||||
Route::post('user-chart-range/{id}/{date1}/{date2}', ['as' => 'post.user.chart', 'uses' => 'Agent\helpdesk\DashboardController@userChartData']);
|
|
||||||
Route::get('user-agen/{id}', 'Agent\helpdesk\DashboardController@userChartData');
|
|
||||||
Route::get('user-agen1', 'Agent\helpdesk\DashboardController@userChartData');
|
|
||||||
Route::post('user-chart-range', ['as' => 'post.user.chart', 'uses' => 'Agent\helpdesk\DashboardController@userChartData']);
|
|
||||||
Route::resource('user', 'Agent\helpdesk\UserController'); /* User router is used to control the CRUD of user */
|
|
||||||
Route::get('user-export', ['as' => 'user.export', 'uses' => 'Agent\helpdesk\UserController@getExportUser']); /* User router is used to control the CRUD of user */
|
|
||||||
Route::post('user-export', ['as' => 'user.export.post', 'uses' => 'Agent\helpdesk\UserController@exportUser']); /* User router is used to control the CRUD of user */
|
|
||||||
|
|
||||||
Route::get('user-list', ['as' => 'user.list', 'uses' => 'Agent\helpdesk\UserController@user_list']);
|
|
||||||
|
|
||||||
// Route::get('user/delete/{id}', ['as' => 'user.delete' , 'uses' => 'Agent\helpdesk\UserController@destroy']);
|
|
||||||
Route::resource('organizations', 'Agent\helpdesk\OrganizationController'); /* organization router used to deal CRUD function of organization */
|
|
||||||
Route::get('get-organization', ['as' => 'org.get.ajax', 'uses' => 'Agent\helpdesk\OrganizationController@getOrgAjax']);
|
|
||||||
|
|
||||||
Route::get('org-list', ['as' => 'org.list', 'uses' => 'Agent\helpdesk\OrganizationController@org_list']);
|
|
||||||
Route::get('organization-autofill', ['as' => 'post.organization.autofill', 'uses' => 'Agent\helpdesk\OrganizationController@organizationAutofill']); //auto fill organization name
|
|
||||||
Route::get('org/delete/{id}', ['as' => 'org.delete', 'uses' => 'Agent\helpdesk\OrganizationController@destroy']);
|
|
||||||
Route::get('org-chart/{id}', 'Agent\helpdesk\OrganizationController@orgChartData');
|
|
||||||
// Route::post('org-chart-range', ['as' => 'post.org.chart', 'uses' => 'Agent\helpdesk\OrganizationController@orgChartData']);
|
|
||||||
Route::post('org-chart-range/{id}/{date1}/{date2}', ['as' => 'post.org.chart', 'uses' => 'Agent\helpdesk\OrganizationController@orgChartData']);
|
|
||||||
Route::get('profile', ['as' => 'profile', 'uses' => 'Agent\helpdesk\UserController@getProfile']); /* User profile get */
|
|
||||||
|
|
||||||
Route::get('profile-edit', ['as' => 'agent-profile-edit', 'uses' => 'Agent\helpdesk\UserController@getProfileedit']); /* User profile edit get */
|
|
||||||
|
|
||||||
Route::post('verify-number', ['as' => 'agent-verify-number', 'uses' => 'Agent\helpdesk\UserController@resendOTP']);
|
|
||||||
Route::post('verify-number2', ['as' => 'post-agent-verify-number', 'uses' => 'Agent\helpdesk\UserController@verifyOTP']);
|
|
||||||
|
|
||||||
Route::patch('agent-profile', ['as' => 'agent-profile', 'uses' => 'Agent\helpdesk\UserController@postProfileedit']); /* User Profile Post */
|
|
||||||
Route::patch('agent-profile-password/{id}', 'Agent\helpdesk\UserController@postProfilePassword'); /* Profile Password Post */
|
|
||||||
Route::get('canned/list', ['as' => 'canned.list', 'uses' => 'Agent\helpdesk\CannedController@index']); /* Canned list */
|
|
||||||
|
|
||||||
Route::get('canned/create', ['as' => 'canned.create', 'uses' => 'Agent\helpdesk\CannedController@create']); /* Canned create */
|
|
||||||
|
|
||||||
Route::patch('canned/store', ['as' => 'canned.store', 'uses' => 'Agent\helpdesk\CannedController@store']); /* Canned store */
|
|
||||||
Route::get('canned/edit/{id}', ['as' => 'canned.edit', 'uses' => 'Agent\helpdesk\CannedController@edit']); /* Canned edit */
|
|
||||||
|
|
||||||
Route::patch('canned/update/{id}', ['as' => 'canned.update', 'uses' => 'Agent\helpdesk\CannedController@update']); /* Canned update */
|
|
||||||
Route::get('canned/show/{id}', ['as' => 'canned.show', 'uses' => 'Agent\helpdesk\CannedController@show']); /* Canned show */
|
|
||||||
Route::delete('canned/destroy/{id}', ['as' => 'canned.destroy', 'uses' => 'Agent\helpdesk\CannedController@destroy']); /* Canned delete */
|
|
||||||
Route::get('/test', ['as' => 'thr', 'uses' => 'Agent\helpdesk\MailController@fetchdata']); /* Fetch Emails */
|
|
||||||
Route::get('/ticket', ['as' => 'ticket', 'uses' => 'Agent\helpdesk\TicketController@ticket_list']); /* Get Ticket */
|
|
||||||
Route::get('/ticket/inbox', ['as' => 'inbox.ticket', 'uses' => 'Agent\helpdesk\TicketController@inbox_ticket_list']); /* Get Inbox Ticket */
|
|
||||||
|
|
||||||
Route::get('/ticket/get-inbox', ['as' => 'get.inbox.ticket', 'uses' => 'Agent\helpdesk\TicketController@get_inbox']); /* Get tickets in datatable */
|
|
||||||
Route::get('/ticket/open', ['as' => 'open.ticket', 'uses' => 'Agent\helpdesk\TicketController@open_ticket_list']); /* Get Open Ticket */
|
|
||||||
|
|
||||||
Route::get('/ticket/get-open', ['as' => 'get.open.ticket', 'uses' => 'Agent\helpdesk\TicketController@get_open']); /* Get tickets in datatable */
|
|
||||||
Route::get('/ticket/answered', ['as' => 'answered.ticket', 'uses' => 'Agent\helpdesk\TicketController@answered_ticket_list']); /* Get Answered Ticket */
|
|
||||||
|
|
||||||
Route::get('/ticket/get-answered', ['as' => 'get.answered.ticket', 'uses' => 'Agent\helpdesk\TicketController@get_answered']); /* Get tickets in datatable */
|
|
||||||
Route::get('/ticket/myticket', ['as' => 'myticket.ticket', 'uses' => 'Agent\helpdesk\TicketController@myticket_ticket_list']); /* Get Tickets Assigned to logged user */
|
|
||||||
|
|
||||||
Route::get('/ticket/get-myticket', ['as' => 'get.myticket.ticket', 'uses' => 'Agent\helpdesk\TicketController@get_myticket']); /* Get tickets in datatable */
|
|
||||||
Route::get('/ticket/overdue', ['as' => 'overdue.ticket', 'uses' => 'Agent\helpdesk\TicketController@overdue_ticket_list']); /* Get Overdue Ticket */
|
|
||||||
|
|
||||||
Route::get('/ticket/get-overdue', ['as' => 'get.overdue.ticket', 'uses' => 'Agent\helpdesk\TicketController@getOverdueTickets']); /* Get Overdue Ticket */
|
|
||||||
Route::get('/ticket/closed', ['as' => 'closed.ticket', 'uses' => 'Agent\helpdesk\TicketController@closed_ticket_list']); /* Get Closed Ticket */
|
|
||||||
|
|
||||||
Route::get('/ticket/get-closed', ['as' => 'get.closed.ticket', 'uses' => 'Agent\helpdesk\TicketController@get_closed']); /* Get tickets in datatable */
|
|
||||||
Route::get('/ticket/assigned', ['as' => 'assigned.ticket', 'uses' => 'Agent\helpdesk\TicketController@assigned_ticket_list']); /* Get Assigned Ticket */
|
|
||||||
|
|
||||||
Route::get('/ticket/get-assigned', ['as' => 'get.assigned.ticket', 'uses' => 'Agent\helpdesk\TicketController@get_assigned']); /* Get tickets in datatable */
|
|
||||||
Route::get('/newticket', ['as' => 'newticket', 'uses' => 'Agent\helpdesk\TicketController@newticket']); /* Get Create New Ticket */
|
|
||||||
|
|
||||||
Route::get('/newticket/autofill', ['as' => 'post.newticket.autofill', 'uses' => 'Agent\helpdesk\TicketController@autofill']);
|
|
||||||
|
|
||||||
Route::post('/newticket/post', ['as' => 'post.newticket', 'uses' => 'Agent\helpdesk\TicketController@post_newticket']); /* Post Create New Ticket */
|
|
||||||
Route::get('/thread/{id}', ['as' => 'ticket.thread', 'uses' => 'Agent\helpdesk\TicketController@thread']); /* Get Thread by ID */
|
|
||||||
|
|
||||||
Route::post('/thread/reply/{id}', ['as' => 'ticket.reply', 'uses' => 'Agent\helpdesk\TicketController@reply']); /* Patch Thread Reply */
|
|
||||||
Route::patch('/internal/note/{id}', ['as' => 'Internal.note', 'uses' => 'Agent\helpdesk\TicketController@InternalNote']); /* Patch Internal Note */
|
|
||||||
Route::patch('/ticket/assign/{id}', ['as' => 'assign.ticket', 'uses' => 'Agent\helpdesk\TicketController@assign']); /* Patch Ticket assigned to whom */
|
|
||||||
Route::patch('/ticket/post/edit/{id}', ['as' => 'ticket.post.edit', 'uses' => 'Agent\helpdesk\TicketController@ticketEditPost']); /* Patchi Ticket Edit */
|
|
||||||
Route::get('/ticket/print/{id}', ['as' => 'ticket.print', 'uses' => 'Agent\helpdesk\TicketController@ticket_print']); /* Get Print Ticket */
|
|
||||||
Route::get('/ticket/close/{id}', ['as' => 'ticket.close', 'uses' => 'Agent\helpdesk\TicketController@close']); /* Get Ticket Close */
|
|
||||||
Route::get('/ticket/resolve/{id}', ['as' => 'ticket.resolve', 'uses' => 'Agent\helpdesk\TicketController@resolve']); /* Get ticket Resolve */
|
|
||||||
Route::get('/ticket/open/{id}', ['as' => 'ticket.open', 'uses' => 'Agent\helpdesk\TicketController@open']); /* Get Ticket Open */
|
|
||||||
Route::get('/ticket/delete/{id}', ['as' => 'ticket.delete', 'uses' => 'Agent\helpdesk\TicketController@delete']); /* Get Ticket Delete */
|
|
||||||
Route::get('/email/ban/{id}', ['as' => 'ban.email', 'uses' => 'Agent\helpdesk\TicketController@ban']); /* Get Ban Email */
|
|
||||||
Route::get('/ticket/surrender/{id}', ['as' => 'ticket.surrender', 'uses' => 'Agent\helpdesk\TicketController@surrender']); /* Get Ticket Surrender */
|
|
||||||
Route::get('/aaaa', 'Client\helpdesk\GuestController@ticket_number');
|
|
||||||
Route::get('trash', ['as' => 'get-trash', 'uses' => 'Agent\helpdesk\TicketController@trash']); /* To show Deleted Tickets */
|
|
||||||
|
|
||||||
Route::get('/ticket/trash', ['as' => 'get.trash.ticket', 'uses' => 'Agent\helpdesk\TicketController@get_trash']); /* Get tickets in datatable */
|
|
||||||
Route::get('unassigned', ['as' => 'unassigned', 'uses' => 'Agent\helpdesk\TicketController@unassigned']); /* To show Unassigned Tickets */
|
|
||||||
|
|
||||||
Route::get('/ticket/unassigned', ['as' => 'get.unassigned.ticket', 'uses' => 'Agent\helpdesk\TicketController@get_unassigned']); /* Get tickets in datatable */
|
|
||||||
Route::get('dashboard', ['as' => 'dashboard', 'uses' => 'Agent\helpdesk\DashboardController@index']); /* To show dashboard pages */
|
|
||||||
|
|
||||||
Route::get('agen', 'Agent\helpdesk\DashboardController@ChartData');
|
|
||||||
Route::get('image/{id}', ['as' => 'image', 'uses' => 'Agent\helpdesk\MailController@get_data']); /* get image */
|
|
||||||
Route::get('thread/auto/{id}', 'Agent\helpdesk\TicketController@autosearch');
|
|
||||||
Route::get('auto', 'Agent\helpdesk\TicketController@autosearch2');
|
|
||||||
Route::patch('search-user', 'Agent\helpdesk\TicketController@usersearch');
|
|
||||||
Route::patch('add-user', 'Agent\helpdesk\TicketController@useradd');
|
|
||||||
Route::post('remove-user', 'Agent\helpdesk\TicketController@userremove');
|
|
||||||
Route::post('select_all', ['as' => 'select_all', 'uses' => 'Agent\helpdesk\TicketController@select_all']);
|
|
||||||
Route::post('canned/{id}', 'Agent\helpdesk\CannedController@get_canned');
|
|
||||||
// Route::get('message' , 'MessageController@show');
|
|
||||||
Route::post('lock', ['as' => 'lock', 'uses' => 'Agent\helpdesk\TicketController@lock']);
|
|
||||||
Route::patch('user-org-assign/{id}', ['as' => 'user.assign.org', 'uses' => 'Agent\helpdesk\UserController@UserAssignOrg']);
|
|
||||||
Route::patch('user-org-edit-assign/{id}', ['as' => 'user.editassign.org', 'uses' => 'Agent\helpdesk\UserController@UsereditAssignOrg']);
|
|
||||||
Route::patch('/user-org/{id}', 'Agent\helpdesk\UserController@User_Create_Org');
|
|
||||||
Route::patch('/head-org/{id}', 'Agent\helpdesk\OrganizationController@Head_Org');
|
|
||||||
// Department ticket
|
|
||||||
Route::get('/{dept}/open', ['as' => 'dept.open.ticket', 'uses' => 'Agent\helpdesk\TicketController@deptopen']); // Open
|
|
||||||
Route::get('tickets/{dept}/{status}', ['as' => 'dept.ticket', 'uses' => 'Agent\helpdesk\TicketController@deptTicket']); // Open
|
|
||||||
|
|
||||||
Route::get('/{dept}/assigned', ['as' => 'dept.inprogress.ticket', 'uses' => 'Agent\helpdesk\TicketController@deptinprogress']); // Inprogress
|
|
||||||
|
|
||||||
Route::get('/{dept}/closed', ['as' => 'dept.closed.ticket', 'uses' => 'Agent\helpdesk\TicketController@deptclose']); // Closed
|
|
||||||
|
|
||||||
Route::post('rating/{id}', ['as' => 'ticket.rating', 'uses' => 'Agent\helpdesk\TicketController@rating']); /* Get overall Ratings */
|
|
||||||
Route::post('rating2/{id}', ['as' => 'ticket.rating2', 'uses' => 'Agent\helpdesk\TicketController@ratingReply']); /* Get reply Ratings */
|
|
||||||
// To check and lock tickets
|
|
||||||
Route::get('check/lock/{id}', ['as' => 'lock', 'uses' => 'Agent\helpdesk\TicketController@checkLock']);
|
|
||||||
Route::patch('/change-owner/{id}', ['as' => 'change.owner.ticket', 'uses' => 'Agent\helpdesk\TicketController@changeOwner']); /* change owner */
|
|
||||||
//To merge tickets
|
|
||||||
Route::get('/get-merge-tickets/{id}', ['as' => 'get.merge.tickets', 'uses' => 'Agent\helpdesk\TicketController@getMergeTickets']);
|
|
||||||
Route::get('/check-merge-ticket/{id}', ['as' => 'check.merge.tickets', 'uses' => 'Agent\helpdesk\TicketController@checkMergeTickets']);
|
|
||||||
Route::get('/get-parent-tickets/{id}', ['as' => 'get.parent.ticket', 'uses' => 'Agent\helpdesk\TicketController@getParentTickets']);
|
|
||||||
Route::patch('/merge-tickets/{id}', ['as' => 'merge.tickets', 'uses' => 'Agent\helpdesk\TicketController@mergeTickets']);
|
|
||||||
//To get department tickets data
|
|
||||||
//open tickets of department
|
|
||||||
Route::get('/get-open-tickets/{id}', ['as' => 'get.dept.open', 'uses' => 'Agent\helpdesk\Ticket2Controller@getOpenTickets']);
|
|
||||||
//close tickets of deartment
|
|
||||||
Route::get('/get-closed-tickets/{id}', ['as' => 'get.dept.close', 'uses' => 'Agent\helpdesk\Ticket2Controller@getCloseTickets']);
|
|
||||||
//in progress ticket of department
|
|
||||||
Route::get('/get-under-process-tickets/{id}', ['as' => 'get.dept.inprocess', 'uses' => 'Agent\helpdesk\Ticket2Controller@getInProcessTickets']);
|
|
||||||
|
|
||||||
// route for graphical reporting
|
|
||||||
Route::get('report', ['as' => 'report.index', 'uses' => 'Agent\helpdesk\ReportController@index']); /* To show dashboard pages */
|
|
||||||
|
|
||||||
// default route to get the data for the first time
|
|
||||||
Route::get('help-topic-report', 'Agent\helpdesk\ReportController@chartdataHelptopic');
|
|
||||||
// route to get the data on change
|
|
||||||
Route::post('help-topic-report/{date1}/{date2}/{id}', ['as' => 'report.helptopic', 'uses' => 'Agent\helpdesk\ReportController@chartdataHelptopic']); /* To show dashboard pages */
|
|
||||||
Route::post('help-topic-pdf', ['as' => 'help.topic.pdf', 'uses' => 'Agent\helpdesk\ReportController@helptopicPdf']);
|
|
||||||
// Route to get details of agents
|
|
||||||
Route::post('get-agents', ['as' => 'get-agents', 'uses' => 'Agent\helpdesk\UserController@getAgentDetails']);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Label
|
|
||||||
*/
|
|
||||||
Route::get('labels-ticket', ['as'=>'labels.ticket', 'uses'=>'Admin\helpdesk\Label\LabelController@attachTicket']);
|
|
||||||
Route::get('json-labels', ['as'=>'labels.json', 'uses'=>'Admin\helpdesk\Label\LabelController@getLabel']);
|
|
||||||
Route::get('filter', ['as'=>'filter', 'uses'=>'Agent\helpdesk\Filter\FilterController@getFilter']);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Tags
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::get('add-tag', ['as'=>'tag.add', 'uses'=>'Agent\helpdesk\Filter\TagController@addToFilter']);
|
|
||||||
Route::get('get-tag', ['as'=>'tag.get', 'uses'=>'Agent\helpdesk\Filter\TagController@getTag']);
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Followup tickets
|
|
||||||
*/
|
|
||||||
Route::get('/ticket/followup', ['as' => 'followup.ticket', 'uses' => 'Agent\helpdesk\TicketController@followupTicketList']); // Get Closed Ticket /
|
|
||||||
|
|
||||||
Route::get('/ticket/get-followup', ['as' => 'get.followup.ticket', 'uses' => 'Agent\helpdesk\TicketController@getFollowup']); // Get tickets in datatable /
|
|
||||||
Route::get('/ticket/close/get-approval/{id}', ['as' => 'get.close.approval.ticket', 'uses' => 'Agent\helpdesk\TicketController@getCloseapproval']); // Get tickets in datatable /
|
|
||||||
/*
|
|
||||||
|------------------------------------------------------------------
|
|
||||||
|Guest Routes
|
|
||||||
|--------------------------------------------------------------------
|
|
||||||
| Here defining Guest User's routes
|
|
||||||
|
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
// seasrch
|
|
||||||
// Route::POST('tickets/search/', function () {
|
|
||||||
// $keyword = Illuminate\Support\Str::lower(Input::get('auto'));
|
|
||||||
// $models = App\Model\Ticket\Tickets::where('ticket_number', '=', $keyword)->orderby('ticket_number')->take(10)->skip(0)->get();
|
|
||||||
// $count = count($models);
|
|
||||||
// return Illuminate\Support\Facades\Redirect::back()->with('contents', $models)->with('counts', $count);
|
|
||||||
// });
|
|
||||||
Route::any('getdata', function () {
|
|
||||||
$term = Illuminate\Support\Str::lower(Input::get('term'));
|
|
||||||
$data = Illuminate\Support\Facades\DB::table('tickets')->distinct()->select('ticket_number')->where('ticket_number', 'LIKE', $term.'%')->groupBy('ticket_number')->take(10)->get();
|
|
||||||
foreach ($data as $v) {
|
|
||||||
return [
|
|
||||||
'value' => $v->ticket_number,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::post('postform/{id}', 'Client\helpdesk\FormController@postForm'); /* post the AJAX form for create a ticket by guest user */
|
|
||||||
Route::post('postedform', ['as'=>'client.form.post', 'uses'=>'Client\helpdesk\FormController@postedForm']); /* post the form to store the value */
|
|
||||||
//Route::get('check', 'CheckController@getcheck'); //testing checkbox auto-populate
|
|
||||||
//Route::post('postcheck/{id}', 'CheckController@postcheck');
|
|
||||||
Route::get('get-helptopic-form', 'Client\helpdesk\FormController@getCustomForm');
|
|
||||||
|
|
||||||
Route::get('home', ['as' => 'home', 'uses' => 'Client\helpdesk\WelcomepageController@index']); //guest layout
|
|
||||||
|
|
||||||
Route::get('/', ['as' => '/', 'uses' => 'Client\helpdesk\WelcomepageController@index']);
|
|
||||||
|
|
||||||
Route::get('create-ticket', ['as' => 'form', 'uses' => 'Client\helpdesk\FormController@getForm']); //getform
|
|
||||||
Route::get('mytickets/{id}', ['as' => 'ticketinfo', 'uses' => 'Client\helpdesk\GuestController@singleThread']); //detail ticket information
|
|
||||||
Route::post('checkmyticket', 'Client\helpdesk\UnAuthController@PostCheckTicket'); //ticket ckeck
|
|
||||||
|
|
||||||
Route::get('check_ticket/{id}', ['as' => 'check_ticket', 'uses' => 'Client\helpdesk\GuestController@get_ticket_email']); //detail ticket information
|
|
||||||
|
|
||||||
// show ticket via have a ticket
|
|
||||||
Route::get('show-ticket/{id}/{code}', ['as' => 'show.ticket', 'uses' => 'Client\helpdesk\UnAuthController@showTicketCode']); //detail ticket information
|
|
||||||
|
|
||||||
//testing ckeditor
|
|
||||||
//===================================================================================
|
|
||||||
Route::group(['middleware' => 'role.user', 'middleware' => 'auth'], function () {
|
|
||||||
Route::get('client-profile', ['as' => 'client.profile', 'uses' => 'Client\helpdesk\GuestController@getProfile']); /* User profile get */
|
|
||||||
|
|
||||||
Route::get('mytickets', ['as' => 'ticket2', 'uses' => 'Client\helpdesk\GuestController@getMyticket']);
|
|
||||||
Route::get('myticket/{id}', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestController@thread']); /* Get my tickets */
|
|
||||||
Route::patch('client-profile-edit', 'Client\helpdesk\GuestController@postProfile'); /* User Profile Post */
|
|
||||||
Route::patch('client-profile-password', 'Client\helpdesk\GuestController@postProfilePassword'); /* Profile Password Post */
|
|
||||||
Route::post('post/reply/{id}', ['as' => 'client.reply', 'uses' => 'Client\helpdesk\ClientTicketController@reply']);
|
|
||||||
Route::post('verify-client-number', ['as' => 'client-verify-number', 'uses' => 'Client\helpdesk\GuestController@resendOTP']);
|
|
||||||
|
|
||||||
Route::post('verify-client-number2', ['as' => 'post-client-verify-number', 'uses' => 'Client\helpdesk\GuestController@verifyOTP']);
|
|
||||||
});
|
|
||||||
//====================================================================================
|
|
||||||
Route::get('checkticket', 'Client\helpdesk\ClientTicketController@getCheckTicket'); /* Check your Ticket */
|
|
||||||
Route::get('myticket', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestController@getMyticket']); /* Get my tickets */
|
|
||||||
Route::get('myticket/{id}', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestController@thread']); /* Get my tickets */
|
|
||||||
Route::post('postcheck', 'Client\helpdesk\GuestController@PostCheckTicket'); /* post Check Ticket */
|
|
||||||
Route::get('postcheck', 'Client\helpdesk\GuestController@PostCheckTicket');
|
|
||||||
Route::post('post-ticket-reply/{id}', 'Client\helpdesk\FormController@post_ticket_reply');
|
|
||||||
/*
|
|
||||||
|============================================================
|
|
||||||
| Installer Routes
|
|
||||||
|============================================================
|
|
||||||
| These routes are for installer
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
Route::get('/serial', ['as' => 'serialkey', 'uses' => 'Installer\helpdesk\InstallController@serialkey']);
|
|
||||||
Route::post('/post-serial', ['as' => 'post.serialkey', 'uses' => 'Installer\helpdesk\InstallController@postSerialKeyToFaveo']);
|
|
||||||
Route::post('/CheckSerial', ['as' => 'CheckSerial', 'uses' => 'Installer\helpdesk\InstallController@PostSerialKey']);
|
|
||||||
Route::get('/JavaScript-disabled', ['as' => 'js-disabled', 'uses' => 'Installer\helpdesk\InstallController@jsDisabled']);
|
|
||||||
Route::get('/step1', ['as' => 'licence', 'uses' => 'Installer\helpdesk\InstallController@licence']);
|
|
||||||
Route::post('/step1post', ['as' => 'postlicence', 'uses' => 'Installer\helpdesk\InstallController@licencecheck']);
|
|
||||||
Route::get('/step2', ['as' => 'prerequisites', 'uses' => 'Installer\helpdesk\InstallController@prerequisites']);
|
|
||||||
Route::post('/step2post', ['as' => 'postprerequisites', 'uses' => 'Installer\helpdesk\InstallController@prerequisitescheck']);
|
|
||||||
// Route::get('/step3', ['as' => 'localization', 'uses' => 'Installer\helpdesk\InstallController@localization']);
|
|
||||||
// Route::post('/step3post', ['as' => 'postlocalization', 'uses' => 'Installer\helpdesk\InstallController@localizationcheck']);
|
|
||||||
Route::get('/step3', ['as' => 'configuration', 'uses' => 'Installer\helpdesk\InstallController@configuration']);
|
|
||||||
Route::post('/step4post', ['as' => 'postconfiguration', 'uses' => 'Installer\helpdesk\InstallController@configurationcheck']);
|
|
||||||
Route::get('/step4', ['as' => 'database', 'uses' => 'Installer\helpdesk\InstallController@database']);
|
|
||||||
Route::get('/step5', ['as' => 'account', 'uses' => 'Installer\helpdesk\InstallController@account']);
|
|
||||||
Route::post('/step6post', ['as' => 'postaccount', 'uses' => 'Installer\helpdesk\InstallController@accountcheck']);
|
|
||||||
Route::get('/final', ['as' => 'final', 'uses' => 'Installer\helpdesk\InstallController@finalize']);
|
|
||||||
Route::post('/finalpost', ['as' => 'postfinal', 'uses' => 'Installer\helpdesk\InstallController@finalcheck']);
|
|
||||||
Route::post('/postconnection', ['as' => 'postconnection', 'uses' => 'Installer\helpdesk\InstallController@postconnection']);
|
|
||||||
Route::get('/change-file-permission', ['as' => 'change-permission', 'uses' => 'Installer\helpdesk\InstallController@changeFilePermission']);
|
|
||||||
/*
|
|
||||||
|=============================================================
|
|
||||||
| Cron Job links
|
|
||||||
|=============================================================
|
|
||||||
| These links are for cron job execution
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
Route::get('readmails', ['as' => 'readmails', 'uses' => 'Agent\helpdesk\MailController@readmails']);
|
|
||||||
Route::get('notification', ['as' => 'notification', 'uses' => 'Agent\helpdesk\NotificationController@send_notification']);
|
|
||||||
Route::get('auto-close-tickets', ['as' => 'auto.close', 'uses' => 'Client\helpdesk\UnAuthController@autoCloseTickets']);
|
|
||||||
/*
|
|
||||||
|=============================================================
|
|
||||||
| View all the Routes
|
|
||||||
|=============================================================
|
|
||||||
*/
|
|
||||||
Route::get('/aaa', function () {
|
|
||||||
$routeCollection = Route::getRoutes();
|
|
||||||
echo "<table style='width:100%'>";
|
|
||||||
echo '<tr>';
|
|
||||||
echo "<td width='10%'><h4>HTTP Method</h4></td>";
|
|
||||||
echo "<td width='10%'><h4>Route</h4></td>";
|
|
||||||
echo "<td width='10%'><h4>Url</h4></td>";
|
|
||||||
echo "<td width='80%'><h4>Corresponding Action</h4></td>";
|
|
||||||
echo '</tr>';
|
|
||||||
foreach ($routeCollection as $value) {
|
|
||||||
echo '<tr>';
|
|
||||||
echo '<td>'.$value->getMethods()[0].'</td>';
|
|
||||||
echo '<td>'.$value->getName().'</td>';
|
|
||||||
echo '<td>'.$value->getPath().'</td>';
|
|
||||||
echo '<td>'.$value->getActionName().'</td>';
|
|
||||||
echo '</tr>';
|
|
||||||
}
|
|
||||||
echo '</table>';
|
|
||||||
});
|
|
||||||
/*
|
|
||||||
|=============================================================
|
|
||||||
| Error Routes
|
|
||||||
|=============================================================
|
|
||||||
*/
|
|
||||||
Route::get('500', ['as' => 'error500', function () {
|
|
||||||
return view('errors.500');
|
|
||||||
}]);
|
|
||||||
|
|
||||||
Route::get('404', ['as' => 'error404', function () {
|
|
||||||
return view('errors.404');
|
|
||||||
}]);
|
|
||||||
|
|
||||||
Route::get('error-in-database-connection', ['as' => 'errordb', function () {
|
|
||||||
return view('errors.db');
|
|
||||||
}]);
|
|
||||||
|
|
||||||
Route::get('unauthorized', ['as' => 'unauth', function () {
|
|
||||||
return view('errors.unauth');
|
|
||||||
}]);
|
|
||||||
|
|
||||||
Route::get('board-offline', ['as' => 'board.offline', function () {
|
|
||||||
return view('errors.offline');
|
|
||||||
}]);
|
|
||||||
|
|
||||||
/*
|
|
||||||
|=============================================================
|
|
||||||
| Test mail Routes
|
|
||||||
|=============================================================
|
|
||||||
*/
|
|
||||||
// Route::get('testmail', function () {
|
|
||||||
// $e = 'hello';
|
|
||||||
// Config::set('mail.host', 'smtp.gmail.com');
|
|
||||||
// \Mail::send('errors.report', ['e' => $e], function ($message) {
|
|
||||||
// $message->to('sujitprasad4567@gmail.com', 'sujit prasad')->subject('Error');
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
/* For the crud of catogory */
|
|
||||||
Route::resource('category', 'Agent\kb\CategoryController');
|
|
||||||
|
|
||||||
Route::get('category/delete/{id}', 'Agent\kb\CategoryController@destroy');
|
|
||||||
/* For the crud of article */
|
|
||||||
Route::resource('article', 'Agent\kb\ArticleController');
|
|
||||||
|
|
||||||
Route::get('article/delete/{id}', 'Agent\kb\ArticleController@destroy');
|
|
||||||
/* get settings */
|
|
||||||
Route::get('kb/settings', ['as' => 'settings', 'uses' => 'Agent\kb\SettingsController@settings']);
|
|
||||||
|
|
||||||
/* post settings */
|
|
||||||
Route::patch('postsettings/{id}', 'Agent\kb\SettingsController@postSettings');
|
|
||||||
//Route for administrater to access the comment
|
|
||||||
Route::get('comment', ['as' => 'comment', 'uses' => 'Agent\kb\SettingsController@comment']);
|
|
||||||
|
|
||||||
/* Route to define the comment should Published */
|
|
||||||
Route::get('published/{id}', ['as' => 'published', 'uses' => 'Agent\kb\SettingsController@publish']);
|
|
||||||
/* Route for deleting comments */
|
|
||||||
Route::delete('deleted/{id}', ['as' => 'deleted', 'uses' => 'Agent\kb\SettingsController@delete']);
|
|
||||||
/* Route for Profile */
|
|
||||||
// $router->get('profile', ['as' => 'profile', 'uses' => 'Agent\kb\SettingsController@getProfile']);
|
|
||||||
/* Profile Update */
|
|
||||||
// $router->patch('post-profile', ['as' => 'post-profile', 'uses' =>'Agent\kb\SettingsController@postProfile'] );
|
|
||||||
/* Profile password Update */
|
|
||||||
// $router->patch('post-profile-password/{id}',['as' => 'post-profile-password', 'uses' => 'Agent\kb\SettingsController@postProfilepassword']);
|
|
||||||
/* delete Logo */
|
|
||||||
Route::get('delete-logo/{id}', ['as' => 'delete-logo', 'uses' => 'Agent\kb\SettingsController@deleteLogo']);
|
|
||||||
/* delete Background */
|
|
||||||
Route::get('delete-background/{id}', ['as' => 'delete-background', 'uses' => 'Agent\kb\SettingsController@deleteBackground']);
|
|
||||||
Route::resource('page', 'Agent\kb\PageController');
|
|
||||||
|
|
||||||
Route::get('get-pages', ['as' => 'api.page', 'uses' => 'Agent\kb\PageController@getData']);
|
|
||||||
Route::get('page/delete/{id}', ['as' => 'pagedelete', 'uses' => 'Agent\kb\PageController@destroy']);
|
|
||||||
Route::get('comment/delete/{id}', ['as' => 'commentdelete', 'uses' => 'Agent\kb\SettingsController@delete']);
|
|
||||||
Route::get('get-articles', ['as' => 'api.article', 'uses' => 'Agent\kb\ArticleController@getData']);
|
|
||||||
Route::get('get-categorys', ['as' => 'api.category', 'uses' => 'Agent\kb\CategoryController@getData']);
|
|
||||||
Route::get('get-comment', ['as' => 'api.comment', 'uses' => 'Agent\kb\SettingsController@getData']);
|
|
||||||
|
|
||||||
Route::post('image', 'Agent\kb\SettingsController@image');
|
|
||||||
Route::get('direct', function () {
|
|
||||||
return view('direct');
|
|
||||||
});
|
|
||||||
// Route::get('/',['as'=>'home' , 'uses'=> 'client\kb\UserController@home'] );
|
|
||||||
/* post the comment from show page */
|
|
||||||
Route::post('postcomment/{slug}', ['as' => 'postcomment', 'uses' => 'Client\kb\UserController@postComment']);
|
|
||||||
/* get the article list */
|
|
||||||
|
|
||||||
Route::get('article-list', ['as' => 'article-list', 'uses' => 'Client\kb\UserController@getArticle']);
|
|
||||||
// /* get search values */
|
|
||||||
Route::get('search', ['as' => 'search', 'uses' => 'Client\kb\UserController@search']);
|
|
||||||
|
|
||||||
/* get the selected article */
|
|
||||||
Route::get('show/{slug}', ['as' => 'show', 'uses' => 'Client\kb\UserController@show']);
|
|
||||||
|
|
||||||
Route::get('category-list', ['as' => 'category-list', 'uses' => 'Client\kb\UserController@getCategoryList']);
|
|
||||||
|
|
||||||
/* get the categories with article */
|
|
||||||
Route::get('category-list/{id}', ['as' => 'categorylist', 'uses' => 'Client\kb\UserController@getCategory']);
|
|
||||||
|
|
||||||
Route::post('show/rating/{id}', ['as' => 'show.rating', 'uses' => 'Client\helpdesk\UnAuthController@rating']); /* Get overall Ratings */
|
|
||||||
Route::post('show/rating2/{id}', ['as' => 'show.rating2', 'uses' => 'Client\helpdesk\UnAuthController@ratingReply']); /* Get reply Ratings */
|
|
||||||
Route::get('show/change-status/{status}/{id}', ['as' => 'show.change.status', 'uses' => 'Client\helpdesk\UnAuthController@changeStatus']); /* Get reply Ratings */
|
|
||||||
/* get the home page */
|
|
||||||
Route::get('knowledgebase', ['as' => 'home', 'uses' => 'Client\kb\UserController@home']);
|
|
||||||
/* get the faq value to user */
|
|
||||||
// $router->get('faq',['as'=>'faq' , 'uses'=>'Client\kb\UserController@Faq'] );
|
|
||||||
/* get the cantact page to user */
|
|
||||||
Route::get('contact', ['as' => 'contact', 'uses' => 'Client\kb\UserController@contact']);
|
|
||||||
|
|
||||||
/* post the cantact page to controller */
|
|
||||||
Route::post('post-contact', ['as' => 'post-contact', 'uses' => 'Client\kb\UserController@postContact']);
|
|
||||||
//to get the value for page content
|
|
||||||
Route::get('pages/{name}', ['as' => 'pages', 'uses' => 'Client\kb\UserController@getPage']);
|
|
||||||
|
|
||||||
//profile
|
|
||||||
// $router->get('client-profile',['as' => 'client-profile', 'uses' => 'Client\kb\UserController@clientProfile']);
|
|
||||||
// Route::patch('client-profile-edit',['as' => 'client-profile-edit', 'uses' => 'Client\kb\UserController@postClientProfile']);
|
|
||||||
// Route::patch('client-profile-password/{id}',['as' => 'client-profile-password', 'uses' => 'Client\kb\UserController@postClientProfilePassword']);
|
|
||||||
Route::get('/inbox/data', ['as' => 'api.inbox', 'uses' => 'Agent\helpdesk\TicketController@get_inbox']);
|
|
||||||
// Route::get('/report', 'HomeController@getreport');
|
|
||||||
// Route::get('/reportdata', 'HomeController@pushdata');
|
|
||||||
/*
|
|
||||||
* ================================================================================================
|
|
||||||
* @version v1
|
|
||||||
* @access public
|
|
||||||
* @copyright (c) 2016, Ladybird web solution
|
|
||||||
* @author Vijay Sebastian<vijay.sebastian@ladybirdweb.com>
|
|
||||||
* @name Faveo
|
|
||||||
*/
|
|
||||||
Route::group(['prefix' => 'api/v1'], function () {
|
|
||||||
Route::post('authenticate', 'Api\v1\TokenAuthController@authenticate');
|
|
||||||
Route::get('authenticate/user', 'Api\v1\TokenAuthController@getAuthenticatedUser');
|
|
||||||
Route::get('/database-config', ['as' => 'database-config', 'uses' => 'Api\v1\InstallerApiController@config_database']);
|
|
||||||
Route::get('/system-config', ['as' => 'database-config', 'uses' => 'Api\v1\InstallerApiController@config_system']);
|
|
||||||
/*
|
|
||||||
* Helpdesk
|
|
||||||
*/
|
|
||||||
Route::group(['prefix' => 'helpdesk'], function () {
|
|
||||||
Route::post('create', 'Api\v1\ApiController@createTicket');
|
|
||||||
Route::post('reply', 'Api\v1\ApiController@ticketReply');
|
|
||||||
Route::post('edit', 'Api\v1\ApiController@editTicket');
|
|
||||||
Route::post('delete', 'Api\v1\ApiController@deleteTicket');
|
|
||||||
Route::post('assign', 'Api\v1\ApiController@assignTicket');
|
|
||||||
Route::get('open', 'Api\v1\ApiController@openedTickets');
|
|
||||||
Route::get('unassigned', 'Api\v1\ApiController@unassignedTickets');
|
|
||||||
Route::get('closed', 'Api\v1\ApiController@closeTickets');
|
|
||||||
Route::get('agents', 'Api\v1\ApiController@getAgents');
|
|
||||||
Route::get('teams', 'Api\v1\ApiController@getTeams');
|
|
||||||
Route::get('customers', 'Api\v1\ApiController@getCustomers');
|
|
||||||
Route::get('customer', 'Api\v1\ApiController@getCustomer');
|
|
||||||
Route::get('ticket-search', 'Api\v1\ApiController@searchTicket');
|
|
||||||
Route::get('ticket-thread', 'Api\v1\ApiController@ticketThreads');
|
|
||||||
Route::get('url', 'Api\v1\ApiExceptAuthController@checkUrl');
|
|
||||||
Route::get('check-url', 'Api\v1\ApiExceptAuthController@urlResult');
|
|
||||||
Route::get('api_key', 'Api\v1\ApiController@generateApiKey');
|
|
||||||
Route::get('help-topic', 'Api\v1\ApiController@getHelpTopic');
|
|
||||||
Route::get('sla-plan', 'Api\v1\ApiController@getSlaPlan');
|
|
||||||
Route::get('priority', 'Api\v1\ApiController@getPriority');
|
|
||||||
Route::get('department', 'Api\v1\ApiController@getDepartment');
|
|
||||||
Route::get('tickets', 'Api\v1\ApiController@getTickets');
|
|
||||||
Route::get('ticket', 'Api\v1\ApiController@getTicketById');
|
|
||||||
Route::get('inbox', 'Api\v1\ApiController@inbox');
|
|
||||||
Route::get('trash', 'Api\v1\ApiController@getTrash');
|
|
||||||
Route::get('my-tickets-agent', 'Api\v1\ApiController@getMyTicketsAgent');
|
|
||||||
Route::post('internal-note', 'Api\v1\ApiController@internalNote');
|
|
||||||
/*
|
|
||||||
* Newly added
|
|
||||||
*/
|
|
||||||
Route::get('customers-custom', 'Api\v1\ApiController@getCustomersWith');
|
|
||||||
Route::get('collaborator/search', 'Api\v1\ApiController@collaboratorSearch');
|
|
||||||
Route::post('collaborator/create', 'Api\v1\ApiController@addCollaboratorForTicket');
|
|
||||||
Route::post('collaborator/remove', 'Api\v1\ApiController@deleteCollaborator');
|
|
||||||
Route::post('collaborator/get-ticket', 'Api\v1\ApiController@getCollaboratorForTicket');
|
|
||||||
Route::get('my-tickets-user', 'Api\v1\ApiController@getMyTicketsUser');
|
|
||||||
Route::get('dependency', 'Api\v1\ApiController@dependency');
|
|
||||||
Route::post('register', 'Api\v1\ApiController@createUser');
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
|
||||||
* FCM token response
|
|
||||||
*/
|
|
||||||
Route::post('fcmtoken', ['as' => 'fcmtoken', 'uses' => 'Common\PushNotificationController@fcmToken']);
|
|
||||||
});
|
|
||||||
/*
|
|
||||||
* Update module
|
|
||||||
*/
|
|
||||||
Route::get('database-update', ['as' => 'database.update', 'uses' => 'Update\UpgradeController@databaseUpdate']);
|
|
||||||
Route::get('database-upgrade', ['as' => 'database.upgrade', 'uses' => 'Update\UpgradeController@databaseUpgrade']);
|
|
||||||
Route::get('file-update', ['as' => 'file.update', 'uses' => 'Update\UpgradeController@fileUpdate']);
|
|
||||||
Route::get('file-upgrade', ['as' => 'file.upgrade', 'uses' => 'Update\UpgradeController@fileUpgrading']);
|
|
||||||
/*
|
|
||||||
* Webhook
|
|
||||||
*/
|
|
||||||
\Event::listen('ticket.details', function ($details) {
|
|
||||||
$api_control = new \App\Http\Controllers\Common\ApiSettings();
|
|
||||||
$api_control->ticketDetailEvent($details);
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('test', ['as' => 'test', 'uses' => 'Common\PushNotificationController@response']);
|
|
||||||
|
|
||||||
Route::get('mail/config/service', ['as' => 'mail.config.service', 'uses' => 'Job\MailController@serviceForm']);
|
|
||||||
/*
|
|
||||||
* Queue
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::get('queue', ['as' => 'queue', 'uses' => 'Job\QueueController@index']);
|
|
||||||
Route::get('form/queue', ['as' => 'queue.form', 'uses' => 'Job\QueueController@getForm']);
|
|
||||||
|
|
||||||
Route::get('queue/{id}', ['as' => 'queue.edit', 'uses' => 'Job\QueueController@edit']);
|
|
||||||
Route::post('queue/{id}', ['as' => 'queue.update', 'uses' => 'Job\QueueController@update']);
|
|
||||||
Route::get('queue/{id}/activate', ['as' => 'queue.activate', 'uses' => 'Job\QueueController@activate']);
|
|
||||||
Route::get('get-ticket-number', ['as' => 'get.ticket.number', 'uses' => 'Admin\helpdesk\SettingsController@getTicketNumber']);
|
|
||||||
Route::get('genereate-pdf/{threadid}', ['as' => 'thread.pdf', 'uses' => 'Agent\helpdesk\TicketController@pdfThread']);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Url Settings
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::get('url/settings', ['as' => 'url.settings', 'uses' => 'Admin\helpdesk\UrlSettingController@settings']);
|
|
||||||
Route::patch('url/settings', ['as' => 'url.settings.post', 'uses' => 'Admin\helpdesk\UrlSettingController@postSettings']);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Social media settings
|
|
||||||
*/
|
|
||||||
|
|
||||||
Route::get('social/media', ['as'=>'social', 'uses'=>'Admin\helpdesk\SocialMedia\SocialMediaController@index']);
|
|
||||||
Route::get('social/media/{provider}', ['as'=>'social.media', 'uses'=>'Admin\helpdesk\SocialMedia\SocialMediaController@settings']);
|
|
||||||
Route::post('social/media/{provider}', ['as'=>'social.media.post', 'uses'=>'Admin\helpdesk\SocialMedia\SocialMediaController@postSettings']);
|
|
||||||
/*
|
|
||||||
* Ticket_Priority Settings
|
|
||||||
*/
|
|
||||||
Route::get('ticket/priority', ['as' => 'priority.index', 'uses' => 'Admin\helpdesk\PriorityController@priorityIndex']);
|
|
||||||
Route::post('user/ticket/priority', ['as' => 'user.priority.index', 'uses' => 'Admin\helpdesk\PriorityController@userPriorityIndex']);
|
|
||||||
|
|
||||||
Route::get('get_index', ['as' => 'priority.index1', 'uses' => 'Admin\helpdesk\PriorityController@priorityIndex1']);
|
|
||||||
Route::get('ticket/priority/create', ['as' => 'priority.create', 'uses' => 'Admin\helpdesk\PriorityController@priorityCreate']);
|
|
||||||
Route::post('ticket/priority/create1', ['as' => 'priority.create1', 'uses' => 'Admin\helpdesk\PriorityController@priorityCreate1']);
|
|
||||||
Route::post('ticket/priority/edit1', ['as' => 'priority.edit1', 'uses' => 'Admin\helpdesk\PriorityController@priorityEdit1']);
|
|
||||||
Route::get('ticket/priority/{ticket_priority}/edit', ['as' => 'priority.edit', 'uses' => 'Admin\helpdesk\PriorityController@priorityEdit']);
|
|
||||||
Route::get('ticket/priority/{ticket_priority}/destroy', ['as' => 'priority.destroy', 'uses' => 'Admin\helpdesk\PriorityController@destroy']);
|
|
||||||
// user---arindam
|
|
||||||
Route::post('rolechangeadmin/{id}', ['as' => 'user.post.rolechangeadmin', 'uses' =>'Agent\helpdesk\UserController@changeRoleAdmin']);
|
|
||||||
Route::post('rolechangeagent/{id}', ['as' => 'user.post.rolechangeagent', 'uses' =>'Agent\helpdesk\UserController@changeRoleAgent']);
|
|
||||||
Route::post('rolechangeuser/{id}', ['as' => 'user.post.rolechangeuser', 'uses' =>'Agent\helpdesk\UserController@changeRoleUser']);
|
|
||||||
Route::get('password', ['as' => 'user.changepassword', 'uses' =>'Agent\helpdesk\UserController@randomPassword']);
|
|
||||||
Route::post('changepassword/{id}', ['as' => 'user.post.changepassword', 'uses' =>'Agent\helpdesk\UserController@randomPostPassword']);
|
|
||||||
Route::post('delete/{id}', ['as' => 'user.post.delete', 'uses' =>'Agent\helpdesk\UserController@deleteAgent']);
|
|
||||||
|
|
||||||
// deleted user list
|
|
||||||
Route::get('deleted/user', ['as' => 'user.deleted', 'uses' => 'Agent\helpdesk\UserController@deletedUser']);
|
|
||||||
|
|
||||||
Route::post('restore/{id}', ['as' => 'user.restore', 'uses' => 'Agent\helpdesk\UserController@restoreUser']);
|
|
||||||
|
|
||||||
//due today ticket
|
|
||||||
Route::get('duetoday', ['as' => 'ticket.duetoday', 'uses' =>'Agent\helpdesk\TicketController@dueTodayTicketlist']);
|
|
||||||
|
|
||||||
// Route::post('duetoday/list/ticket', ['as' => 'ticket.post.duetoday', 'uses' =>'Agent\helpdesk\TicketController@getDueToday']);
|
|
||||||
Route::get('duetoday/list/ticket', ['as' => 'ticket.post.duetoday', 'uses' =>'Agent\helpdesk\TicketController@getDueToday']); /* Get Open Ticket */
|
|
||||||
// Breadcrumbs::register('open.ticket', function ($breadcrumbs) {
|
|
||||||
// $breadcrumbs->parent('dashboard');
|
|
||||||
// $breadcrumbs->push(Lang::get('lang.tickets') . ' > ' . Lang::get('lang.open'), route('open.ticket'));
|
|
||||||
// });
|
|
||||||
});
|
|
@@ -3,12 +3,11 @@
|
|||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Http\Controllers\Common\PhpMailController;
|
use App\Http\Controllers\Common\PhpMailController;
|
||||||
use Illuminate\Contracts\Bus\SelfHandling;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class SendEmail extends Job implements SelfHandling, ShouldQueue
|
class SendEmail extends Job implements ShouldQueue
|
||||||
{
|
{
|
||||||
use InteractsWithQueue,SerializesModels;
|
use InteractsWithQueue,SerializesModels;
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ class Organization extends BaseModel
|
|||||||
|
|
||||||
public function getUserIds()
|
public function getUserIds()
|
||||||
{
|
{
|
||||||
$user_relations = $this->userRelation()->lists('user_id')->toArray();
|
$user_relations = $this->userRelation()->pluck('user_id')->toArray();
|
||||||
|
|
||||||
return $user_relations;
|
return $user_relations;
|
||||||
}
|
}
|
||||||
|
@@ -60,9 +60,13 @@ class Emails extends BaseModel
|
|||||||
|
|
||||||
public function getPasswordAttribute($value)
|
public function getPasswordAttribute($value)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if ($value) {
|
if ($value) {
|
||||||
return \Crypt::decrypt($value);
|
return \Crypt::decrypt($value);
|
||||||
}
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@ class Filter extends Model
|
|||||||
|
|
||||||
public function getTagsByTicketId($ticketid)
|
public function getTagsByTicketId($ticketid)
|
||||||
{
|
{
|
||||||
$filter = $this->where('key', 'tag')->where('ticket_id', $ticketid)->lists('value')->toArray();
|
$filter = $this->where('key', 'tag')->where('ticket_id', $ticketid)->pluck('value')->toArray();
|
||||||
|
|
||||||
return $filter;
|
return $filter;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ class Fields extends BaseModel
|
|||||||
public function valuesAsString()
|
public function valuesAsString()
|
||||||
{
|
{
|
||||||
$string = '';
|
$string = '';
|
||||||
$values = $this->values()->lists('field_value')->toArray();
|
$values = $this->values()->pluck('field_value')->toArray();
|
||||||
if (count($values) > 0) {
|
if (count($values) > 0) {
|
||||||
$string = implode(',', $values);
|
$string = implode(',', $values);
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@ class SocialMedia extends Model
|
|||||||
if ($key !== '' && $key !== 'redirect') {
|
if ($key !== '' && $key !== 'redirect') {
|
||||||
$social = $this->where('provider', $provider)->where('key', $key)->first();
|
$social = $this->where('provider', $provider)->where('key', $key)->first();
|
||||||
} elseif ($key !== 'redirect') {
|
} elseif ($key !== 'redirect') {
|
||||||
$social = $this->where('provider', $provider)->lists('value', 'key')->toArray();
|
$social = $this->where('provider', $provider)->pluck('value', 'key')->toArray();
|
||||||
}
|
}
|
||||||
if (is_object($social)) {
|
if (is_object($social)) {
|
||||||
$social = $social->value;
|
$social = $social->value;
|
||||||
|
@@ -116,7 +116,7 @@ class Ticket_ThreadOld extends Model
|
|||||||
public function inlineAttachment($body)
|
public function inlineAttachment($body)
|
||||||
{
|
{
|
||||||
if ($this->attach()->where('poster', 'INLINE')->get()->count() > 0) {
|
if ($this->attach()->where('poster', 'INLINE')->get()->count() > 0) {
|
||||||
$search = $this->attach()->where('poster', 'INLINE')->lists('name')->toArray();
|
$search = $this->attach()->where('poster', 'INLINE')->pluck('name')->toArray();
|
||||||
foreach ($this->attach()->where('poster', 'INLINE')->get() as $key => $attach) {
|
foreach ($this->attach()->where('poster', 'INLINE')->get() as $key => $attach) {
|
||||||
$replace[$key] = "data:$attach->type;base64,".$attach->file;
|
$replace[$key] = "data:$attach->type;base64,".$attach->file;
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,9 @@ namespace App\Providers;
|
|||||||
|
|
||||||
use App\Model\Update\BarNotification;
|
use App\Model\Update\BarNotification;
|
||||||
use Illuminate\Queue\Events\JobFailed;
|
use Illuminate\Queue\Events\JobFailed;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Laravel\Dusk\DuskServiceProvider;
|
||||||
use Queue;
|
use Queue;
|
||||||
use View;
|
use View;
|
||||||
|
|
||||||
@@ -23,33 +25,20 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
$this->app->bind('Illuminate\Contracts\Auth\Registrar');
|
$this->app->bind('Illuminate\Contracts\Auth\Registrar');
|
||||||
require_once __DIR__.'/../Http/helpers.php';
|
require_once __DIR__.'/../Http/helpers.php';
|
||||||
|
if ($this->app->environment('local', 'testing')) {
|
||||||
|
$this->app->register(DuskServiceProvider::class);
|
||||||
|
}
|
||||||
|
// if (isInstall()) {
|
||||||
|
// $this->plugin();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
Queue::failing(function (JobFailed $event) {
|
Queue::failing(function (JobFailed $event) {
|
||||||
loging('Failed Job - '.$event->connectionName, json_encode($event->data));
|
loging('Failed Job - '.$event->connectionName, json_encode([$event->job->payload(), 'error' => $event->exception->getMessage().' file=>'.$event->exception->getFile().' line=>'.$event->exception->getLine()]));
|
||||||
$failedid = $event->failedId;
|
|
||||||
//\Artisan::call('queue:retry',['id'=>[$failedid]]);
|
|
||||||
});
|
});
|
||||||
// Please note the different namespace
|
Route::singularResourceParameters(false);
|
||||||
// and please add a \ in front of your classes in the global namespace
|
|
||||||
\Event::listen('cron.collectJobs', function () {
|
|
||||||
\Cron::add('example1', '* * * * *', function () {
|
|
||||||
$this->index();
|
|
||||||
|
|
||||||
return 'No';
|
|
||||||
});
|
|
||||||
|
|
||||||
\Cron::add('example2', '*/2 * * * *', function () {
|
|
||||||
// Do some crazy things successfully every two minute
|
|
||||||
});
|
|
||||||
|
|
||||||
\Cron::add('disabled job', '0 * * * *', function () {
|
|
||||||
// Do some crazy things successfully every hour
|
|
||||||
}, false);
|
|
||||||
});
|
|
||||||
|
|
||||||
$this->composer();
|
$this->composer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,4 +52,70 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
view()->share($not);
|
view()->share($not);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function plugin()
|
||||||
|
{
|
||||||
|
if (isPlugin('Ldap') && $this->isPluginDir('Ldap')) {
|
||||||
|
$this->app->register(\App\Plugins\Ldap\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Chat') && $this->isPluginDir('Chat')) {
|
||||||
|
$this->app->register(\App\Plugins\Chat\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Envato') && $this->isPluginDir('Envato')) {
|
||||||
|
$this->app->register(\App\Plugins\Envato\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Htrunk') && $this->isPluginDir('Htrunk')) {
|
||||||
|
$this->app->register(\App\Plugins\Htrunk\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('HtrunkDocs') && $this->isPluginDir('HtrunkDocs')) {
|
||||||
|
$this->app->register(\App\Plugins\HtrunkDocs\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Licenses') && $this->isPluginDir('Licenses')) {
|
||||||
|
$this->app->register(\App\Plugins\Licenses\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Migration') && $this->isPluginDir('Migration')) {
|
||||||
|
$this->app->register(\App\Plugins\Migration\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Reseller') && $this->isPluginDir('Reseller')) {
|
||||||
|
$this->app->register(\App\Plugins\Reseller\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('SMS') && $this->isPluginDir('SMS')) {
|
||||||
|
$this->app->register(\App\Plugins\SMS\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('ServiceDesk') && $this->isPluginDir('ServiceDesk')) {
|
||||||
|
$this->app->register(\App\Plugins\ServiceDesk\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Social') && $this->isPluginDir('Social')) {
|
||||||
|
$this->app->register(\App\Plugins\Social\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Telephony') && $this->isPluginDir('Telephony')) {
|
||||||
|
$this->app->register(\App\Plugins\Telephony\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if (isPlugin('Zapier') && $this->isPluginDir('Zapier')) {
|
||||||
|
$this->app->register(\App\Plugins\Zapier\ServiceProvider::class);
|
||||||
|
}
|
||||||
|
if ($this->isModuleDir('Location')) {
|
||||||
|
$this->app->register(\App\Location\LocationServiceProvider::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isPluginDir($name)
|
||||||
|
{
|
||||||
|
$check = false;
|
||||||
|
if (is_dir(app_path('Plugins'.DIRECTORY_SEPARATOR.$name))) {
|
||||||
|
$check = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $check;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isModuleDir($name)
|
||||||
|
{
|
||||||
|
$check = false;
|
||||||
|
if (is_dir(app_path($name))) {
|
||||||
|
$check = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $check;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
|
|
||||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
class AuthServiceProvider extends ServiceProvider
|
class AuthServiceProvider extends ServiceProvider
|
||||||
@@ -14,6 +13,7 @@ class AuthServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
protected $policies = [
|
protected $policies = [
|
||||||
'App\Model' => 'App\Policies\ModelPolicy',
|
'App\Model' => 'App\Policies\ModelPolicy',
|
||||||
|
\App\Model\helpdesk\Ticket\Tickets::class => \App\Policies\TicketPolicy::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,9 +23,9 @@ class AuthServiceProvider extends ServiceProvider
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function boot(GateContract $gate)
|
public function boot()
|
||||||
{
|
{
|
||||||
parent::registerPolicies($gate);
|
parent::registerPolicies();
|
||||||
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
26
app/Providers/BroadcastServiceProvider.php
Normal file
26
app/Providers/BroadcastServiceProvider.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class BroadcastServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
Broadcast::routes();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Authenticate the user's personal channel...
|
||||||
|
*/
|
||||||
|
Broadcast::channel('App.User.*', function ($user, $userId) {
|
||||||
|
return (int) $user->id === (int) $userId;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@@ -13,10 +13,19 @@ class ComposerServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
|
$service_desk = '';
|
||||||
|
// if (isInstall()) {
|
||||||
|
// if (isPlugin()) {
|
||||||
|
// $service_desk = 'service::interface.agent.sidebar';
|
||||||
|
// }
|
||||||
|
// }
|
||||||
view()->composer(
|
view()->composer(
|
||||||
[
|
[
|
||||||
'themes.default1.agent.layout.agent',
|
'themes.default1.agent.layout.agent',
|
||||||
'themes.default1.agent.helpdesk.dashboard.dashboard',
|
'themes.default1.agent.helpdesk.dashboard.dashboard',
|
||||||
|
'themes.default1.admin.layout.admin',
|
||||||
|
'themes.default1.admin.helpdesk.setting',
|
||||||
|
$service_desk,
|
||||||
], 'App\Http\ViewComposers\AgentLayout'
|
], 'App\Http\ViewComposers\AgentLayout'
|
||||||
);
|
);
|
||||||
view()->composer(
|
view()->composer(
|
||||||
@@ -30,6 +39,13 @@ class ComposerServiceProvider extends ServiceProvider
|
|||||||
'themes.default1.admin.layout.admin',
|
'themes.default1.admin.layout.admin',
|
||||||
], 'App\Http\ViewComposers\AuthUser'
|
], 'App\Http\ViewComposers\AuthUser'
|
||||||
);
|
);
|
||||||
|
view()->composer(
|
||||||
|
[
|
||||||
|
'themes.default1.admin.layout.admin',
|
||||||
|
'themes.default1.agent.layout.agent',
|
||||||
|
'themes.default1.client.layout.client',
|
||||||
|
], 'App\Http\ViewComposers\UserLanguage'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
|
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
@@ -13,8 +12,8 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
'event.name' => [
|
'App\Events\WorkFlowEvent' => [
|
||||||
'EventListener',
|
'App\Listeners\WorkFlowListen',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -25,9 +24,9 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function boot(DispatcherContract $events)
|
public function boot()
|
||||||
{
|
{
|
||||||
parent::boot($events);
|
parent::boot();
|
||||||
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
@@ -3,12 +3,12 @@
|
|||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
use Illuminate\Routing\Router;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
class RouteServiceProvider extends ServiceProvider
|
class RouteServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This namespace is applied to the controller routes in your routes file.
|
* This namespace is applied to your controller routes.
|
||||||
*
|
*
|
||||||
* In addition, it is set as the URL generator's root namespace.
|
* In addition, it is set as the URL generator's root namespace.
|
||||||
*
|
*
|
||||||
@@ -19,28 +19,95 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
/**
|
/**
|
||||||
* Define your route model bindings, pattern filters, etc.
|
* Define your route model bindings, pattern filters, etc.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Routing\Router $router
|
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function boot(Router $router)
|
public function boot()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
parent::boot();
|
||||||
parent::boot($router);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the routes for the application.
|
* Define the routes for the application.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Routing\Router $router
|
* @return void
|
||||||
|
*/
|
||||||
|
public function map()
|
||||||
|
{
|
||||||
|
$this->mapApiRoutes();
|
||||||
|
$this->mapWebRoutes();
|
||||||
|
$this->mapInstallerRoutes();
|
||||||
|
$this->mapUpdateRoutes();
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "web" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes all receive session state, CSRF protection, etc.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function map(Router $router)
|
protected function mapWebRoutes()
|
||||||
{
|
{
|
||||||
$router->group(['namespace' => $this->namespace], function ($router) {
|
Route::group([
|
||||||
require app_path('Http/routes.php');
|
'middleware' => 'web',
|
||||||
|
'namespace' => $this->namespace,
|
||||||
|
], function ($router) {
|
||||||
|
require base_path('routes/web.php');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "api" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes are typically stateless.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function mapApiRoutes()
|
||||||
|
{
|
||||||
|
Route::group([
|
||||||
|
'middleware' => 'api',
|
||||||
|
'namespace' => $this->namespace,
|
||||||
|
'prefix' => 'api',
|
||||||
|
], function ($router) {
|
||||||
|
require base_path('routes/api.php');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "installer" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes are typically stateless.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function mapInstallerRoutes()
|
||||||
|
{
|
||||||
|
Route::group([
|
||||||
|
'middleware' => ['web', 'installer'],
|
||||||
|
'namespace' => $this->namespace,
|
||||||
|
], function ($router) {
|
||||||
|
require base_path('routes/installer.php');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "update" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes are typically stateless.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function mapUpdateRoutes()
|
||||||
|
{
|
||||||
|
Route::group([
|
||||||
|
'middleware' => ['web', 'redirect', 'install'],
|
||||||
|
'namespace' => $this->namespace,
|
||||||
|
'prefix' => 'app/update',
|
||||||
|
], function ($router) {
|
||||||
|
require base_path('routes/update.php');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
33
app/User.php
33
app/User.php
@@ -7,8 +7,9 @@ use Illuminate\Auth\Passwords\CanResetPassword;
|
|||||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Tymon\JWTAuth\Contracts\JWTSubject as AuthenticatableUserContract;
|
||||||
|
|
||||||
class User extends Model implements AuthenticatableContract, CanResetPasswordContract
|
class User extends Model implements AuthenticatableContract, CanResetPasswordContract, AuthenticatableUserContract
|
||||||
{
|
{
|
||||||
use Authenticatable,
|
use Authenticatable,
|
||||||
CanResetPassword;
|
CanResetPassword;
|
||||||
@@ -125,7 +126,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||||||
$id = $this->attributes['id'];
|
$id = $this->attributes['id'];
|
||||||
}
|
}
|
||||||
$info = new UserAdditionalInfo();
|
$info = new UserAdditionalInfo();
|
||||||
$infos = $info->where('owner', $id)->lists('value', 'key')->toArray();
|
$infos = $info->where('owner', $id)->pluck('value', 'key')->toArray();
|
||||||
|
|
||||||
return $infos;
|
return $infos;
|
||||||
}
|
}
|
||||||
@@ -175,13 +176,23 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||||||
return $this->name();
|
return $this->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function save() {
|
/**
|
||||||
// dd($this->id);
|
* Get the identifier that will be stored in the subject claim of the JWT.
|
||||||
// parent::save();
|
*
|
||||||
// }
|
* @return mixed
|
||||||
|
*/
|
||||||
// public function save(array $options = array()) {
|
public function getJWTIdentifier()
|
||||||
// parent::save($options);
|
{
|
||||||
// dd($this->where('id',$this->id)->select('first_name','last_name','user_name','email')->get()->toJson());
|
return $this->getKey();
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a key value array, containing any custom claims to be added to the JWT.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getJWTCustomClaims()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,47 +8,51 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"laravel/framework": "5.2.*",
|
"php": ">=7.1.3",
|
||||||
"illuminate/html": "5.*",
|
"laravel/framework": "5.6.*",
|
||||||
|
"laravelcollective/html": "5.*",
|
||||||
"vsmoraes/laravel-pdf": "1.0.1",
|
"vsmoraes/laravel-pdf": "1.0.1",
|
||||||
"propaganistas/laravel-phone": "~2.0",
|
"propaganistas/laravel-phone": "~2.0",
|
||||||
"bugsnag/bugsnag-laravel": "1.*",
|
"bugsnag/bugsnag-laravel": "1.*",
|
||||||
"filp/whoops": "~1.0",
|
|
||||||
"thomaswelton/laravel-gravatar": "~1.0",
|
"thomaswelton/laravel-gravatar": "~1.0",
|
||||||
"neitanod/forceutf8": "dev-master",
|
"neitanod/forceutf8": "dev-master",
|
||||||
"nicolaslopezj/searchable": "1.*",
|
"nicolaslopezj/searchable": "1.*",
|
||||||
"chumper/datatable": "dev-develop",
|
"chumper/datatable": "dev-develop",
|
||||||
"chumper/zipper": "0.6.x",
|
"chumper/zipper": "1.0.x",
|
||||||
"tymon/jwt-auth": "0.5.*",
|
"tymon/jwt-auth": "dev-develop",
|
||||||
"php": ">=5.5.9",
|
|
||||||
"davejamesmiller/laravel-breadcrumbs": "^3.0",
|
"davejamesmiller/laravel-breadcrumbs": "^3.0",
|
||||||
"davibennun/laravel-push-notification": "dev-laravel5",
|
"davibennun/laravel-push-notification": "dev-laravel5",
|
||||||
"brozot/laravel-fcm": "^1.0",
|
"brozot/laravel-fcm": "^1.0",
|
||||||
"barryvdh/laravel-debugbar": "^2.2",
|
"barryvdh/laravel-debugbar": "3.1.*",
|
||||||
"aws/aws-sdk-php": "~3.0",
|
"aws/aws-sdk-php": "~3.0",
|
||||||
"predis/predis": "~1.0",
|
"predis/predis": "~1.0",
|
||||||
"mremi/url-shortener": "^1.0",
|
"mremi/url-shortener": "^1.0",
|
||||||
"maatwebsite/excel": "~2.1.0",
|
"maatwebsite/excel": "~2.1.0",
|
||||||
"laravelcollective/bus": "^5.2",
|
"laravel/socialite": "3.0.11",
|
||||||
"laravel/socialite": "^2.0",
|
|
||||||
"tedivm/fetch": "0.6.*",
|
"tedivm/fetch": "0.6.*",
|
||||||
"unisharp/laravel-filemanager": "^1.6",
|
"unisharp/laravel-filemanager": "^1.6",
|
||||||
"unisharp/laravel-ckeditor": "^4.5",
|
"unisharp/laravel-ckeditor": "^4.5",
|
||||||
"torann/geoip": "^1.0",
|
"torann/geoip": "^1.0",
|
||||||
"yajra/laravel-datatables-oracle": "~6.0"
|
"yajra/laravel-datatables-oracle": "~6.0",
|
||||||
|
"flowjs/flow-php-server": "^1.0",
|
||||||
|
"doctrine/dbal": "^2.5"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.0",
|
"phpunit/phpunit": "~7.0",
|
||||||
"phpspec/phpspec": "~2.1",
|
"phpspec/phpspec": "^4.0",
|
||||||
"symfony/dom-crawler": "~3.0",
|
"symfony/dom-crawler": "3.1.*",
|
||||||
"symfony/css-selector": "~3.0"
|
"symfony/css-selector": "3.1.*",
|
||||||
|
"fzaninotto/faker": "1.*",
|
||||||
|
"filp/whoops": "~2.0",
|
||||||
|
"laravel/dusk": "~3.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"database"
|
"database"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app/"
|
"App\\": "app/",
|
||||||
|
"Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
@@ -56,18 +60,27 @@
|
|||||||
"tests/TestCase.php"
|
"tests/TestCase.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"dont-discover": [
|
||||||
|
"laravel/dusk"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"post-install-cmd": [
|
"post-install-cmd": [
|
||||||
"php artisan clear-compiled",
|
"php artisan clear-compiled"
|
||||||
"php artisan optimize"
|
|
||||||
],
|
],
|
||||||
"post-update-cmd": [
|
"post-update-cmd": [
|
||||||
"php artisan clear-compiled",
|
"php artisan clear-compiled"
|
||||||
"php artisan optimize"
|
|
||||||
],
|
],
|
||||||
"post-create-project-cmd": [
|
"post-create-project-cmd": [
|
||||||
"php -r \"copy('.env.example', '.env');\"",
|
"php -r \"copy('.env.example', '.env');\"",
|
||||||
"php artisan key:generate"
|
"php artisan key:generate"
|
||||||
|
],
|
||||||
|
"post-autoload-dump": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
"@php artisan package:discover"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
3984
composer.lock
generated
3984
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -33,7 +33,7 @@ return [
|
|||||||
| This tells about aplication current version.
|
| This tells about aplication current version.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'version' => 'Community 1.9.6',
|
'version' => 'Community 1.10',
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Name
|
| Application Name
|
||||||
@@ -97,8 +97,8 @@ return [
|
|||||||
| will not be safe. Please do this before deploying an application!
|
| will not be safe. Please do this before deploying an application!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'key' => env('APP_KEY', 'F70u5RfMoiq7ptPR'),
|
'key' => env('APP_KEY', 'base64:h3KjrHeVxyE+j6c8whTAs2YI+7goylGZ/e2vElgXT6I='),
|
||||||
'cipher' => MCRYPT_RIJNDAEL_128,
|
'cipher' => 'AES-256-CBC',
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Logging Configuration
|
| Logging Configuration
|
||||||
@@ -132,13 +132,11 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'providers' => [
|
'providers' => [
|
||||||
|
|
||||||
'Illuminate\Broadcasting\BroadcastServiceProvider',
|
'Illuminate\Broadcasting\BroadcastServiceProvider',
|
||||||
'DaveJamesMiller\Breadcrumbs\ServiceProvider',
|
'DaveJamesMiller\Breadcrumbs\ServiceProvider',
|
||||||
/*
|
/*
|
||||||
* Laravel Framework Service Providers...
|
* Laravel Framework Service Providers...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'Illuminate\Auth\AuthServiceProvider',
|
'Illuminate\Auth\AuthServiceProvider',
|
||||||
'Illuminate\Bus\BusServiceProvider',
|
'Illuminate\Bus\BusServiceProvider',
|
||||||
'Illuminate\Cache\CacheServiceProvider',
|
'Illuminate\Cache\CacheServiceProvider',
|
||||||
@@ -159,7 +157,9 @@ return [
|
|||||||
'Illuminate\Translation\TranslationServiceProvider',
|
'Illuminate\Translation\TranslationServiceProvider',
|
||||||
'Illuminate\Validation\ValidationServiceProvider',
|
'Illuminate\Validation\ValidationServiceProvider',
|
||||||
'Illuminate\View\ViewServiceProvider',
|
'Illuminate\View\ViewServiceProvider',
|
||||||
'Illuminate\Html\HtmlServiceProvider',
|
Illuminate\Notifications\NotificationServiceProvider::class,
|
||||||
|
App\Providers\BroadcastServiceProvider::class,
|
||||||
|
Collective\Html\HtmlServiceProvider::class,
|
||||||
/*
|
/*
|
||||||
* Application Service Providers...
|
* Application Service Providers...
|
||||||
*/
|
*/
|
||||||
@@ -174,19 +174,20 @@ return [
|
|||||||
'Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider',
|
'Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider',
|
||||||
'Chumper\Datatable\DatatableServiceProvider',
|
'Chumper\Datatable\DatatableServiceProvider',
|
||||||
'Chumper\Zipper\ZipperServiceProvider',
|
'Chumper\Zipper\ZipperServiceProvider',
|
||||||
'Tymon\JWTAuth\Providers\JWTAuthServiceProvider',
|
Tymon\JWTAuth\Providers\LaravelServiceProvider::class,
|
||||||
\Torann\GeoIP\GeoIPServiceProvider::class,
|
\Torann\GeoIP\GeoIPServiceProvider::class,
|
||||||
Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider::class,
|
Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider::class,
|
||||||
Intervention\Image\ImageServiceProvider::class,
|
Intervention\Image\ImageServiceProvider::class,
|
||||||
Unisharp\Ckeditor\ServiceProvider::class,
|
Unisharp\Ckeditor\ServiceProvider::class,
|
||||||
LaravelFCM\FCMServiceProvider::class,
|
LaravelFCM\FCMServiceProvider::class,
|
||||||
Barryvdh\Debugbar\ServiceProvider::class,
|
Barryvdh\Debugbar\ServiceProvider::class,
|
||||||
Collective\Bus\BusServiceProvider::class,
|
//Collective\Bus\BusServiceProvider::class,
|
||||||
Maatwebsite\Excel\ExcelServiceProvider::class,
|
Maatwebsite\Excel\ExcelServiceProvider::class,
|
||||||
Laravel\Socialite\SocialiteServiceProvider::class,
|
Laravel\Socialite\SocialiteServiceProvider::class,
|
||||||
App\FaveoLog\LaravelLogViewerServiceProvider::class,
|
App\FaveoLog\LaravelLogViewerServiceProvider::class,
|
||||||
App\FaveoStorage\StorageServiceProvider::class,
|
App\FaveoStorage\StorageServiceProvider::class,
|
||||||
Yajra\Datatables\DatatablesServiceProvider::class,
|
Yajra\Datatables\DatatablesServiceProvider::class,
|
||||||
|
\App\Api\ApiServiceProvider::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
/*
|
/*
|
||||||
@@ -231,8 +232,8 @@ return [
|
|||||||
'URL' => 'Illuminate\Support\Facades\URL',
|
'URL' => 'Illuminate\Support\Facades\URL',
|
||||||
'Validator' => 'Illuminate\Support\Facades\Validator',
|
'Validator' => 'Illuminate\Support\Facades\Validator',
|
||||||
'View' => 'Illuminate\Support\Facades\View',
|
'View' => 'Illuminate\Support\Facades\View',
|
||||||
'Form' => 'Illuminate\Html\FormFacade',
|
'Form' => Collective\Html\FormFacade::class,
|
||||||
'HTML' => 'Illuminate\Html\HtmlFacade',
|
'Html' => Collective\Html\HtmlFacade::class,
|
||||||
'phone' => 'The :attribute field contains an invalid number.',
|
'phone' => 'The :attribute field contains an invalid number.',
|
||||||
'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade',
|
'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade',
|
||||||
'PDF' => 'Vsmoraes\Pdf\PdfFacade',
|
'PDF' => 'Vsmoraes\Pdf\PdfFacade',
|
||||||
@@ -255,7 +256,6 @@ return [
|
|||||||
'UnAuth' => 'App\Http\Controllers\Client\helpdesk\UnAuthController',
|
'UnAuth' => 'App\Http\Controllers\Client\helpdesk\UnAuthController',
|
||||||
'Finder' => App\Helper\Finder::class,
|
'Finder' => App\Helper\Finder::class,
|
||||||
'Datatables' => Yajra\Datatables\Facades\Datatables::class,
|
'Datatables' => Yajra\Datatables\Facades\Datatables::class,
|
||||||
|
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@@ -13,7 +13,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('BROADCAST_DRIVER', 'pusher'),
|
'default' => env('BROADCAST_DRIVER', 'log'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
262
config/jwt.php
262
config/jwt.php
@@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of jwt-auth.
|
||||||
|
*
|
||||||
|
* (c) Sean Tymon <tymon148@gmail.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -7,22 +16,93 @@ return [
|
|||||||
| JWT Authentication Secret
|
| JWT Authentication Secret
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Don't forget to set this, as it will be used to sign your tokens.
|
| Don't forget to set this in your .env file, as it will be used to sign
|
||||||
| A helper command is provided for this: `php artisan jwt:generate`
|
| your tokens. A helper command is provided for this:
|
||||||
|
| `php artisan jwt:secret`
|
||||||
|
|
|
||||||
|
| Note: This will be used for Symmetric algorithms only (HMAC),
|
||||||
|
| since RSA and ECDSA use a private/public key combo (See below).
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'secret' => env('JWT_SECRET', 'changeme'),
|
'secret' => env('JWT_SECRET'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| JWT Authentication Keys
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The algorithm you are using, will determine whether your tokens are
|
||||||
|
| signed with a random string (defined in `JWT_SECRET`) or using the
|
||||||
|
| following public & private keys.
|
||||||
|
|
|
||||||
|
| Symmetric Algorithms:
|
||||||
|
| HS256, HS384 & HS512 will use `JWT_SECRET`.
|
||||||
|
|
|
||||||
|
| Asymmetric Algorithms:
|
||||||
|
| RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'keys' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Public Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| A path or resource to your public key.
|
||||||
|
|
|
||||||
|
| E.g. 'file://path/to/public/key'
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'public' => env('JWT_PUBLIC_KEY'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Private Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| A path or resource to your private key.
|
||||||
|
|
|
||||||
|
| E.g. 'file://path/to/private/key'
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'private' => env('JWT_PRIVATE_KEY'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Passphrase
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The passphrase for your private key. Can be null if none set.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'passphrase' => env('JWT_PASSPHRASE'),
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| JWT time to live
|
| JWT time to live
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Specify the length of time (in minutes) that the token will be valid for.
|
| Specify the length of time (in minutes) that the token will be valid for.
|
||||||
| Defaults to 1 hour
|
| Defaults to 1 hour.
|
||||||
|
|
|
||||||
|
| You can also set this to null, to yield a never expiring token.
|
||||||
|
| Some people may want this behaviour for e.g. a mobile app.
|
||||||
|
| This is not particularly recommended, so make sure you have appropriate
|
||||||
|
| systems in place to revoke the token if necessary.
|
||||||
|
| Notice: If you set this to null you should remove 'exp' element from 'required_claims' list.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'ttl' => 4,
|
|
||||||
|
'ttl' => env('JWT_TTL', 60),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Refresh time to live
|
| Refresh time to live
|
||||||
@@ -31,10 +111,17 @@ return [
|
|||||||
| Specify the length of time (in minutes) that the token can be refreshed
|
| Specify the length of time (in minutes) that the token can be refreshed
|
||||||
| within. I.E. The user can refresh their token within a 2 week window of
|
| within. I.E. The user can refresh their token within a 2 week window of
|
||||||
| the original token being created until they must re-authenticate.
|
| the original token being created until they must re-authenticate.
|
||||||
| Defaults to 2 weeks
|
| Defaults to 2 weeks.
|
||||||
|
|
|
||||||
|
| You can also set this to null, to yield an infinite refresh time.
|
||||||
|
| Some may want this instead of never expiring tokens for e.g. a mobile app.
|
||||||
|
| This is not particularly recommended, so make sure you have appropriate
|
||||||
|
| systems in place to revoke the token if necessary.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'refresh_ttl' => 20160,
|
|
||||||
|
'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| JWT hashing algorithm
|
| JWT hashing algorithm
|
||||||
@@ -42,31 +129,13 @@ return [
|
|||||||
|
|
|
|
||||||
| Specify the hashing algorithm that will be used to sign the token.
|
| Specify the hashing algorithm that will be used to sign the token.
|
||||||
|
|
|
|
||||||
| See here: https://github.com/namshi/jose/tree/2.2.0/src/Namshi/JOSE/Signer
|
| See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL
|
||||||
| for possible values
|
| for possible values.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'algo' => 'HS256',
|
|
||||||
/*
|
'algo' => env('JWT_ALGO', 'HS256'),
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| User Model namespace
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Specify the full namespace to your User model.
|
|
||||||
| e.g. 'Acme\Entities\User'
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'user' => 'App\User',
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| User identifier
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Specify a unique property of the user that will be added as the 'sub'
|
|
||||||
| claim of the token payload.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'identifier' => 'id',
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Required Claims
|
| Required Claims
|
||||||
@@ -77,17 +146,115 @@ return [
|
|||||||
| present in the payload.
|
| present in the payload.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'required_claims' => ['iss', 'iat', 'exp', 'nbf', 'sub', 'jti'],
|
|
||||||
|
'required_claims' => [
|
||||||
|
'iss',
|
||||||
|
'iat',
|
||||||
|
'exp',
|
||||||
|
'nbf',
|
||||||
|
'sub',
|
||||||
|
'jti',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Persistent Claims
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specify the claim keys to be persisted when refreshing a token.
|
||||||
|
| `sub` and `iat` will automatically be persisted, in
|
||||||
|
| addition to the these claims.
|
||||||
|
|
|
||||||
|
| Note: If a claim does not exist then it will be ignored.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'persistent_claims' => [
|
||||||
|
// 'foo',
|
||||||
|
// 'bar',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Lock Subject
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This will determine whether a `prv` claim is automatically added to
|
||||||
|
| the token. The purpose of this is to ensure that if you have multiple
|
||||||
|
| authentication models e.g. `App\User` & `App\OtherPerson`, then we
|
||||||
|
| should prevent one authentication request from impersonating another,
|
||||||
|
| if 2 tokens happen to have the same id across the 2 different models.
|
||||||
|
|
|
||||||
|
| Under specific circumstances, you may want to disable this behaviour
|
||||||
|
| e.g. if you only have one authentication model, then you would save
|
||||||
|
| a little on token size.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lock_subject' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Leeway
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This property gives the jwt timestamp claims some "leeway".
|
||||||
|
| Meaning that if you have any unavoidable slight clock skew on
|
||||||
|
| any of your servers then this will afford you some level of cushioning.
|
||||||
|
|
|
||||||
|
| This applies to the claims `iat`, `nbf` and `exp`.
|
||||||
|
|
|
||||||
|
| Specify in seconds - only if you know you need it.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'leeway' => env('JWT_LEEWAY', 0),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Blacklist Enabled
|
| Blacklist Enabled
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| In order to invalidate tokens, you must have the the blacklist enabled.
|
| In order to invalidate tokens, you must have the blacklist enabled.
|
||||||
| If you do not want or need this functionality, then set this to false.
|
| If you do not want or need this functionality, then set this to false.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
|
'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Blacklist Grace Period
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When multiple concurrent requests are made with the same JWT,
|
||||||
|
| it is possible that some of them fail, due to token regeneration
|
||||||
|
| on every request.
|
||||||
|
|
|
||||||
|
| Set grace period in seconds to prevent parallel request failure.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cookies encryption
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default Laravel encrypt cookies for security reason.
|
||||||
|
| If you decide to not decrypt cookies, you will have to configure Laravel
|
||||||
|
| to not encrypt your cookie token by adding its name into the $except
|
||||||
|
| array available in the middleware "EncryptCookies" provided by Laravel.
|
||||||
|
| see https://laravel.com/docs/master/responses#cookies-and-encryption
|
||||||
|
| for details.
|
||||||
|
|
|
||||||
|
| Set it to true if you want to decrypt cookies.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'decrypt_cookies' => false,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Providers
|
| Providers
|
||||||
@@ -96,19 +263,9 @@ return [
|
|||||||
| Specify the various providers used throughout the package.
|
| Specify the various providers used throughout the package.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'providers' => [
|
'providers' => [
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| User Provider
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Specify the provider that is used to find the user based
|
|
||||||
| on the subject claim
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'user' => 'Tymon\JWTAuth\Providers\User\EloquentUserAdapter',
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| JWT Provider
|
| JWT Provider
|
||||||
@@ -117,7 +274,9 @@ return [
|
|||||||
| Specify the provider that is used to create and decode the tokens.
|
| Specify the provider that is used to create and decode the tokens.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'jwt' => 'Tymon\JWTAuth\Providers\JWT\NamshiAdapter',
|
|
||||||
|
'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Authentication Provider
|
| Authentication Provider
|
||||||
@@ -126,19 +285,20 @@ return [
|
|||||||
| Specify the provider that is used to authenticate users.
|
| Specify the provider that is used to authenticate users.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'auth' => function ($app) {
|
|
||||||
return new Tymon\JWTAuth\Providers\Auth\IlluminateAuthAdapter($app['auth']);
|
'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
|
||||||
},
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Storage Provider
|
| Storage Provider
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Specify the provider that is used to store tokens in the blacklist
|
| Specify the provider that is used to store tokens in the blacklist.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'storage' => function ($app) {
|
|
||||||
return new Tymon\JWTAuth\Providers\Storage\IlluminateCacheAdapter($app['cache']);
|
'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
|
||||||
},
|
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@@ -2,140 +2,142 @@
|
|||||||
|
|
||||||
//Iso codes for languages
|
//Iso codes for languages
|
||||||
return [
|
return [
|
||||||
'aa' => 'Afar',
|
'aa' => ['Afar', 'ʿAfár af'],
|
||||||
'ab' => 'Abkhazian',
|
'ab' => ['Abkhazian', 'аҧсшәа'],
|
||||||
'af' => 'Afrikaans',
|
'af' => ['Afrikaans', 'Afrikaans'],
|
||||||
'am' => 'Amharic',
|
'am' => ['Amharic', 'አማርኛ'],
|
||||||
'ar' => 'Arabic',
|
'ar' => ['Arabic', 'العربية'],
|
||||||
'as' => 'Assamese',
|
'as' => ['Assamese', 'অসমীয়া'],
|
||||||
'ay' => 'Aymara',
|
'ay' => ['Aymara', 'aymar aru'],
|
||||||
'az' => 'Azerbaijani',
|
'az' => ['Azerbaijani', 'azərbaycan dili'],
|
||||||
'ba' => 'Bashkir',
|
'ba' => ['Bashkir', 'башҡорт теле'],
|
||||||
'be' => 'Byelorussian',
|
'be' => ['Byelorussian', 'беларуская мова'],
|
||||||
'bg' => 'Bulgarian',
|
'bg' => ['Bulgarian', 'български език'],
|
||||||
'bh' => 'Bihari',
|
'bh' => ['Bihari', 'भोजपुरी'],
|
||||||
'bi' => 'Bislama',
|
'bi' => ['Bislama', 'Bislama'],
|
||||||
'bn' => 'Bengali',
|
'bn' => ['Bengali', 'বাংলা'],
|
||||||
'bo' => 'Tibetan',
|
'bo' => ['Tibetan', 'བོད་ཡིག'],
|
||||||
'br' => 'Breton',
|
'br' => ['Breton', 'brezhoneg'],
|
||||||
'ca' => 'Catalan',
|
'ca' => ['Catalan', 'català'],
|
||||||
'co' => 'Corsican',
|
'co' => ['Corsican', 'corsu, lingua corsa'],
|
||||||
'cs' => 'Czech',
|
'cs' => ['Czech', 'čeština, český jazyk'],
|
||||||
'cy' => 'Welsh',
|
'cy' => ['Welsh', 'Cymraeg'],
|
||||||
'da' => 'Danish',
|
'da' => ['Danish', 'dansk'],
|
||||||
'de' => 'German',
|
'de' => ['German', 'Deutsch'],
|
||||||
'dz' => 'Bhutani',
|
'dz' => ['Bhutani', 'རྫོང་ཁ་'],
|
||||||
'el' => 'Greek',
|
'el' => ['Greek', 'ελληνικά'],
|
||||||
'en' => 'English',
|
'en' => ['English', 'English'],
|
||||||
'eo' => 'Esperanto',
|
'eo' => ['Esperanto', 'Esperanto'],
|
||||||
'es' => 'Spanish',
|
'es' => ['Spanish', 'Español'],
|
||||||
'et' => 'Estonian',
|
'et' => ['Estonian', 'eesti'],
|
||||||
'eu' => 'Basque',
|
'eu' => ['Basque', 'euskara'],
|
||||||
'fa' => 'Persian',
|
'fa' => ['Persian', 'فارسی'],
|
||||||
'fi' => 'Finnish',
|
'fi' => ['Finnish', 'suomi'],
|
||||||
'fj' => 'Fiji',
|
'fj' => ['Fiji', 'vosa Vakaviti'],
|
||||||
'fo' => 'Faeroese',
|
'fo' => ['Faeroese', 'føroyskt'],
|
||||||
'fr' => 'French',
|
'fr' => ['French', 'français'],
|
||||||
'fy' => 'Frisian',
|
'fy' => ['Frisian', 'Frysk'],
|
||||||
'ga' => 'Irish',
|
'ga' => ['Irish', 'Gaeilge'],
|
||||||
'gd' => 'Gaelic',
|
'gd' => ['Gaelic', 'ɡɔɪˈdɛlɪk'],
|
||||||
'gl' => 'Galician',
|
'gl' => ['Galician', 'Galego'],
|
||||||
'gn' => 'Guarani',
|
'gn' => ['Guarani', 'Avañ\'eẽ'],
|
||||||
'gu' => 'Gujarati',
|
'gu' => ['Gujarati', 'ગુજરાતી'],
|
||||||
'ha' => 'Hausa',
|
'ha' => ['Hausa', 'هَوُسَ'],
|
||||||
'hi' => 'Hindi',
|
'hi' => ['Hindi', 'हिन्दी'],
|
||||||
'hr' => 'Croatian',
|
'hr' => ['Croatian', 'hrvatski jezik'],
|
||||||
'hu' => 'Hungarian',
|
'hu' => ['Hungarian', 'magyar'],
|
||||||
'hy' => 'Armenian',
|
'hy' => ['Armenian', 'Հայերեն'],
|
||||||
'ia' => 'Interlingua',
|
'ia' => ['Interlingua', 'Interlingua'],
|
||||||
'ie' => 'Interlingue',
|
'ie' => ['Interlingue', 'Interlingue'],
|
||||||
'ik' => 'Inupiak',
|
'ik' => ['Inupiak', 'Iñupiaq'],
|
||||||
'in' => 'Indonesian',
|
'id' => ['Indonesian', 'Bahasa Indonesia'],
|
||||||
'is' => 'Icelandic',
|
'is' => ['Icelandic', 'Íslenska'],
|
||||||
'it' => 'Italian',
|
'it' => ['Italian', 'Italiano'],
|
||||||
'iw' => 'Hebrew',
|
'he' => ['Hebrew', 'עברית'],
|
||||||
'ja' => 'Japanese',
|
'ja' => ['Japanese', '日本語 [にほんご]'],
|
||||||
'ji' => 'Yiddish',
|
'yi' => ['Yiddish', 'ייִדיש'],
|
||||||
'jw' => 'Javanese',
|
'jv' => ['Javanese', 'ꦧꦱꦗꦮ'],
|
||||||
'ka' => 'Georgian',
|
'ka' => ['Georgian', 'ქართული'],
|
||||||
'kk' => 'Kazakh',
|
'kk' => ['Kazakh', 'қазақ тілі'],
|
||||||
'kl' => 'Greenlandic',
|
'kl' => ['Greenlandic', 'kalaallisut'],
|
||||||
'km' => 'Cambodian',
|
'km' => ['Cambodian', 'ខ្មែរ, ខេមរភាសា'],
|
||||||
'kn' => 'Kannada',
|
'kn' => ['Kannada', 'ಕನ್ನಡ'],
|
||||||
'ko' => 'Korean',
|
'ko' => ['Korean', '한국어'],
|
||||||
'ks' => 'Kashmiri',
|
'ks' => ['Kashmiri', 'कश्मीरी'],
|
||||||
'ku' => 'Kurdish',
|
'ku' => ['Kurdish', 'كوردی'],
|
||||||
'ky' => 'Kirghiz',
|
'ky' => ['Kirghiz', 'Кыргызча'],
|
||||||
'la' => 'Latin',
|
'la' => ['Latin', 'latine'],
|
||||||
'ln' => 'Lingala',
|
'ln' => ['Lingala', 'Lingála'],
|
||||||
'lo' => 'Laothian',
|
'lo' => ['Laothian', 'ພາສາລາວ'],
|
||||||
'lt' => 'Lithuanian',
|
'lt' => ['Lithuanian', 'lietuvių kalba'],
|
||||||
'lv' => 'Latvian',
|
'lv' => ['Latvian', 'Latviešu Valoda'],
|
||||||
'mg' => 'Malagasy',
|
'mg' => ['Malagasy', 'fiteny malagasy'],
|
||||||
'mi' => 'Maori',
|
'mi' => ['Maori', 'te reo Māori'],
|
||||||
'mk' => 'Macedonian',
|
'mk' => ['Macedonian', 'македонски јазик'],
|
||||||
'ml' => 'Malayalam',
|
'ml' => ['Malayalam', 'മലയാളം'],
|
||||||
'mn' => 'Mongolian',
|
'mn' => ['Mongolian', 'Монгол хэл'],
|
||||||
'mo' => 'Moldavian',
|
'ro' => ['Moldavian', 'Română'],
|
||||||
'mr' => 'Marathi',
|
'mr' => ['Marathi', 'मराठी'],
|
||||||
'ms' => 'Malay',
|
'ms' => ['Malay', 'Bahasa Melayu'],
|
||||||
'mt' => 'Maltese',
|
'mt' => ['Maltese', 'Malti'],
|
||||||
'my' => 'Burmese',
|
'my' => ['Burmese', 'ဗမာစာ'],
|
||||||
'na' => 'Nauru',
|
'na' => ['Nauru', 'Dorerin Naoero'],
|
||||||
'ne' => 'Nepali',
|
'ne' => ['Nepali', 'नेपाली'],
|
||||||
'nl' => 'Dutch',
|
'nl' => ['Dutch', 'Vlaams'],
|
||||||
'no' => 'Norwegian',
|
'no' => ['Norwegian', 'Norsk'],
|
||||||
'oc' => 'Occitan',
|
'oc' => ['Occitan', 'lenga d\'òc'],
|
||||||
'om' => 'Oromo',
|
'om' => ['Oromo', 'Afaan Oromoo'],
|
||||||
'or' => 'Oriya',
|
'or' => ['Oriya', 'ଓଡ଼ିଆ'],
|
||||||
'pa' => 'Punjabi',
|
'pa' => ['Punjabi', 'ਪੰਜਾਬੀ'],
|
||||||
'pl' => 'Polish',
|
'pl' => ['Polish', 'Język Polski'],
|
||||||
'ps' => 'Pashto',
|
'ps' => ['Pashto', 'پښتو'],
|
||||||
'pt' => 'Portuguese',
|
'pt' => ['Portuguese', 'Português'],
|
||||||
'qu' => 'Quechua',
|
'qu' => ['Quechua', 'Runa Simi'],
|
||||||
'rm' => 'Rhaeto-Romance',
|
'rm' => ['Rhaeto-Romance', 'Rumantsch Grischun'],
|
||||||
'rn' => 'Kirundi',
|
'rn' => ['Kirundi', 'Ikirundi'],
|
||||||
'ro' => 'Romanian',
|
'ro' => ['Romanian', 'Română'],
|
||||||
'ru' => 'Russian',
|
'ru' => ['Russian', 'Русский'],
|
||||||
'rw' => 'Kinyarwanda',
|
'rw' => ['Kinyarwanda', 'Ikinyarwanda'],
|
||||||
'sa' => 'Sanskrit',
|
'sa' => ['Sanskrit', 'संस्कृतम्'],
|
||||||
'sd' => 'Sindhi',
|
'sd' => ['Sindhi', 'सिन्धी'],
|
||||||
'sg' => 'Sangro',
|
'sg' => ['Sangro', 'yângâ tî sängö'],
|
||||||
'sh' => 'Serbo-Croatian',
|
'sh' => ['Serbo-Croatian', '/ˌsɜːrboʊkroʊˈeɪʃən, -bə-/ '],
|
||||||
'si' => 'Singhalese',
|
'si' => ['Singhalese', 'සිංහල'],
|
||||||
'sk' => 'Slovak',
|
'sk' => ['Slovak', 'Slovenčina'],
|
||||||
'sl' => 'Slovenian',
|
'sl' => ['Slovenian', 'Slovenščina'],
|
||||||
'sm' => 'Samoan',
|
'sm' => ['Samoan', 'gagana fa\'a Samoa'],
|
||||||
'sn' => 'Shona',
|
'sn' => ['Shona', 'chiShona'],
|
||||||
'so' => 'Somali',
|
'so' => ['Somali', 'Soomaaliga'],
|
||||||
'sq' => 'Albanian',
|
'sq' => ['Albanian', 'Shqip'],
|
||||||
'sr' => 'Serbian',
|
'sr' => ['Serbian', 'српски језик'],
|
||||||
'ss' => 'Siswati',
|
'ss' => ['Siswati', 'SiSwati'],
|
||||||
'st' => 'Sesotho',
|
'st' => ['Sesotho', 'Sesotho'],
|
||||||
'su' => 'Sudanese',
|
'su' => ['Sudanese', 'Basa Sunda'],
|
||||||
'sv' => 'Swedish',
|
'sv' => ['Swedish', 'Svenska'],
|
||||||
'sw' => 'Swahili',
|
'sw' => ['Swahili', 'Kiswahili'],
|
||||||
'ta' => 'Tamil',
|
'ta' => ['Tamil', 'தமிழ்'],
|
||||||
'te' => 'Tegulu',
|
'te' => ['Tegulu', 'తెలుగు'],
|
||||||
'tg' => 'Tajik',
|
'tg' => ['Tajik', 'тоҷикӣ'],
|
||||||
'th' => 'Thai',
|
'th' => ['Thai', 'ไทย'],
|
||||||
'ti' => 'Tigrinya',
|
'ti' => ['Tigrinya', 'ትግርኛ'],
|
||||||
'tk' => 'Turkmen',
|
'tk' => ['Turkmen', 'Türkmen'],
|
||||||
'tl' => 'Tagalog',
|
'tl' => ['Tagalog', 'Wikang Tagalog'],
|
||||||
'tn' => 'Setswana',
|
'tn' => ['Setswana', 'Setswana'],
|
||||||
'to' => 'Tonga',
|
'to' => ['Tonga', 'Faka Tonga'],
|
||||||
'tr' => 'Turkish',
|
'tr' => ['Turkish', 'Türkçe'],
|
||||||
'ts' => 'Tsonga',
|
'ts' => ['Tsonga', 'Xitsonga'],
|
||||||
'tt' => 'Tatar',
|
'tt' => ['Tatar', 'татар теле'],
|
||||||
'tw' => 'Twi',
|
'tw' => ['Twi', 'Twi'],
|
||||||
'uk' => 'Ukrainian',
|
'uk' => ['Ukrainian', 'Українська'],
|
||||||
'ur' => 'Urdu',
|
'ur' => ['Urdu', 'اردو'],
|
||||||
'uz' => 'Uzbek',
|
'uz' => ['Uzbek', 'Oʻzbek'],
|
||||||
'vi' => 'Vietnamese',
|
'vi' => ['Vietnamese', 'Tiếng Việt'],
|
||||||
'vo' => 'Volapuk',
|
'vo' => ['Volapuk', 'Volapük'],
|
||||||
'wo' => 'Wolof',
|
'wo' => ['Wolof', 'Wollof'],
|
||||||
'xh' => 'Xhosa',
|
'xh' => ['Xhosa', 'isiXhosa'],
|
||||||
'yo' => 'Yoruba',
|
'yo' => ['Yoruba', 'Yorùbá'],
|
||||||
'zh' => 'Chinese',
|
'zh' => ['Chinese', '中文 (Zhōngwén)'],
|
||||||
'zu' => 'Zulu',
|
'zh-hant' => ['Chinese', '中文 [Traditional]'],
|
||||||
|
'zh-hans' => ['Chinese', '中文 [Simplified]'],
|
||||||
|
'zu' => ['Zulu', 'isiZulu'],
|
||||||
];
|
];
|
||||||
|
81
config/logging.php
Normal file
81
config/logging.php
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Monolog\Handler\StreamHandler;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option defines the default log channel that gets used when writing
|
||||||
|
| messages to the logs. The name specified in this option should match
|
||||||
|
| one of the channels defined in the "channels" configuration array.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('LOG_CHANNEL', 'daily'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Channels
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the log channels for your application. Out of
|
||||||
|
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||||
|
| you a variety of powerful log handlers / formatters to utilize.
|
||||||
|
|
|
||||||
|
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||||
|
| "errorlog", "monolog",
|
||||||
|
| "custom", "stack"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'channels' => [
|
||||||
|
'stack' => [
|
||||||
|
'driver' => 'stack',
|
||||||
|
'channels' => ['single'],
|
||||||
|
],
|
||||||
|
|
||||||
|
'single' => [
|
||||||
|
'driver' => 'single',
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
'level' => 'debug',
|
||||||
|
],
|
||||||
|
|
||||||
|
'daily' => [
|
||||||
|
'driver' => 'daily',
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
'level' => 'debug',
|
||||||
|
'days' => 7,
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'driver' => 'slack',
|
||||||
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
|
'username' => 'Laravel Log',
|
||||||
|
'emoji' => ':boom:',
|
||||||
|
'level' => 'critical',
|
||||||
|
],
|
||||||
|
|
||||||
|
'stderr' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'handler' => StreamHandler::class,
|
||||||
|
'with' => [
|
||||||
|
'stream' => 'php://stderr',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'syslog' => [
|
||||||
|
'driver' => 'syslog',
|
||||||
|
'level' => 'debug',
|
||||||
|
],
|
||||||
|
|
||||||
|
'errorlog' => [
|
||||||
|
'driver' => 'errorlog',
|
||||||
|
'level' => 'debug',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
@@ -15,7 +15,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'driver' => '',
|
'driver' => env('MAIL', 'smtp'),
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| SMTP Host Address
|
| SMTP Host Address
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Model\MailJob\MailService;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
@@ -13,21 +12,15 @@ class CreateMailServicesTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('mail_services', function (Blueprint $table) {
|
Schema::create(
|
||||||
|
'mail_services',
|
||||||
|
function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('short_name');
|
$table->string('short_name');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
|
||||||
|
|
||||||
$mail = new MailService();
|
|
||||||
$services = ['smtp'=>'SMTP', 'mail'=>'Php Mail', 'sendmail'=>'Send Mail', 'mailgun'=>'Mailgun', 'mandrill'=>'Mandrill', 'log'=>'Log file'];
|
|
||||||
foreach ($services as $key=>$value) {
|
|
||||||
$mail->create([
|
|
||||||
'name' => $value,
|
|
||||||
'short_name'=> $key,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Model\MailJob\QueueService;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
@@ -13,28 +12,16 @@ class CreateQueueServicesTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('queue_services', function (Blueprint $table) {
|
Schema::create(
|
||||||
|
'queue_services',
|
||||||
|
function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('short_name');
|
$table->string('short_name');
|
||||||
$table->integer('status');
|
$table->integer('status');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
|
||||||
|
|
||||||
$queue = new QueueService();
|
|
||||||
$services = ['sync'=>'Sync', 'database'=>'Database', 'beanstalkd'=>'Beanstalkd', 'sqs'=>'SQS', 'iron'=>'Iron', 'redis'=>'Redis'];
|
|
||||||
foreach ($services as $key=>$value) {
|
|
||||||
$queue->create([
|
|
||||||
'name' => $value,
|
|
||||||
'short_name'=> $key,
|
|
||||||
'status' => 0,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
$q = $queue->where('short_name', 'sync')->first();
|
|
||||||
if ($q) {
|
|
||||||
$q->status = 1;
|
|
||||||
$q->save();
|
|
||||||
}
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -13,30 +13,15 @@ class AlterTicketSourceTable extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
if (!Schema::hasColumn('ticket_source', 'css_class')) {
|
if (!Schema::hasColumn('ticket_source', 'css_class')) {
|
||||||
Schema::table('ticket_source', function (Blueprint $table) {
|
Schema::table(
|
||||||
|
'ticket_source',
|
||||||
|
function (Blueprint $table) {
|
||||||
$table->string('css_class');
|
$table->string('css_class');
|
||||||
});
|
|
||||||
}
|
}
|
||||||
DB::table('ticket_source')->delete();
|
);
|
||||||
$values = $this->values();
|
|
||||||
foreach ($values as $value) {
|
|
||||||
DB::table('ticket_source')->insert($value);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function values()
|
|
||||||
{
|
|
||||||
return[
|
|
||||||
['name' => 'web', 'value' => 'Web', 'css_class' => 'fa fa-internet-explorer'],
|
|
||||||
['name' => 'email', 'value' => 'E-mail', 'css_class' => 'fa fa-envelope'],
|
|
||||||
['name' => 'agent', 'value' => 'Agent Panel', 'css_class' => 'fa fa-envelope'],
|
|
||||||
['name' => 'facebook', 'value' => 'Facebook', 'css_class' => 'fa fa-facebook'],
|
|
||||||
['name' => 'twitter', 'value' => 'Twitter', 'css_class' => 'fa fa-twitter'],
|
|
||||||
['name' => 'call', 'value' => 'Call', 'css_class' => 'fa fa-phone'],
|
|
||||||
['name' => 'chat', 'value' => 'Chat', 'css_class' => 'fa fa-comment'],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the migrations.
|
* Reverse the migrations.
|
||||||
*
|
*
|
||||||
|
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AlterUsersTableAddUserLanguageColumn extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table(
|
||||||
|
'users',
|
||||||
|
function (Blueprint $table) {
|
||||||
|
$table->string('user_language', 10)->default(null)->nullable();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropIfExists('user_language');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AlterEmailsTableMakeUsernameColumnNullable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('emails', function (Blueprint $table) {
|
||||||
|
$table->string('user_name')->nullable()->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('emails', function (Blueprint $table) {
|
||||||
|
$table->string('user_name')->nullable(false)->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateFaveoMailsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('faveo_mails', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->integer('email_id');
|
|
||||||
$table->string('drive');
|
|
||||||
$table->string('key');
|
|
||||||
$table->string('value');
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('faveo_mails');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateFaveoQueuesTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('faveo_queues', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->integer('service_id');
|
|
||||||
$table->string('key');
|
|
||||||
$table->string('value');
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('faveo_queues');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use App\Model\MailJob\MailService;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateMailServicesTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('mail_services', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->string('name');
|
|
||||||
$table->string('short_name');
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
|
|
||||||
$mail = new MailService();
|
|
||||||
$services = ['smtp'=>'SMTP', 'mail'=>'Php Mail', 'sendmail'=>'Send Mail', 'mailgun'=>'Mailgun', 'mandrill'=>'Mandrill', 'log'=>'Log file'];
|
|
||||||
foreach ($services as $key=>$value) {
|
|
||||||
$mail->create([
|
|
||||||
'name' => $value,
|
|
||||||
'short_name'=> $key,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('mail_services');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,48 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use App\Model\MailJob\QueueService;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateQueueServicesTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('queue_services', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->string('name');
|
|
||||||
$table->string('short_name');
|
|
||||||
$table->integer('status');
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
|
|
||||||
$queue = new QueueService();
|
|
||||||
$services = ['database'=>'Local Database', 'beanstalkd'=>'Beanstalkd', 'sqs'=>'SQS', 'iron'=>'Iron', 'redis'=>'Redis'];
|
|
||||||
$status = 0;
|
|
||||||
foreach ($services as $key=>$value) {
|
|
||||||
if ($key === 'database') {
|
|
||||||
$status = 1;
|
|
||||||
}
|
|
||||||
$queue->create([
|
|
||||||
'name' => $value,
|
|
||||||
'short_name'=> $key,
|
|
||||||
'status' => $status,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('queue_services');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateConditionsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('conditions', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->string('job');
|
|
||||||
$table->string('value');
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('conditions');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateSocialMediaTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('social_media', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->string('provider');
|
|
||||||
$table->string('key');
|
|
||||||
$table->string('value');
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('social_media');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class CreateUserAdditionalInfosTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('user_additional_infos', function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->integer('owner');
|
|
||||||
$table->string('service');
|
|
||||||
$table->string('key');
|
|
||||||
$table->string('value')->nullable();
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::drop('user_additional_infos');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class AlterTicketSourceTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
if (!Schema::hasColumn('ticket_source', 'css_class')) {
|
|
||||||
Schema::table('ticket_source', function (Blueprint $table) {
|
|
||||||
$table->string('css_class');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
DB::table('ticket_source')->delete();
|
|
||||||
$values = $this->values();
|
|
||||||
foreach ($values as $value) {
|
|
||||||
DB::table('ticket_source')->insert($value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function values()
|
|
||||||
{
|
|
||||||
return[
|
|
||||||
['name' => 'web', 'value' => 'Web', 'css_class' => 'fa fa-internet-explorer'],
|
|
||||||
['name' => 'email', 'value' => 'E-mail', 'css_class' => 'fa fa-envelope'],
|
|
||||||
['name' => 'agent', 'value' => 'Agent Panel', 'css_class' => 'fa fa-envelope'],
|
|
||||||
['name' => 'facebook', 'value' => 'Facebook', 'css_class' => 'fa fa-facebook'],
|
|
||||||
['name' => 'twitter', 'value' => 'Twitter', 'css_class' => 'fa fa-twitter'],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('ticket_source', function (Blueprint $table) {
|
|
||||||
//
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user