Release v2.0.0
This commit is contained in:
52
.env.example
Normal file
52
.env.example
Normal file
@@ -0,0 +1,52 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailhog
|
||||
MAIL_PORT=1025
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
175
.idea/community.iml
generated
Normal file
175
.idea/community.iml
generated
Normal file
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="App\" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="false" packagePrefix="Tests\" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/graham-campbell/result-type" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/laravelcollective/html" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/propaganistas/laravel-phone" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/davejamesmiller/laravel-breadcrumbs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/php-webdriver/webdriver" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/dragonmantank/cron-expression" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nicolaslopezj/searchable" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/intervention/image" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/tijsverkoyen/css-to-inline-styles" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/maatwebsite/excel" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/masterminds/html5" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nunomaduro/termwind" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nunomaduro/collision" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/type" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/cli-parser" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-enumerator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-reflector" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/complexity" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/lines-of-code" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpoption/phpoption" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/ralouphie/getallheaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/mtdowling/jmespath.php" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpoffice/phpspreadsheet" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/markbaker/complex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/markbaker/matrix" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/fruitcake/php-cors" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/maennchen/zipstream-php" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/unisharp/laravel-filemanager" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/vsmoraes/laravel-pdf" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/maximebf/debugbar" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/neitanod/forceutf8" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/lcobucci/clock" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/lcobucci/jwt" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/fakerphp/faker" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/hamcrest/hamcrest-php" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/deprecations" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/inflector" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/dbal" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/event-manager" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/theseer/tokenizer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-debugbar" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/mailer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/dom-crawler" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-grapheme" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-idn" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/console" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation-contracts" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/uid" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-kernel" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/css-selector" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-uuid" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/string" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-normalizer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/error-handler" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/mime" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/deprecation-contracts" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php72" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher-contracts" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-dumper" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php80" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-invoker" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/phpspec" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/php-diff" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/version" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/php-enum" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/mockery/mockery" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/laravel/ui" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/laravel/dusk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/laravel/tinker" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/laravel/framework" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/laravel/serializable-closure" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/laravel/socialite" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/giggsey/locale" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/giggsey/libphonenumber-for-php" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/dflydev/dot-access-data" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/egulias/email-validator" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/bugsnag/bugsnag-laravel" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/bugsnag/bugsnag-psr-logger" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/vlucas/phpdotenv" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/bugsnag/bugsnag" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/tedivm/fetch" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/torann/geoip" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/spatie/ignition" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/spatie/backtrace" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/spatie/flare-client-php" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/spatie/laravel-ignition" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/ramsey/collection" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/ramsey/uuid" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/predis/predis" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/config" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/namshi/jose" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/commonmark" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/flysystem" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/oauth1-client" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/iso3166" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/flysystem-aws-s3-v3" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/mime-type-detection" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/facade/ignition-contracts" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/flowjs/flow-php-server" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/dompdf/dompdf" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/ezyang/htmlpurifier" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/tymon/jwt-auth" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/yajra/laravel-datatables-oracle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phenx/php-font-lib" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nette/utils" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nette/schema" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/brick/math" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/mremi/url-shortener" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/filp/whoops" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/voku/portable-ascii" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psy/psysh" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-client" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-factory" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/simple-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/event-dispatcher" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/clock" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-message" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/aws/aws-crt-php" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/aws/aws-sdk-php" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
16
.idea/jsLinters/jshint.xml
generated
Normal file
16
.idea/jsLinters/jshint.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JSHintConfiguration" version="2.13.0" use-config-file="true" use-custom-config-file="true" custom-config-file-path="$PROJECT_DIR$/public/lb-faveo/plugins/moment-develop/.jshintrc">
|
||||
<option bitwise="true" />
|
||||
<option browser="true" />
|
||||
<option curly="true" />
|
||||
<option eqeqeq="true" />
|
||||
<option forin="true" />
|
||||
<option maxerr="50" />
|
||||
<option noarg="true" />
|
||||
<option noempty="true" />
|
||||
<option nonew="true" />
|
||||
<option strict="true" />
|
||||
<option undef="true" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/community.iml" filepath="$PROJECT_DIR$/.idea/community.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
14
.idea/php-test-framework.xml
generated
Normal file
14
.idea/php-test-framework.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PhpTestFrameworkSettings">
|
||||
<test_tools>
|
||||
<tool tool_name="PHPSpec">
|
||||
<settings>
|
||||
<configurations>
|
||||
<local_configuration executable_path="$PROJECT_DIR$/vendor/phpspec/phpspec/bin/phpspec" />
|
||||
</configurations>
|
||||
</settings>
|
||||
</tool>
|
||||
</test_tools>
|
||||
</component>
|
||||
</project>
|
176
.idea/php.xml
generated
Normal file
176
.idea/php.xml
generated
Normal file
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PhpIncludePathManager">
|
||||
<include_path>
|
||||
<path value="$PROJECT_DIR$/vendor/composer" />
|
||||
<path value="$PROJECT_DIR$/vendor/graham-campbell/result-type" />
|
||||
<path value="$PROJECT_DIR$/vendor/laravelcollective/html" />
|
||||
<path value="$PROJECT_DIR$/vendor/propaganistas/laravel-phone" />
|
||||
<path value="$PROJECT_DIR$/vendor/davejamesmiller/laravel-breadcrumbs" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
|
||||
<path value="$PROJECT_DIR$/vendor/php-webdriver/webdriver" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
|
||||
<path value="$PROJECT_DIR$/vendor/dragonmantank/cron-expression" />
|
||||
<path value="$PROJECT_DIR$/vendor/nicolaslopezj/searchable" />
|
||||
<path value="$PROJECT_DIR$/vendor/intervention/image" />
|
||||
<path value="$PROJECT_DIR$/vendor/tijsverkoyen/css-to-inline-styles" />
|
||||
<path value="$PROJECT_DIR$/vendor/maatwebsite/excel" />
|
||||
<path value="$PROJECT_DIR$/vendor/masterminds/html5" />
|
||||
<path value="$PROJECT_DIR$/vendor/nunomaduro/termwind" />
|
||||
<path value="$PROJECT_DIR$/vendor/nunomaduro/collision" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
|
||||
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
|
||||
<path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/type" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/cli-parser" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/complexity" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
|
||||
<path value="$PROJECT_DIR$/vendor/sebastian/lines-of-code" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpoption/phpoption" />
|
||||
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
|
||||
<path value="$PROJECT_DIR$/vendor/mtdowling/jmespath.php" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpoffice/phpspreadsheet" />
|
||||
<path value="$PROJECT_DIR$/vendor/markbaker/complex" />
|
||||
<path value="$PROJECT_DIR$/vendor/markbaker/matrix" />
|
||||
<path value="$PROJECT_DIR$/vendor/fruitcake/php-cors" />
|
||||
<path value="$PROJECT_DIR$/vendor/maennchen/zipstream-php" />
|
||||
<path value="$PROJECT_DIR$/vendor/unisharp/laravel-filemanager" />
|
||||
<path value="$PROJECT_DIR$/vendor/vsmoraes/laravel-pdf" />
|
||||
<path value="$PROJECT_DIR$/vendor/maximebf/debugbar" />
|
||||
<path value="$PROJECT_DIR$/vendor/neitanod/forceutf8" />
|
||||
<path value="$PROJECT_DIR$/vendor/lcobucci/clock" />
|
||||
<path value="$PROJECT_DIR$/vendor/lcobucci/jwt" />
|
||||
<path value="$PROJECT_DIR$/vendor/fakerphp/faker" />
|
||||
<path value="$PROJECT_DIR$/vendor/hamcrest/hamcrest-php" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/deprecations" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/inflector" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/dbal" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/event-manager" />
|
||||
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
|
||||
<path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
|
||||
<path value="$PROJECT_DIR$/vendor/barryvdh/laravel-debugbar" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/mailer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/dom-crawler" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-grapheme" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-idn" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/console" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/routing" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/translation" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/uid" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-kernel" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/css-selector" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-uuid" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/string" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-normalizer" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/error-handler" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/mime" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/service-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php72" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/http-foundation" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/var-dumper" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/yaml" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/process" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
|
||||
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php80" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-invoker" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpspec/phpspec" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
|
||||
<path value="$PROJECT_DIR$/vendor/phpspec/php-diff" />
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/version" />
|
||||
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
|
||||
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
|
||||
<path value="$PROJECT_DIR$/vendor/myclabs/php-enum" />
|
||||
<path value="$PROJECT_DIR$/vendor/mockery/mockery" />
|
||||
<path value="$PROJECT_DIR$/vendor/monolog/monolog" />
|
||||
<path value="$PROJECT_DIR$/vendor/laravel/ui" />
|
||||
<path value="$PROJECT_DIR$/vendor/laravel/dusk" />
|
||||
<path value="$PROJECT_DIR$/vendor/laravel/tinker" />
|
||||
<path value="$PROJECT_DIR$/vendor/laravel/framework" />
|
||||
<path value="$PROJECT_DIR$/vendor/laravel/serializable-closure" />
|
||||
<path value="$PROJECT_DIR$/vendor/laravel/socialite" />
|
||||
<path value="$PROJECT_DIR$/vendor/giggsey/locale" />
|
||||
<path value="$PROJECT_DIR$/vendor/giggsey/libphonenumber-for-php" />
|
||||
<path value="$PROJECT_DIR$/vendor/dflydev/dot-access-data" />
|
||||
<path value="$PROJECT_DIR$/vendor/egulias/email-validator" />
|
||||
<path value="$PROJECT_DIR$/vendor/bugsnag/bugsnag-laravel" />
|
||||
<path value="$PROJECT_DIR$/vendor/bugsnag/bugsnag-psr-logger" />
|
||||
<path value="$PROJECT_DIR$/vendor/vlucas/phpdotenv" />
|
||||
<path value="$PROJECT_DIR$/vendor/bugsnag/bugsnag" />
|
||||
<path value="$PROJECT_DIR$/vendor/tedivm/fetch" />
|
||||
<path value="$PROJECT_DIR$/vendor/torann/geoip" />
|
||||
<path value="$PROJECT_DIR$/vendor/spatie/ignition" />
|
||||
<path value="$PROJECT_DIR$/vendor/spatie/backtrace" />
|
||||
<path value="$PROJECT_DIR$/vendor/spatie/flare-client-php" />
|
||||
<path value="$PROJECT_DIR$/vendor/spatie/laravel-ignition" />
|
||||
<path value="$PROJECT_DIR$/vendor/ramsey/collection" />
|
||||
<path value="$PROJECT_DIR$/vendor/ramsey/uuid" />
|
||||
<path value="$PROJECT_DIR$/vendor/nesbot/carbon" />
|
||||
<path value="$PROJECT_DIR$/vendor/predis/predis" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/config" />
|
||||
<path value="$PROJECT_DIR$/vendor/namshi/jose" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/commonmark" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/flysystem" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/oauth1-client" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/iso3166" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/flysystem-aws-s3-v3" />
|
||||
<path value="$PROJECT_DIR$/vendor/league/mime-type-detection" />
|
||||
<path value="$PROJECT_DIR$/vendor/facade/ignition-contracts" />
|
||||
<path value="$PROJECT_DIR$/vendor/flowjs/flow-php-server" />
|
||||
<path value="$PROJECT_DIR$/vendor/dompdf/dompdf" />
|
||||
<path value="$PROJECT_DIR$/vendor/ezyang/htmlpurifier" />
|
||||
<path value="$PROJECT_DIR$/vendor/tymon/jwt-auth" />
|
||||
<path value="$PROJECT_DIR$/vendor/yajra/laravel-datatables-oracle" />
|
||||
<path value="$PROJECT_DIR$/vendor/nikic/php-parser" />
|
||||
<path value="$PROJECT_DIR$/vendor/phenx/php-font-lib" />
|
||||
<path value="$PROJECT_DIR$/vendor/nette/utils" />
|
||||
<path value="$PROJECT_DIR$/vendor/nette/schema" />
|
||||
<path value="$PROJECT_DIR$/vendor/brick/math" />
|
||||
<path value="$PROJECT_DIR$/vendor/mremi/url-shortener" />
|
||||
<path value="$PROJECT_DIR$/vendor/filp/whoops" />
|
||||
<path value="$PROJECT_DIR$/vendor/voku/portable-ascii" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/log" />
|
||||
<path value="$PROJECT_DIR$/vendor/psy/psysh" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-client" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-factory" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/clock" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
|
||||
<path value="$PROJECT_DIR$/vendor/psr/container" />
|
||||
<path value="$PROJECT_DIR$/vendor/aws/aws-crt-php" />
|
||||
<path value="$PROJECT_DIR$/vendor/aws/aws-sdk-php" />
|
||||
</include_path>
|
||||
</component>
|
||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.2" />
|
||||
<component name="PhpUnit">
|
||||
<phpunit_settings>
|
||||
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" />
|
||||
</phpunit_settings>
|
||||
</component>
|
||||
</project>
|
10
.idea/phpunit.xml
generated
Normal file
10
.idea/phpunit.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PHPUnit">
|
||||
<option name="directories">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/tests" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
20
README.md
20
README.md
@@ -22,12 +22,12 @@ Faveo can be customised according to requirement and we do undertake such reques
|
||||
|
||||
Flavors of Faveo
|
||||
--------------------------
|
||||
* Faveo Community Edition – Free, Open source edition
|
||||
* Faveo Freelancer - Free version with features available in Faveo Pro Edition for two agents
|
||||
* Faveo Pro Edition – Paid version with many advance features and integrations
|
||||
* Faveo Help Desk Community Edition – Free, Open source edition
|
||||
* Faveo Help Desk Freelancer - Free version with features available in Faveo Enterprise Edition for two agents
|
||||
* Faveo Help Desk Enterprise Edition – Paid version with many advance features and integrations
|
||||
* Faveo Service Desk - Paid version for IT Assest management
|
||||
|
||||
[View complete comparision list of all flavors of Faveo to select the most suitable solution for your business](https://www.faveohelpdesk.com/pricing-india/)
|
||||
[View complete comparision list of all flavors of Faveo to select the most suitable solution for your business](https://www.faveohelpdesk.com/pricing/)
|
||||
|
||||
Faveo Documentation
|
||||
--------------------------
|
||||
@@ -40,8 +40,8 @@ Requirements
|
||||
--------------------------
|
||||
To run Faveo your host just needs a couple of things:
|
||||
|
||||
* PHP Version: 7.1+
|
||||
* Database: MySQL 5.0+
|
||||
* PHP Version: 8.1+
|
||||
* Database: MySQL 8.0.x or MariaDB 10.6.x
|
||||
* Web Server: Apache / IIS / Nginx
|
||||
* PHP Extensions: Imap, Mbstring, Mcrypt, OpenSSL, PDO, Tokenizer, XML, Zip
|
||||
* Web Server Extension: Pretty URLs or Search Engine Friendly URLs have to be enabled in your web server configuration
|
||||
@@ -85,7 +85,7 @@ If you are using our product and want to support us <a href="https://github.com/
|
||||
Language translate
|
||||
--------------------------
|
||||
Help us translate Faveo into your native language <a href="https://github.com/ladybirdweb/faveo-helpdesk/wiki/Help-in-language-translate" target="_blank">Click here</a><br/>
|
||||
We are following Laravel <a href="https://laravel.com/docs/5.2/localization">localization</a> module, you can create language file in your branch and send a pull request.
|
||||
We are following Laravel <a href="https://laravel.com/docs/9.x/localization">localization</a> module, you can create language file in your branch and send a pull request.
|
||||
|
||||
Contributing
|
||||
--------------------------
|
||||
@@ -101,12 +101,8 @@ Help
|
||||
--------------------------
|
||||
Visit the <a href="https://github.com/ladybirdweb/faveo-helpdesk/issues">issue</a> page. And if you'd like professional help commercial support is available, email us through the <a href="http://www.faveohelpdesk.com/contact-us/">contact form</a>.
|
||||
|
||||
Download Faveo mobile apps
|
||||
--------------------------
|
||||
|
||||
<a href='https://play.google.com/store/apps/details?id=co.helpdesk.faveo&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1' target="_blank"><img alt='Get it on Google Play' src='http://www.faveohelpdesk.com/wp-content/uploads/2016/12/google-1.png' width="200px"/></a> <a href="https://appsto.re/in/cTjQgb.i" target="_blank"><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/apple.png" width="200px"/></a>
|
||||
|
||||
|
||||
Follow Us
|
||||
--------------------------
|
||||
<a href="https://www.facebook.com/faveohelpdesk" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/fb.png" /></a> <a href="https://twitter.com/faveohelpdesk" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/twitter.png" /></a> <a href="https://www.linkedin.com/company/627599" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/linkedin.png" /></a> <a href="https://www.youtube.com/channel/UC-eqh-h241b1janp6sU7Iiw" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/youtube.png" /></a> <a href="https://plus.google.com/117596052965493985407" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/google.png" /></a>
|
||||
<a href="https://www.facebook.com/faveohelpdesk" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/fb.png" /></a> <a href="https://twitter.com/faveohelpdesk" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/twitter.png" /></a> <a href="https://www.linkedin.com/showcase/faveohelpdesk/" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/linkedin.png" /></a> <a href="https://www.youtube.com/channel/UC-eqh-h241b1janp6sU7Iiw" ><img src="http://www.faveohelpdesk.com/wp-content/uploads/2016/12/youtube.png" /></a>
|
||||
|
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Common;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
* ================================================================================================
|
||||
* @version v1
|
||||
@@ -8,59 +11,59 @@
|
||||
* @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']);
|
||||
Route::prefix('api/v1')->group(function () {
|
||||
Route::post('authenticate', [\App\Api\v1\TokenAuthController::class, 'authenticate']);
|
||||
Route::get('authenticate/user', [\App\Api\v1\TokenAuthController::class, 'getAuthenticatedUser']);
|
||||
Route::get('/database-config', [\App\Api\v1\InstallerApiController::class, 'config_database'])->name('database-config');
|
||||
Route::get('/system-config', [\App\Api\v1\InstallerApiController::class, 'config_system'])->name('database-config');
|
||||
/*
|
||||
* 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');
|
||||
Route::prefix('helpdesk')->group(function () {
|
||||
Route::post('create', [\App\Api\v1\ApiController::class, 'createTicket']);
|
||||
Route::post('reply', [\App\Api\v1\ApiController::class, 'ticketReply']);
|
||||
Route::post('edit', [\App\Api\v1\ApiController::class, 'editTicket']);
|
||||
Route::post('delete', [\App\Api\v1\ApiController::class, 'deleteTicket']);
|
||||
Route::post('assign', [\App\Api\v1\ApiController::class, 'assignTicket']);
|
||||
Route::get('open', [\App\Api\v1\ApiController::class, 'openedTickets']);
|
||||
Route::get('unassigned', [\App\Api\v1\ApiController::class, 'unassignedTickets']);
|
||||
Route::get('closed', [\App\Api\v1\ApiController::class, 'closeTickets']);
|
||||
Route::get('agents', [\App\Api\v1\ApiController::class, 'getAgents']);
|
||||
Route::get('teams', [\App\Api\v1\ApiController::class, 'getTeams']);
|
||||
Route::get('customers', [\App\Api\v1\ApiController::class, 'getCustomers']);
|
||||
Route::get('customer', [\App\Api\v1\ApiController::class, 'getCustomer']);
|
||||
Route::get('ticket-search', [\App\Api\v1\ApiController::class, 'searchTicket']);
|
||||
Route::get('ticket-thread', [\App\Api\v1\ApiController::class, 'ticketThreads']);
|
||||
Route::get('url', [\App\Api\v1\ApiExceptAuthController::class, 'checkUrl']);
|
||||
Route::get('check-url', [\App\Api\v1\ApiExceptAuthController::class, 'urlResult']);
|
||||
Route::get('api_key', [\App\Api\v1\ApiController::class, 'generateApiKey']);
|
||||
Route::get('help-topic', [\App\Api\v1\ApiController::class, 'getHelpTopic']);
|
||||
Route::get('sla-plan', [\App\Api\v1\ApiController::class, 'getSlaPlan']);
|
||||
Route::get('priority', [\App\Api\v1\ApiController::class, 'getPriority']);
|
||||
Route::get('department', [\App\Api\v1\ApiController::class, 'getDepartment']);
|
||||
Route::get('tickets', [\App\Api\v1\ApiController::class, 'getTickets']);
|
||||
Route::get('ticket', [\App\Api\v1\ApiController::class, 'getTicketById']);
|
||||
Route::get('inbox', [\App\Api\v1\ApiController::class, 'inbox']);
|
||||
Route::get('trash', [\App\Api\v1\ApiController::class, 'getTrash']);
|
||||
Route::get('my-tickets-agent', [\App\Api\v1\ApiController::class, 'getMyTicketsAgent']);
|
||||
Route::post('internal-note', [\App\Api\v1\ApiController::class, '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');
|
||||
Route::get('customers-custom', [\App\Api\v1\ApiController::class, 'getCustomersWith']);
|
||||
Route::get('collaborator/search', [\App\Api\v1\ApiController::class, 'collaboratorSearch']);
|
||||
Route::post('collaborator/create', [\App\Api\v1\ApiController::class, 'addCollaboratorForTicket']);
|
||||
Route::post('collaborator/remove', [\App\Api\v1\ApiController::class, 'deleteCollaborator']);
|
||||
Route::post('collaborator/get-ticket', [\App\Api\v1\ApiController::class, 'getCollaboratorForTicket']);
|
||||
Route::get('my-tickets-user', [\App\Api\v1\ApiController::class, 'getMyTicketsUser']);
|
||||
Route::get('dependency', [\App\Api\v1\ApiController::class, 'dependency']);
|
||||
Route::post('register', [\App\Api\v1\ApiController::class, 'createUser']);
|
||||
});
|
||||
|
||||
/*
|
||||
* FCM token response
|
||||
*/
|
||||
Route::post('fcmtoken', ['as' => 'fcmtoken', 'uses' => 'Common\PushNotificationController@fcmToken']);
|
||||
Route::post('fcmtoken', [Common\PushNotificationController::class, 'fcmToken'])->name('fcmtoken');
|
||||
});
|
||||
/*
|
||||
* ================================================================================================
|
||||
@@ -70,11 +73,11 @@
|
||||
* @author Manish Verma<manish.verma@ladybirdweb.com>
|
||||
* @name Faveo
|
||||
*/
|
||||
Route::group(['prefix' => 'api/v2'], function () {
|
||||
Route::prefix('api/v2')->group(function () {
|
||||
/*
|
||||
* Helpdesk
|
||||
*/
|
||||
Route::group(['prefix' => 'helpdesk'], function () {
|
||||
Route::get('tickets', '\App\Api\v2\TicketController@getTickets');
|
||||
Route::prefix('helpdesk')->group(function () {
|
||||
Route::get('tickets', [\App\Api\v2\TicketController::class, 'getTickets']);
|
||||
});
|
||||
});
|
||||
|
@@ -4,9 +4,9 @@ namespace App\Api\v1;
|
||||
|
||||
use App\Http\Controllers\Agent\helpdesk\TicketController as CoreTicketController;
|
||||
use App\Http\Controllers\Controller;
|
||||
//use Illuminate\Support\Facades\Request as Value;
|
||||
use App\Http\Requests\helpdesk\TicketRequest;
|
||||
use App\Model\helpdesk\Agent\Department;
|
||||
//use Illuminate\Support\Facades\Request as Value;
|
||||
use App\Model\helpdesk\Agent\Teams;
|
||||
use App\Model\helpdesk\Manage\Help_topic;
|
||||
use App\Model\helpdesk\Manage\Sla_plan;
|
||||
@@ -21,6 +21,8 @@ use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* -----------------------------------------------------------------------------
|
||||
@@ -37,19 +39,33 @@ use Illuminate\Support\Collection;
|
||||
class ApiController extends Controller
|
||||
{
|
||||
public $user;
|
||||
|
||||
public $request;
|
||||
|
||||
public $ticket;
|
||||
|
||||
public $model;
|
||||
|
||||
public $thread;
|
||||
|
||||
public $attach;
|
||||
|
||||
public $ticketRequest;
|
||||
|
||||
public $faveoUser;
|
||||
|
||||
public $team;
|
||||
|
||||
public $setting;
|
||||
|
||||
public $helptopic;
|
||||
|
||||
public $slaPlan;
|
||||
|
||||
public $department;
|
||||
|
||||
public $priority;
|
||||
|
||||
public $source;
|
||||
|
||||
/**
|
||||
@@ -717,8 +733,8 @@ class ApiController extends Controller
|
||||
}
|
||||
|
||||
$url = $this->request->input('url');
|
||||
if (!str_is('*/', $url)) {
|
||||
$url = str_finish($url, '/');
|
||||
if (!Str::is('*/', $url)) {
|
||||
$url = Str::finish($url, '/');
|
||||
}
|
||||
|
||||
$url = $url.'/api/v1/helpdesk/check-url?api_key='.$this->request->input('api_key').'&token='.\Config::get('app.token');
|
||||
@@ -807,7 +823,7 @@ class ApiController extends Controller
|
||||
$set = $this->setting->where('id', '1')->first();
|
||||
//dd($set);
|
||||
if ($set->api_enable == 1) {
|
||||
$key = str_random(32);
|
||||
$key = Str::random(32);
|
||||
$set->api_key = $key;
|
||||
$set->save();
|
||||
$result = $set->api_key;
|
||||
@@ -1407,7 +1423,7 @@ class ApiController extends Controller
|
||||
{
|
||||
try {
|
||||
$v = \Validator::make(
|
||||
\Input::get(),
|
||||
Input::all(),
|
||||
[
|
||||
'email' => 'required|email|unique:users',
|
||||
'ticket_id' => 'required',
|
||||
@@ -1440,7 +1456,7 @@ class ApiController extends Controller
|
||||
{
|
||||
try {
|
||||
$v = \Validator::make(
|
||||
\Input::get(),
|
||||
Input::all(),
|
||||
[
|
||||
'ticket_id' => 'required',
|
||||
]
|
||||
@@ -1472,7 +1488,7 @@ class ApiController extends Controller
|
||||
{
|
||||
try {
|
||||
$v = \Validator::make(
|
||||
\Input::get(),
|
||||
Input::all(),
|
||||
[
|
||||
'ticketid' => 'required',
|
||||
'email' => 'required',
|
||||
@@ -1544,11 +1560,11 @@ class ApiController extends Controller
|
||||
->value('my_ticket');
|
||||
$depend = collect([['name' => 'unassigned', 'count' => $unassigned], ['name' => 'mytickets', 'count' => $mytickets]]);
|
||||
$collection = $statuses->merge($depend);
|
||||
$result = ['departments' => $department, 'sla' => $sla, 'staffs' => $staff, 'teams' => $team,
|
||||
'priorities' => $priority, 'helptopics' => $helptopic,
|
||||
'status' => $status,
|
||||
'sources' => $source,
|
||||
'tickets_count' => $collection, ];
|
||||
$result = ['departments' => $department, 'sla' => $sla, 'staffs' => $staff, 'teams' => $team,
|
||||
'priorities' => $priority, 'helptopics' => $helptopic,
|
||||
'status' => $status,
|
||||
'sources' => $source,
|
||||
'tickets_count' => $collection, ];
|
||||
|
||||
return response()->json(compact('result'));
|
||||
// $result = ['departments' => $department, 'sla' => $sla, 'staffs' => $staff, 'teams' => $team,
|
||||
@@ -1652,7 +1668,7 @@ class ApiController extends Controller
|
||||
|
||||
return response()->json(compact('error'));
|
||||
}
|
||||
$str = str_random(8);
|
||||
$str = Str::random(8);
|
||||
$array = ['password' => $str, 'password_confirmation' => $str, 'email' => $this->request->input('email'), 'full_name' => $this->request->input('first_name')];
|
||||
$all = $this->request->input();
|
||||
$merged = $array + $all;
|
||||
|
@@ -4,6 +4,7 @@ namespace App\Api\v1;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ApiExceptAuthController extends Controller
|
||||
{
|
||||
@@ -34,8 +35,8 @@ class ApiExceptAuthController extends Controller
|
||||
}
|
||||
|
||||
$url = $this->request->input('url');
|
||||
if (!str_is('*/', $url)) {
|
||||
$url = str_finish($url, '/');
|
||||
if (!Str::is('*/', $url)) {
|
||||
$url = Str::finish($url, '/');
|
||||
}
|
||||
|
||||
$url = $url.'api/v1/helpdesk/check-url';
|
||||
|
@@ -92,14 +92,14 @@ class InstallerApiController extends Controller
|
||||
$ENV['DB_USERNAME'] = $dbusername;
|
||||
$ENV['DB_PASSWORD'] = $dbpassword;
|
||||
$ENV['DB_INSTALL'] = '%0%';
|
||||
$ENV['MAIL_DRIVER'] = 'smtp';
|
||||
$ENV['MAIL_MAILER'] = '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';
|
||||
$ENV['QUEUE_CONNECTION'] = 'sync';
|
||||
$ENV['JWT_TTL'] = 4;
|
||||
$ENV['FCM_SERVER_KEY'] = 'AIzaSyCyx5OFnsRFUmDLTMbPV50ZMDUGSG-bLw4';
|
||||
$ENV['FCM_SENDER_ID'] = '661051343223';
|
||||
|
@@ -15,7 +15,7 @@ use App\Model\helpdesk\Ticket\Tickets;
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Hash;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Mail;
|
||||
|
||||
/**
|
||||
@@ -275,7 +275,7 @@ class TicketController extends Controller
|
||||
$source = $eventthread->source;
|
||||
|
||||
$form_data = $request->except('reply_content', 'ticket_ID', 'attachment');
|
||||
\Event::fire(new \App\Events\ClientTicketFormPost($form_data, $emailadd, $source));
|
||||
event(new \App\Events\ClientTicketFormPost($form_data, $emailadd, $source));
|
||||
$reply_content = $request->input('reply_content');
|
||||
$thread->ticket_id = $request->input('ticket_id');
|
||||
$thread->poster = 'support';
|
||||
@@ -323,7 +323,7 @@ class TicketController extends Controller
|
||||
} else {
|
||||
$agentsign = null;
|
||||
}
|
||||
\Event::fire(new \App\Events\FaveoAfterReply($reply_content, $user->phone_number, $request, $tickets));
|
||||
event(new \App\Events\FaveoAfterReply($reply_content, $user->phone_number, $request, $tickets));
|
||||
|
||||
// Mail::send(array('html' => 'emails.ticket_re-reply'), ['content' => $reply_content, 'ticket_number' => $ticket_number, 'From' => $company, 'name' => $username, 'Agent_Signature' => $agentsign], function ($message) use ($email, $user_name, $ticket_number, $ticket_subject, $check_attachment) {
|
||||
// $message->to($email, $user_name)->subject($ticket_subject . '[#' . $ticket_number . ']');
|
||||
@@ -414,15 +414,15 @@ class TicketController extends Controller
|
||||
try {
|
||||
$ticket = $ticket->where('id', '=', $ticket_id)->first();
|
||||
|
||||
$ticket->sla = Input::get('sla_plan');
|
||||
$ticket->help_topic_id = Input::get('help_topic');
|
||||
$ticket->source = Input::get('ticket_source');
|
||||
$ticket->priority_id = Input::get('ticket_priority');
|
||||
$ticket->status = Input::get('status');
|
||||
$ticket->sla = Request::get('sla_plan');
|
||||
$ticket->help_topic_id = Request::get('help_topic');
|
||||
$ticket->source = Request::get('ticket_source');
|
||||
$ticket->priority_id = Request::get('ticket_priority');
|
||||
$ticket->status = Request::get('status');
|
||||
$ticket->save();
|
||||
|
||||
$threads = $thread->where('ticket_id', '=', $ticket_id)->first();
|
||||
$threads->title = Input::get('subject');
|
||||
$threads->title = Request::get('subject');
|
||||
$threads->save();
|
||||
} catch (\Exception $ex) {
|
||||
$result = $ex->getMessage();
|
||||
@@ -444,7 +444,7 @@ class TicketController extends Controller
|
||||
public function assign($id)
|
||||
{
|
||||
try {
|
||||
$UserEmail = Input::get('user');
|
||||
$UserEmail = Request::get('user');
|
||||
//dd($UserEmail);
|
||||
// $UserEmail = 'sujitprasad12@yahoo.in';
|
||||
$user = User::where('email', '=', $UserEmail)->first();
|
||||
@@ -624,7 +624,7 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function autosearch()
|
||||
{
|
||||
$term = \Input::get('term');
|
||||
$term = Request::get('term');
|
||||
$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;
|
||||
@@ -639,8 +639,8 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function useradd()
|
||||
{
|
||||
$email = Input::get('email');
|
||||
$ticket_id = Input::get('ticket_id');
|
||||
$email = Request::get('email');
|
||||
$ticket_id = Request::get('ticket_id');
|
||||
$company = $this->company();
|
||||
$user = new User();
|
||||
$user->user_name = $email;
|
||||
@@ -673,8 +673,8 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function userremove()
|
||||
{
|
||||
$email = Input::get('email');
|
||||
$ticketid = Input::get('ticketid');
|
||||
$email = Request::get('email');
|
||||
$ticketid = Request::get('ticketid');
|
||||
$user = new User();
|
||||
$user = $user->where('email', $email)->first();
|
||||
$ticket_collaborator = Ticket_Collaborator::where('ticket_id', '=', $ticketid)
|
||||
@@ -692,7 +692,7 @@ class TicketController extends Controller
|
||||
public function getCollaboratorForTicket()
|
||||
{
|
||||
try {
|
||||
$ticketid = Input::get('ticket_id');
|
||||
$ticketid = Request::get('ticket_id');
|
||||
|
||||
$ticket_collaborator = \DB::table('users')
|
||||
->join('ticket_collaborator', function ($join) use ($ticketid) {
|
||||
|
@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
use JWTAuth;
|
||||
use Tymon\JWTAuth\Exceptions\JWTException;
|
||||
|
||||
@@ -50,7 +51,7 @@ class TokenAuthController extends Controller
|
||||
//$credentials = $request->only('email', 'password');
|
||||
|
||||
try {
|
||||
if (!$token = JWTAuth::attempt([$field => $usernameinput, 'password' => $password, 'active'=>1])) {
|
||||
if (!$token = JWTAuth::attempt([$field => $usernameinput, 'password' => $password, 'active' => 1])) {
|
||||
return response()->json(['error' => 'invalid_credentials', 'status_code' => 401]);
|
||||
}
|
||||
} catch (JWTException $e) {
|
||||
@@ -168,7 +169,7 @@ class TokenAuthController extends Controller
|
||||
if (isset($user)) {
|
||||
$user1 = $user->email;
|
||||
//gen new code and pass
|
||||
$code = str_random(60);
|
||||
$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]);
|
||||
|
@@ -20,6 +20,7 @@ class Install extends Command
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'to install faveo';
|
||||
|
||||
protected $install;
|
||||
|
||||
/**
|
||||
|
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
||||
use App\Http\Controllers\Installer\helpdesk\InstallController;
|
||||
use DB;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class InstallDB extends Command
|
||||
{
|
||||
@@ -21,6 +22,7 @@ class InstallDB extends Command
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'installing database';
|
||||
|
||||
protected $install;
|
||||
|
||||
/**
|
||||
@@ -77,7 +79,7 @@ class InstallDB extends Command
|
||||
public function updateAppUrl()
|
||||
{
|
||||
$url = $this->ask('Enter your app url (with http/https and www/non www)');
|
||||
if (str_finish($url, '/')) {
|
||||
if (Str::finish($url, '/')) {
|
||||
$url = rtrim($url, '/ ');
|
||||
}
|
||||
$systems = new \App\Model\helpdesk\Settings\System();
|
||||
|
@@ -3,10 +3,10 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Model\helpdesk\Settings\System;
|
||||
use Artisan;
|
||||
use Config;
|
||||
use DB;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class SetupTestEnv extends Command
|
||||
{
|
||||
@@ -42,7 +42,7 @@ class SetupTestEnv extends Command
|
||||
public function handle()
|
||||
{
|
||||
$dbUsername = $this->option('username') ? $this->option('username') : env('DB_USERNAME');
|
||||
$dbPassword = $this->option('password') ? $this->option('password') : (env('DB_PASSWORD')) ? env('DB_PASSWORD') : '';
|
||||
$dbPassword = $this->option('password') ? $this->option('password') : (env('DB_PASSWORD'));
|
||||
$this->setupConfig($dbUsername, $dbPassword);
|
||||
|
||||
echo "\nCreating database...\n";
|
||||
@@ -98,7 +98,7 @@ class SetupTestEnv extends Command
|
||||
{
|
||||
try {
|
||||
echo "\nMigrating...\n";
|
||||
Artisan::call('migrate', ['--force'=>true]);
|
||||
Artisan::call('migrate', ['--force' => true]);
|
||||
|
||||
echo Artisan::output();
|
||||
|
||||
@@ -129,7 +129,7 @@ class SetupTestEnv extends Command
|
||||
|
||||
if (file_exists($migrationPath)) {
|
||||
echo "\nMigrating $plugin tables\n";
|
||||
Artisan::call('migrate', ['--path'=>$migrationRelativePath, '--force'=>true]);
|
||||
Artisan::call('migrate', ['--path' => $migrationRelativePath, '--force' => true]);
|
||||
echo Artisan::output();
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ class SetupTestEnv extends Command
|
||||
{
|
||||
try {
|
||||
echo "\nSeeding...\n";
|
||||
Artisan::call('db:seed', ['--force'=>true]);
|
||||
Artisan::call('db:seed', ['--force' => true]);
|
||||
echo Artisan::output();
|
||||
echo "\nSeeded Successfully!\n";
|
||||
} catch (\Exception $e) {
|
||||
@@ -159,7 +159,7 @@ class SetupTestEnv extends Command
|
||||
*/
|
||||
private function updateAppUrl()
|
||||
{
|
||||
return System::first()->update(['url'=>'http://localhost:8000']);
|
||||
return System::first()->update(['url' => 'http://localhost:8000']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
34
app/Console/Commands/Sync.php
Normal file
34
app/Console/Commands/Sync.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Http\Controllers\Update\SyncFaveoToLatestVersion;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class Sync extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'database:sync';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Migration and Database seeder';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
(new SyncFaveoToLatestVersion())->sync();
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
34
app/Console/Commands/SyncFaveoToLatestVersion.php
Normal file
34
app/Console/Commands/SyncFaveoToLatestVersion.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class SyncFaveoToLatestVersion extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'database:sync';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Database sync';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('database:sync started');
|
||||
(new \App\Http\Controllers\Update\SyncFaveoToLatestVersion())->sync();
|
||||
$this->info('database:sync completed');
|
||||
}
|
||||
}
|
@@ -4,7 +4,6 @@ namespace App\Console\Commands;
|
||||
|
||||
use App\Http\Controllers\Agent\helpdesk\MailController;
|
||||
use App\Http\Controllers\Agent\helpdesk\TicketWorkflowController;
|
||||
use Event;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class TicketFetch extends Command
|
||||
@@ -47,7 +46,7 @@ class TicketFetch extends Command
|
||||
$system = new \App\Model\helpdesk\Settings\System();
|
||||
$ticket = new \App\Model\helpdesk\Settings\Ticket();
|
||||
$controller->readmails($emails, $settings_email, $system, $ticket);
|
||||
Event::fire('ticket.fetch', ['event' => '']);
|
||||
event('ticket.fetch', ['event' => '']);
|
||||
loging('fetching-ticket', 'Ticket has read', 'info');
|
||||
//\Log::info('Ticket has read');
|
||||
$this->info('Ticket has read');
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Console\Commands\SyncFaveoToLatestVersion;
|
||||
use App\Model\MailJob\Condition;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
@@ -14,16 +15,17 @@ class Kernel extends ConsoleKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
'App\Console\Commands\Inspire',
|
||||
'App\Console\Commands\SendReport',
|
||||
'App\Console\Commands\CloseWork',
|
||||
'App\Console\Commands\TicketFetch',
|
||||
'App\Console\Commands\UpdateEncryption',
|
||||
\App\Console\Commands\Inspire::class,
|
||||
\App\Console\Commands\SendReport::class,
|
||||
\App\Console\Commands\CloseWork::class,
|
||||
\App\Console\Commands\TicketFetch::class,
|
||||
\App\Console\Commands\UpdateEncryption::class,
|
||||
\App\Console\Commands\DropTables::class,
|
||||
\App\Console\Commands\Install::class,
|
||||
\App\Console\Commands\InstallDB::class,
|
||||
\App\Console\Commands\SetupTestEnv::class,
|
||||
\App\Console\Commands\SecureFaveoAPPKey::class,
|
||||
SyncFaveoToLatestVersion::class
|
||||
];
|
||||
|
||||
/**
|
||||
|
@@ -9,9 +9,13 @@ class ClientTicketForm extends Event
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
|
||||
|
@@ -9,9 +9,13 @@ class ClientTicketFormPost extends Event
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
public function __construct($para1 = '', $para2 = '', $para3 = '', $para4 = '', $para5 = '')
|
||||
|
@@ -7,11 +7,17 @@ use Illuminate\Queue\SerializesModels;
|
||||
class FaveoAfterReply extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
public $para6;
|
||||
|
||||
/**
|
||||
|
@@ -9,9 +9,13 @@ class FormRegisterEvent extends Event
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
/**
|
||||
|
@@ -7,10 +7,15 @@ use Illuminate\Queue\SerializesModels;
|
||||
class LoginEvent extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
/**
|
||||
|
@@ -7,10 +7,15 @@ use Illuminate\Queue\SerializesModels;
|
||||
class PostRegisterEvent extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
/**
|
||||
|
@@ -7,10 +7,15 @@ use Illuminate\Queue\SerializesModels;
|
||||
class ReadMailEvent extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
/**
|
||||
|
@@ -7,10 +7,15 @@ use Illuminate\Queue\SerializesModels;
|
||||
class TicketBoxHeader extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
/**
|
||||
|
@@ -7,10 +7,15 @@ use Illuminate\Queue\SerializesModels;
|
||||
class TicketDetailTable extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
/**
|
||||
|
@@ -7,10 +7,15 @@ use Illuminate\Queue\SerializesModels;
|
||||
class TimeLineFormEvent extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
/**
|
||||
|
@@ -9,9 +9,13 @@ class Timeline extends Event
|
||||
use SerializesModels;
|
||||
|
||||
public $para1;
|
||||
|
||||
public $para2;
|
||||
|
||||
public $para3;
|
||||
|
||||
public $para4;
|
||||
|
||||
public $para5;
|
||||
|
||||
/**
|
||||
|
@@ -2,17 +2,15 @@
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
// controller
|
||||
use Bugsnag;
|
||||
use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
|
||||
use Config;
|
||||
use Bugsnag\BugsnagLaravel\Facades\Bugsnag;
|
||||
use Exception;
|
||||
// use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
// use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Foundation\Validation\ValidationException as foundation;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Http\Exceptions\HttpResponseException;
|
||||
use Illuminate\Session\TokenMismatchException;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
@@ -25,42 +23,25 @@ class Handler extends ExceptionHandler
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
// 'Symfony\Component\HttpKernel\Exception\HttpException',
|
||||
\Illuminate\Http\Exception\HttpResponseException::class,
|
||||
foundation::class,
|
||||
HttpResponseException::class,
|
||||
AuthorizationException::class,
|
||||
HttpResponseException::class,
|
||||
ModelNotFoundException::class,
|
||||
\Symfony\Component\HttpKernel\Exception\HttpException::class,
|
||||
ValidationException::class,
|
||||
\DaveJamesMiller\Breadcrumbs\Exception::class,
|
||||
\DaveJamesMiller\Breadcrumbs\BreadcrumbsException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
* @param \Throwable $e
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param \Exception $e
|
||||
* @throws \Throwable
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $e)
|
||||
public function report(\Throwable $e)
|
||||
{
|
||||
Bugsnag::setBeforeNotifyFunction(function ($error) { //set bugsnag
|
||||
return false;
|
||||
});
|
||||
// check if system is running in production environment
|
||||
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::setBeforeNotifyFunction(function ($error) { //set bugsnag
|
||||
return true;
|
||||
}); //set bugsnag reporting as true
|
||||
}
|
||||
}
|
||||
$this->reportToBugsNag($e);
|
||||
|
||||
return parent::report($e);
|
||||
}
|
||||
@@ -79,17 +60,17 @@ class Handler extends ExceptionHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
* @param $request
|
||||
* @param \Throwable $e
|
||||
*
|
||||
* @param type $request
|
||||
* @param Exception $e
|
||||
* @throws \Throwable
|
||||
*
|
||||
* @return type mixed
|
||||
* @return type|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function render($request, Exception $e)
|
||||
public function render($request, \Throwable $e)
|
||||
{
|
||||
switch ($e) {
|
||||
case $e instanceof \Illuminate\Http\Exception\HttpResponseException:
|
||||
case $e instanceof HttpResponseException:
|
||||
return parent::render($request, $e);
|
||||
case $e instanceof \Tymon\JWTAuth\Exceptions\TokenExpiredException:
|
||||
return response()->json(['message' => $e->getMessage(), 'code' => $e->getStatusCode()]);
|
||||
@@ -234,4 +215,22 @@ class Handler extends ExceptionHandler
|
||||
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
|
||||
protected function reportToBugsNag(\Throwable $e)
|
||||
{
|
||||
if (Config::get('app.bugsnag_reporting') && env('APP_ENV') == 'production' && $this->shouldReportBugsnag($e)) {
|
||||
Bugsnag::notifyException($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function shouldReportBugsnag($e)
|
||||
{
|
||||
foreach ($this->dontReport as $report) {
|
||||
if ($e instanceof $report) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
27
app/Exports/UserExport.php
Normal file
27
app/Exports/UserExport.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromArray;
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
|
||||
class UserExport implements FromArray, WithHeadings
|
||||
{
|
||||
public $data;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return ['Username', 'Email', 'Firstname', 'Lastname', 'Organization'];
|
||||
}
|
||||
|
||||
public function array(): array
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
}
|
@@ -16,6 +16,7 @@ class LaravelLogViewer
|
||||
* @var string file
|
||||
*/
|
||||
private static $file;
|
||||
|
||||
private static $levels_classes = [
|
||||
'debug' => 'info',
|
||||
'info' => 'info',
|
||||
@@ -26,6 +27,7 @@ class LaravelLogViewer
|
||||
'alert' => 'danger',
|
||||
'emergency' => 'danger',
|
||||
];
|
||||
|
||||
private static $levels_imgs = [
|
||||
'debug' => 'info',
|
||||
'info' => 'info',
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'logs'=> 'Logs',
|
||||
'logs' => 'Logs',
|
||||
];
|
||||
|
@@ -1,9 +1,12 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\App;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Breadcrumbs::register('logs', function ($breadcrumbs) {
|
||||
$breadcrumbs->parent('setting');
|
||||
$breadcrumbs->push('System Logs', route('logs'));
|
||||
});
|
||||
Route::group(['middleware' => ['web', 'auth', 'roles']], function () {
|
||||
Route::get('logs', ['as' => 'logs', 'uses' => 'App\FaveoLog\controllers\LogViewerController@index']);
|
||||
Route::middleware('web', 'auth', 'roles')->group(function () {
|
||||
Route::get('logs', [\App\FaveoLog\controllers\LogViewerController::class, 'index'])->name('logs');
|
||||
});
|
||||
|
@@ -12,17 +12,29 @@ use Storage;
|
||||
class StorageController extends Controller
|
||||
{
|
||||
protected $default;
|
||||
|
||||
protected $driver;
|
||||
|
||||
protected $root;
|
||||
|
||||
protected $s3_key;
|
||||
|
||||
protected $s3_region;
|
||||
|
||||
protected $s3_secret;
|
||||
|
||||
protected $s3_bucket;
|
||||
|
||||
protected $rackspace_key;
|
||||
|
||||
protected $rackspace_region;
|
||||
|
||||
protected $rackspace_username;
|
||||
|
||||
protected $rackspace_container;
|
||||
|
||||
protected $rackspace_endpoint;
|
||||
|
||||
protected $rackspace_url_type;
|
||||
|
||||
public function __construct()
|
||||
@@ -192,7 +204,7 @@ class StorageController extends Controller
|
||||
if ($this->default !== 'database') {
|
||||
$this->setFileSystem();
|
||||
Storage::disk($this->default)->put($filename, $data);
|
||||
$storagePath = Storage::disk($this->default)->getDriver()->getAdapter()->getPathPrefix().$filename;
|
||||
$storagePath = Storage::disk($this->default)->path($filename);
|
||||
if (mime(\File::mimeType($storagePath)) != 'image' || mime(\File::extension($storagePath)) != 'image') {
|
||||
chmod($storagePath, 1204);
|
||||
}
|
||||
|
@@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'settings' => 'Settings',
|
||||
'storage' => 'Storage',
|
||||
'default' => 'Default',
|
||||
'root' => 'Root',
|
||||
'region' => 'Region',
|
||||
'key' => 'Key',
|
||||
'secret' => 'Secret',
|
||||
'bucket' => 'Bucket',
|
||||
'username' => 'Username',
|
||||
'container'=> 'Container',
|
||||
'endpoint' => 'End Point',
|
||||
'url_type' => 'Url Type',
|
||||
'settings' => 'Settings',
|
||||
'storage' => 'Storage',
|
||||
'default' => 'Default',
|
||||
'root' => 'Root',
|
||||
'region' => 'Region',
|
||||
'key' => 'Key',
|
||||
'secret' => 'Secret',
|
||||
'bucket' => 'Bucket',
|
||||
'username' => 'Username',
|
||||
'container' => 'Container',
|
||||
'endpoint' => 'End Point',
|
||||
'url_type' => 'Url Type',
|
||||
];
|
||||
|
@@ -1,12 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
\Event::listen('settings.system', function () {
|
||||
$controller = new \App\FaveoStorage\Controllers\SettingsController();
|
||||
echo $controller->settingsIcon();
|
||||
});
|
||||
|
||||
Route::group(['middleware'=>['web']], function () {
|
||||
Route::get('storage', ['as'=>'storage', 'uses'=>'App\FaveoStorage\Controllers\SettingsController@settings']);
|
||||
Route::post('storage', ['as'=>'post.storage', 'uses'=>'App\FaveoStorage\Controllers\SettingsController@postSettings']);
|
||||
Route::get('attachment', ['as'=>'attach', 'uses'=>'App\FaveoStorage\Controllers\SettingsController@attachment']);
|
||||
Route::middleware('web')->group(function () {
|
||||
Route::get('storage', [App\FaveoStorage\Controllers\SettingsController::class, 'settings'])->name('storage');
|
||||
Route::post('storage', [App\FaveoStorage\Controllers\SettingsController::class, 'postSettings'])->name('post.storage');
|
||||
Route::get('attachment', [App\FaveoStorage\Controllers\SettingsController::class, 'attachment'])->name('attach');
|
||||
});
|
||||
|
@@ -93,7 +93,7 @@ class AgentController extends Controller
|
||||
// returns to the page with all the variables and their datas
|
||||
$send_otp = DB::table('common_settings')->select('status')->where('option_name', '=', 'send_otp')->first();
|
||||
|
||||
return view('themes.default1.admin.helpdesk.agent.agents.create', compact('assign', 'teams', 'agents', 'timezones', 'groups', 'departments', 'team', 'send_otp'))->with('phonecode', $phonecode->phonecode);
|
||||
return view('themes.default1.admin.helpdesk.agent.agents.create', compact('teams', 'timezones', 'groups', 'departments', 'team', 'send_otp'))->with('phonecode', $phonecode->phonecode);
|
||||
} catch (Exception $e) {
|
||||
// returns if try fails with exception meaagse
|
||||
return redirect()->back()->with('fails', $e->getMessage());
|
||||
@@ -157,7 +157,7 @@ class AgentController extends Controller
|
||||
}
|
||||
// returns for the success case
|
||||
if ($request->input('active') == '0' || $request->input('active') == 0) {
|
||||
\Event::fire(new \App\Events\LoginEvent($request));
|
||||
event(new \App\Events\LoginEvent($request));
|
||||
}
|
||||
|
||||
return redirect('agents')->with('success', Lang::get('lang.agent_creation_success'));
|
||||
@@ -195,7 +195,7 @@ class AgentController extends Controller
|
||||
$teams = $team->pluck('id', 'name')->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', 'user', 'timezones', 'groups', 'departments', 'team'))->with('phonecode', $phonecode->phonecode);
|
||||
} catch (Exception $e) {
|
||||
return redirect('agents')->with('fail', Lang::get('lang.failed_to_edit_agent'));
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ use App\Model\helpdesk\Utility\MailboxProtocol;
|
||||
use Crypt;
|
||||
use Exception;
|
||||
use Lang;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
|
||||
|
||||
/**
|
||||
* ======================================
|
||||
@@ -124,6 +125,7 @@ class EmailsController extends Controller
|
||||
|
||||
return $this->validateEmailError($send, $fetch);
|
||||
} catch (Exception $ex) {
|
||||
dd($ex->getMessage());
|
||||
$message = $ex->getMessage();
|
||||
if ($request->input('fetching_status') && imap_last_error()) {
|
||||
$message = imap_last_error();
|
||||
@@ -253,11 +255,10 @@ class EmailsController extends Controller
|
||||
|
||||
$this->emailService($driver, $service_request);
|
||||
$this->setMailConfig($driver, $address, $name, $username, $password, $enc, $host, $port);
|
||||
$transport = (new \Swift_SmtpTransport($host, $port, $enc));
|
||||
$transport = new EsmtpTransport($host, $port);
|
||||
$transport->setUsername($username);
|
||||
$transport->setPassword($password);
|
||||
$mailer = (new \Swift_Mailer($transport));
|
||||
$mailer->getTransport()->start();
|
||||
$transport->start();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@@ -4,10 +4,11 @@ namespace App\Http\Controllers\Admin\helpdesk;
|
||||
|
||||
// controller
|
||||
use App\Http\Controllers\Controller;
|
||||
use Exception;
|
||||
// request
|
||||
|
||||
use Exception;
|
||||
use File;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
@@ -58,13 +59,13 @@ class ErrorAndDebuggingController extends Controller
|
||||
$debug = ($debug) ? 'true' : 'false';
|
||||
$bugsnag_debug = \Config::get('app.bugsnag_reporting');
|
||||
$bugsnag_debug = ($bugsnag_debug) ? 'true' : 'false';
|
||||
if ($debug != \Input::get('debug') || $bugsnag_debug != \Input::get('bugsnag')) {
|
||||
if ($debug != Request::get('debug') || $bugsnag_debug != Request::get('bugsnag')) {
|
||||
// dd($request->input());
|
||||
$debug_new = base_path().DIRECTORY_SEPARATOR.'.env';
|
||||
$datacontent = File::get($debug_new);
|
||||
$datacontent = str_replace(
|
||||
'APP_DEBUG='.$debug,
|
||||
'APP_DEBUG='.\Input::get('debug'),
|
||||
'APP_DEBUG='.Request::get('debug'),
|
||||
$datacontent
|
||||
);
|
||||
File::put($debug_new, $datacontent);
|
||||
@@ -74,7 +75,7 @@ class ErrorAndDebuggingController extends Controller
|
||||
$datacontent2 = File::get($bugsnag_debug_new);
|
||||
$datacontent2 = str_replace(
|
||||
'APP_BUGSNAG='.$bugsnag_debug,
|
||||
'APP_BUGSNAG='.\Input::get('bugsnag'),
|
||||
'APP_BUGSNAG='.Request::get('bugsnag'),
|
||||
$datacontent2
|
||||
);
|
||||
File::put($bugsnag_debug_new, $datacontent2);
|
||||
|
@@ -4,16 +4,17 @@ namespace App\Http\Controllers\Admin\helpdesk;
|
||||
|
||||
// Controller
|
||||
use App\Http\Controllers\Controller;
|
||||
// Model
|
||||
use App\Model\helpdesk\Form\Fields;
|
||||
// Model
|
||||
use App\Model\helpdesk\Form\Forms;
|
||||
use App\Model\helpdesk\Manage\Help_topic;
|
||||
// Request
|
||||
use Exception;
|
||||
// Class
|
||||
// Request
|
||||
use Form;
|
||||
// Class
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
use Redirect;
|
||||
|
||||
@@ -26,6 +27,7 @@ use Redirect;
|
||||
class FormController extends Controller
|
||||
{
|
||||
private $fields;
|
||||
|
||||
private $forms;
|
||||
|
||||
public function __construct(Fields $fields, Forms $forms)
|
||||
@@ -137,7 +139,7 @@ class FormController extends Controller
|
||||
$fields = [];
|
||||
for ($i = 0; $i <= $count; $i++) {
|
||||
if (!empty(Input::get('name')[$i])) {
|
||||
$name = str_slug(Input::get('name')[$i], '_');
|
||||
$name = Str::slug(Input::get('name')[$i], '_');
|
||||
$field = Fields::create([
|
||||
'forms_id' => $forms->id,
|
||||
'label' => Input::get('label')[$i],
|
||||
@@ -253,7 +255,7 @@ class FormController extends Controller
|
||||
}
|
||||
//dd(Input::get('label'),Input::get('name'),Input::get('type'),Input::get('required'));
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$name = str_slug(Input::get('name')[$i], '_');
|
||||
$name = Str::slug(Input::get('name')[$i], '_');
|
||||
$field = $field->create([
|
||||
'forms_id' => $forms->id,
|
||||
'label' => Input::get('label')[$i],
|
||||
@@ -386,7 +388,7 @@ class FormController extends Controller
|
||||
'field_id' => $fieldid,
|
||||
'child_id' => $childid,
|
||||
'field_key' => $key,
|
||||
'field_value' => str_slug($value, '_'),
|
||||
'field_value' => Str::slug($value, '_'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -445,12 +447,12 @@ class FormController extends Controller
|
||||
}
|
||||
|
||||
return '<script>
|
||||
$("#'.str_slug($value).'").on("change", function () {
|
||||
var valueid = $("#'.str_slug($value).'").val();
|
||||
var fieldid = $("#'.$fieldid.str_slug($value).'").val();
|
||||
send'.$fieldid.str_slug($value).'(valueid,fieldid);
|
||||
$("#'.Str::slug($value).'").on("change", function () {
|
||||
var valueid = $("#'.Str::slug($value).'").val();
|
||||
var fieldid = $("#'.$fieldid.Str::slug($value).'").val();
|
||||
send'.$fieldid.Str::slug($value).'(valueid,fieldid);
|
||||
});
|
||||
function send'.$fieldid.str_slug($value).'(valueid,fieldid) {
|
||||
function send'.$fieldid.Str::slug($value).'(valueid,fieldid) {
|
||||
$.ajax({
|
||||
url: "'.url('forms/render/child/').'",
|
||||
dataType: "html",
|
||||
@@ -556,8 +558,8 @@ class FormController extends Controller
|
||||
if (count($values) > 0) {
|
||||
foreach ($values as $field_value) {
|
||||
$script = self::jqueryScript($field_value, $field->id, $field->name, $field_type);
|
||||
$radio .= '<div>'.Form::hidden('fieldid[]', $field->id, ['id' => $field->id.str_slug($field_value)]);
|
||||
$radio .= Form::$field_type($field->name, $field_value, null, ['class' => "$field->id", 'id' => str_slug($field_value), 'required' => $required]).$script.'<span> '.removeUnderscore($field_value).'</span></div>';
|
||||
$radio .= '<div>'.Form::hidden('fieldid[]', $field->id, ['id' => $field->id.Str::slug($field_value)]);
|
||||
$radio .= Form::$field_type($field->name, $field_value, null, ['class' => "$field->id", 'id' => Str::slug($field_value), 'required' => $required]).$script.'<span> '.removeUnderscore($field_value).'</span></div>';
|
||||
}
|
||||
$html = Form::label($field->label, $field->label, ['class' => $required_class]).'</br>'.$radio.'<div id='.$field->name.'></br></div>';
|
||||
}
|
||||
|
@@ -13,8 +13,8 @@ use Config;
|
||||
use File;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Input;
|
||||
use Lang;
|
||||
use UnAuth;
|
||||
use Validator;
|
||||
@@ -81,7 +81,7 @@ class LanguageController extends Controller
|
||||
*/
|
||||
public function getLanguages()
|
||||
{
|
||||
$path = base_path('resources/lang');
|
||||
$path = base_path('lang');
|
||||
$values = scandir($path); //Extracts names of directories present in lang directory
|
||||
$values = array_slice($values, 2); // skips array element $value[0] = '.' & $value[1] = '..'
|
||||
$sysLanguage = \Cache::get('language');
|
||||
@@ -107,18 +107,18 @@ class LanguageController extends Controller
|
||||
})
|
||||
->addColumn('status', function ($model) use ($sysLanguage) {
|
||||
if ($sysLanguage === $model) {
|
||||
return "<span style='color:green'>".Lang::trans('lang.yes').'</span>';
|
||||
return "<span style='color:green'>".Lang::get('lang.yes').'</span>';
|
||||
} else {
|
||||
return "<span style='color:red'>".Lang::trans('lang.no').'</span>';
|
||||
return "<span style='color:red'>".Lang::get('lang.no').'</span>';
|
||||
}
|
||||
})
|
||||
->addColumn('Action', function ($model) use ($sysLanguage) {
|
||||
if ($model === $sysLanguage) {
|
||||
return "<a href='change-language/".$model."' disabled><input type='button' class='btn btn-primary btn-xs' disabled value='".Lang::trans('lang.set_as_sys_lang')."'/></a>
|
||||
<button disabled class='btn btn-danger btn-xs'><i class='fas fa-trash'> </i> ".Lang::trans('lang.delete').'</button>';
|
||||
return "<a href='change-language/".$model."' disabled><input type='button' class='btn btn-primary btn-xs' disabled value='".Lang::get('lang.set_as_sys_lang')."'/></a>
|
||||
<button disabled class='btn btn-danger btn-xs'><i class='fas fa-trash'> </i> ".Lang::get('lang.delete').'</button>';
|
||||
} else {
|
||||
return "<a href='change-language/".$model."'><input type='button' class='btn btn-primary btn-xs' value='".Lang::trans('lang.set_as_sys_lang')."'/></a>
|
||||
<a href='delete-language/".$model."' class='btn btn-danger btn-xs'><i class='fas fa-trash'> </i> ".Lang::trans('lang.delete').'</a>';
|
||||
return "<a href='change-language/".$model."'><input type='button' class='btn btn-primary btn-xs' value='".Lang::get('lang.set_as_sys_lang')."'/></a>
|
||||
<a href='delete-language/".$model."' class='btn btn-danger btn-xs'><i class='fas fa-trash'> </i> ".Lang::get('lang.delete').'</a>';
|
||||
}
|
||||
})
|
||||
->searchColumns('language', 'id')
|
||||
@@ -135,9 +135,9 @@ class LanguageController extends Controller
|
||||
try {
|
||||
// getting all of the post data
|
||||
$file = [
|
||||
'File' => Input::file('File'),
|
||||
'language-name' => Input::input('language-name'),
|
||||
'iso-code' => Input::input('iso-code'),
|
||||
'File' => Request::file('File'),
|
||||
'language-name' => Request::input('language-name'),
|
||||
'iso-code' => Request::input('iso-code'),
|
||||
];
|
||||
|
||||
// setting up rules
|
||||
@@ -155,15 +155,15 @@ class LanguageController extends Controller
|
||||
} else {
|
||||
|
||||
//Checking if package already exists or not in lang folder
|
||||
$path = base_path('resources/lang');
|
||||
if (in_array(strtolower(Input::get('iso-code')), scandir($path))) {
|
||||
$path = base_path('lang');
|
||||
if (in_array(strtolower(Request::get('iso-code')), scandir($path))) {
|
||||
|
||||
//sending back with error message
|
||||
Session::flash('fails', Lang::get('lang.package_exist'));
|
||||
Session::flash('link', 'change-language/'.strtolower(Input::get('iso-code')));
|
||||
Session::flash('link', 'change-language/'.strtolower(Request::get('iso-code')));
|
||||
|
||||
return Redirect::back()->withInput();
|
||||
} elseif (!array_key_exists(strtolower(Input::get('iso-code')), Config::get('languages'))) {//Checking Valid ISO code form Languages.php
|
||||
} elseif (!array_key_exists(strtolower(Request::get('iso-code')), Config::get('languages'))) {//Checking Valid ISO code form Languages.php
|
||||
//sending back with error message
|
||||
Session::flash('fails', Lang::get('lang.iso-code-error'));
|
||||
|
||||
@@ -171,13 +171,13 @@ class LanguageController extends Controller
|
||||
} else {
|
||||
|
||||
// checking file is valid.
|
||||
if (Input::file('File')->isValid()) {
|
||||
$name = Input::file('File')->getClientOriginalName(); //uploaded file's original name
|
||||
if (Request::file('File')->isValid()) {
|
||||
$name = Request::file('File')->getClientOriginalName(); //uploaded file's original name
|
||||
$destinationPath = base_path('public/uploads/'); // defining uploading path
|
||||
$extractpath = base_path('resources/lang').'/'.strtolower(Input::get('iso-code')); //defining extracting path
|
||||
$extractpath = base_path('lang').'/'.strtolower(Request::get('iso-code')); //defining extracting path
|
||||
mkdir($extractpath); //creating directroy for extracting uploadd file
|
||||
//mkdir($destinationPath);
|
||||
Input::file('File')->move($destinationPath, $name); // uploading file to given path
|
||||
Request::file('File')->move($destinationPath, $name); // uploading file to given path
|
||||
\Zipper::make($destinationPath.'/'.$name)->extractTo($extractpath); //extracting file to give path
|
||||
//check if Zip extract foldercontains any subfolder
|
||||
$directories = File::directories($extractpath);
|
||||
@@ -195,7 +195,7 @@ class LanguageController extends Controller
|
||||
} else {
|
||||
// sending back with success message
|
||||
Session::flash('success', Lang::get('lang.upload-success'));
|
||||
Session::flash('link', 'change-language/'.strtolower(Input::get('iso-code')));
|
||||
Session::flash('link', 'change-language/'.strtolower(Request::get('iso-code')));
|
||||
|
||||
return Redirect::route('LanguageController');
|
||||
}
|
||||
@@ -237,7 +237,7 @@ class LanguageController extends Controller
|
||||
{
|
||||
if ($lang !== App::getLocale()) {
|
||||
if ($lang !== Config::get('app.fallback_locale')) {
|
||||
$deletePath = base_path('resources/lang').'/'.$lang; //define file path to delete
|
||||
$deletePath = base_path('lang').'/'.$lang; //define file path to delete
|
||||
$success = File::deleteDirectory($deletePath); //remove extracted folder and it's subfolder from lang
|
||||
if ($success) {
|
||||
//sending back with success message
|
||||
|
@@ -13,7 +13,7 @@ use App\User;
|
||||
use Auth;
|
||||
use Exception;
|
||||
use Hash;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
|
||||
/**
|
||||
* ProfileController.
|
||||
@@ -95,13 +95,13 @@ class ProfileController extends Controller
|
||||
$user->profile_pic = $name;
|
||||
}
|
||||
}
|
||||
if (Input::file('profile_pic')) {
|
||||
//$extension = Input::file('profile_pic')->getClientOriginalExtension();
|
||||
$name = Input::file('profile_pic')->getClientOriginalName();
|
||||
if (Request::file('profile_pic')) {
|
||||
//$extension = Request::file('profile_pic')->getClientOriginalExtension();
|
||||
$name = Request::file('profile_pic')->getClientOriginalName();
|
||||
$destinationPath = 'lb-faveo/profilepic';
|
||||
$fileName = rand(0000, 9999).'.'.$name;
|
||||
//echo $fileName;
|
||||
Input::file('profile_pic')->move($destinationPath, $fileName);
|
||||
Request::file('profile_pic')->move($destinationPath, $fileName);
|
||||
$user->profile_pic = $fileName;
|
||||
} else {
|
||||
$user->fill($request->except('profile_pic', 'gender', 'active', 'role', 'is_delete', 'ban'))->save();
|
||||
|
@@ -4,14 +4,14 @@ namespace App\Http\Controllers\Admin\helpdesk;
|
||||
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\CompanyRequest;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\EmailRequest;
|
||||
use App\Http\Requests\helpdesk\Job\TaskRequest;
|
||||
use App\Http\Requests\helpdesk\RatingUpdateRequest;
|
||||
use App\Http\Requests\helpdesk\StatusRequest;
|
||||
// models
|
||||
use App\Http\Requests\helpdesk\SystemRequest;
|
||||
// models
|
||||
use App\Model\helpdesk\Agent\Department;
|
||||
use App\Model\helpdesk\Email\Emails;
|
||||
use App\Model\helpdesk\Email\Template;
|
||||
@@ -32,13 +32,14 @@ use App\Model\helpdesk\Utility\Date_time_format;
|
||||
use App\Model\helpdesk\Utility\Time_format;
|
||||
use App\Model\helpdesk\Utility\Timezones;
|
||||
use App\Model\helpdesk\Workflow\WorkflowClose;
|
||||
// classes
|
||||
use DateTime;
|
||||
// classes
|
||||
use DB;
|
||||
use Exception;
|
||||
use File;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
@@ -210,7 +211,7 @@ class SettingsController extends Controller
|
||||
|
||||
if ($request->has('itil')) {
|
||||
$itil = $request->input('itil');
|
||||
$sett = CommonSettings::firstOrCreate(['option_name'=>'itil']);
|
||||
$sett = CommonSettings::firstOrCreate(['option_name' => 'itil']);
|
||||
$sett->status = $itil;
|
||||
$sett->save();
|
||||
}
|
||||
@@ -586,7 +587,7 @@ class SettingsController extends Controller
|
||||
*/
|
||||
public function generateApiKey()
|
||||
{
|
||||
$key = str_random(32);
|
||||
$key = Str::random(32);
|
||||
|
||||
return $key;
|
||||
}
|
||||
@@ -886,17 +887,17 @@ class SettingsController extends Controller
|
||||
|
||||
public function saveConditions()
|
||||
{
|
||||
if (\Input::get('fetching-commands') && \Input::get('notification-commands')) {
|
||||
$fetching_commands = \Input::get('fetching-commands');
|
||||
$fetching_dailyAt = \Input::get('fetching-dailyAt');
|
||||
$notification_commands = \Input::get('notification-commands');
|
||||
$notification_dailyAt = \Input::get('notification-dailyAt');
|
||||
$work_commands = \Input::get('work-commands');
|
||||
$workflow_dailyAt = \Input::get('workflow-dailyAt');
|
||||
if (Input::get('fetching-commands') && Input::get('notification-commands')) {
|
||||
$fetching_commands = Input::get('fetching-commands');
|
||||
$fetching_dailyAt = Input::get('fetching-dailyAt');
|
||||
$notification_commands = Input::get('notification-commands');
|
||||
$notification_dailyAt = Input::get('notification-dailyAt');
|
||||
$work_commands = Input::get('work-commands');
|
||||
$workflow_dailyAt = Input::get('workflow-dailyAt');
|
||||
$fetching_command = $this->getCommand($fetching_commands, $fetching_dailyAt);
|
||||
$notification_command = $this->getCommand($notification_commands, $notification_dailyAt);
|
||||
$work_command = $this->getCommand($work_commands, $workflow_dailyAt);
|
||||
$jobs = ['fetching'=>$fetching_command, 'notification'=>$notification_command, 'work'=>$work_command];
|
||||
$jobs = ['fetching' => $fetching_command, 'notification' => $notification_command, 'work' => $work_command];
|
||||
$this->storeCommand($jobs);
|
||||
}
|
||||
}
|
||||
@@ -920,10 +921,10 @@ class SettingsController extends Controller
|
||||
}
|
||||
}
|
||||
if (count($array) > 0) {
|
||||
foreach ($array as $key=>$save) {
|
||||
foreach ($array as $key => $save) {
|
||||
$command->create([
|
||||
'job' => $key,
|
||||
'value'=> $save,
|
||||
'job' => $key,
|
||||
'value' => $save,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -4,12 +4,12 @@ namespace App\Http\Controllers\Admin\helpdesk;
|
||||
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\CompanyRequest;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\EmailRequest;
|
||||
use App\Http\Requests\helpdesk\SystemRequest;
|
||||
// models
|
||||
use App\Model\helpdesk\Agent\Department;
|
||||
// models
|
||||
use App\Model\helpdesk\Email\Emails;
|
||||
use App\Model\helpdesk\Email\Template;
|
||||
use App\Model\helpdesk\Manage\Help_topic;
|
||||
@@ -28,11 +28,12 @@ use App\Model\helpdesk\Utility\Date_time_format;
|
||||
use App\Model\helpdesk\Utility\Time_format;
|
||||
use App\Model\helpdesk\Utility\Timezones;
|
||||
use DateTime;
|
||||
// classes
|
||||
use DB;
|
||||
// classes
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
@@ -736,7 +737,7 @@ class SettingsController2 extends Controller
|
||||
*/
|
||||
public function generateApiKey()
|
||||
{
|
||||
$key = str_random(32);
|
||||
$key = Str::random(32);
|
||||
|
||||
return $key;
|
||||
}
|
||||
|
@@ -220,7 +220,7 @@ class TeamController extends Controller
|
||||
// dd($a_id);
|
||||
$user = $user->whereIn('id', $a_id)->where('active', '=', 1)->orderBy('first_name')->get();
|
||||
// dd($user);
|
||||
return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams', 'allagents'));
|
||||
return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams'));
|
||||
} catch (Exception $e) {
|
||||
return redirect()->back()->with('fails', $e->getMessage());
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ use App\Model\helpdesk\Utility\Languages;
|
||||
// classes
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
|
||||
/**
|
||||
* TemplateController.
|
||||
|
@@ -315,7 +315,7 @@ class FilterControllerOld extends Controller
|
||||
/**
|
||||
*@category function to format and return user tickets
|
||||
*
|
||||
*@param string $segment
|
||||
*@param string $segment
|
||||
*
|
||||
*@return builder
|
||||
*/
|
||||
|
@@ -13,8 +13,9 @@ use App\Model\helpdesk\Settings\Ticket;
|
||||
use App\Model\helpdesk\Ticket\Ticket_attachments;
|
||||
use App\Model\helpdesk\Ticket\Ticket_source;
|
||||
use App\Model\helpdesk\Ticket\Ticket_Thread;
|
||||
// classes
|
||||
use App\Model\helpdesk\Ticket\Tickets;
|
||||
// classes
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* MailController.
|
||||
@@ -258,7 +259,7 @@ class MailController extends Controller
|
||||
$disposition = $structure->disposition;
|
||||
}
|
||||
|
||||
$filename = str_random(16).'-'.$attachment->getFileName();
|
||||
$filename = Str::random(16).'-'.$attachment->getFileName();
|
||||
$type = $attachment->getMimeType();
|
||||
$size = $attachment->getSize();
|
||||
$data = $attachment->getData();
|
||||
|
@@ -4,19 +4,20 @@ namespace App\Http\Controllers\Agent\helpdesk;
|
||||
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\OrganizationRequest;
|
||||
/* include organization model */
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\OrganizationUpdate;
|
||||
/* include organization model */
|
||||
use App\Model\helpdesk\Agent_panel\Organization;
|
||||
// models
|
||||
/* Define OrganizationRequest to validate the create form */
|
||||
use App\Model\helpdesk\Agent_panel\Organization;
|
||||
use App\Model\helpdesk\Agent_panel\User_org;
|
||||
/* Define OrganizationUpdate to validate the create form */
|
||||
use App\User;
|
||||
// classes
|
||||
/* Define OrganizationUpdate to validate the create form */
|
||||
use Exception;
|
||||
// classes
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
@@ -271,7 +272,7 @@ class OrganizationController extends Controller
|
||||
public function Head_Org($id)
|
||||
{
|
||||
// get the user to make organization head
|
||||
$head_user = \Input::get('user');
|
||||
$head_user = Input::get('user');
|
||||
// get an instance of the selected organization
|
||||
$org_head = Organization::where('id', '=', $id)->first();
|
||||
$org_head->head = $head_user;
|
||||
|
@@ -9,8 +9,9 @@ use App\Model\helpdesk\Manage\Help_topic;
|
||||
use App\Model\helpdesk\Ticket\Tickets;
|
||||
// Model
|
||||
use Illuminate\Http\Request;
|
||||
use Vsmoraes\Pdf\PdfFacade;
|
||||
|
||||
// classes
|
||||
use PDF;
|
||||
|
||||
/**
|
||||
* ReportController
|
||||
@@ -263,6 +264,6 @@ class ReportController extends Controller
|
||||
$html = view('themes.default1.agent.helpdesk.report.pdf', compact('table_datas', 'table_help_topic'))->render();
|
||||
$html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
|
||||
|
||||
return @PDF::load($html1)->show();
|
||||
return PdfFacade::load($html1)->show(false, false, false);
|
||||
}
|
||||
}
|
||||
|
@@ -3,15 +3,16 @@
|
||||
namespace App\Http\Controllers\Agent\helpdesk;
|
||||
|
||||
// controllers
|
||||
use App\Http\Controllers\Agent\helpdesk\Filter\FilterControllerOld;
|
||||
use App\Http\Controllers\Common\FileuploadController;
|
||||
use App\Http\Controllers\Common\NotificationController as Notify;
|
||||
use App\Http\Controllers\Common\PhpMailController;
|
||||
use App\Http\Controllers\Controller;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\CreateTicketRequest;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\TicketRequest;
|
||||
// models
|
||||
use App\Model\helpdesk\Agent\Department;
|
||||
// models
|
||||
use App\Model\helpdesk\Agent\Teams;
|
||||
use App\Model\helpdesk\Email\Emails;
|
||||
use App\Model\helpdesk\Form\Fields;
|
||||
@@ -36,19 +37,23 @@ use App\Model\helpdesk\Utility\Date_time_format;
|
||||
use App\Model\helpdesk\Utility\Timezones;
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Chumper\Datatable\Facades\DatatableFacade;
|
||||
use Crypt;
|
||||
use DB;
|
||||
use Exception;
|
||||
// classes
|
||||
use GeoIP;
|
||||
// classes
|
||||
use Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\support\Collection;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
use Mail;
|
||||
use PDF;
|
||||
use UTC;
|
||||
use Vsmoraes\Pdf\Pdf;
|
||||
use Vsmoraes\Pdf\PdfFacade;
|
||||
use Yajra\DataTables\Facades\DataTables;
|
||||
|
||||
/**
|
||||
* TicketController.
|
||||
@@ -277,7 +282,7 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function reply(Ticket_Thread $thread, Request $request, Ticket_attachments $ta, $mail = true, $system_reply = true, $user_id = '')
|
||||
{
|
||||
\Event::fire('reply.request', [$request]);
|
||||
event('reply.request', [$request]);
|
||||
|
||||
try {
|
||||
if (is_array($request->file('attachment'))) {
|
||||
@@ -304,7 +309,7 @@ class TicketController extends Controller
|
||||
$emailadd = User::where('id', $eventuserid)->first()->email;
|
||||
$source = $eventthread->source;
|
||||
$form_data = $request->except('reply_content', 'ticket_ID', 'attachment');
|
||||
\Event::fire(new \App\Events\ClientTicketFormPost($form_data, $emailadd, $source));
|
||||
event(new \App\Events\ClientTicketFormPost($form_data, $emailadd, $source));
|
||||
$reply_content = $request->input('reply_content');
|
||||
|
||||
$thread->ticket_id = $request->input('ticket_ID');
|
||||
@@ -338,7 +343,7 @@ class TicketController extends Controller
|
||||
$data = [
|
||||
'id' => $tickets->id,
|
||||
];
|
||||
\Event::fire('ticket-assignment', [$data]);
|
||||
event('ticket-assignment', [$data]);
|
||||
}
|
||||
if ($tickets->status > 1) {
|
||||
$this->open($ticket_id, new Tickets());
|
||||
@@ -383,7 +388,7 @@ class TicketController extends Controller
|
||||
}
|
||||
|
||||
// Event
|
||||
\Event::fire(new \App\Events\FaveoAfterReply($reply_content, $user->mobile, $user->country_code, $request, $tickets, $thread));
|
||||
event(new \App\Events\FaveoAfterReply($reply_content, $user->mobile, $user->country_code, $request, $tickets, $thread));
|
||||
if (Auth::user()) {
|
||||
$u_id = Auth::user()->first_name.' '.Auth::user()->last_name;
|
||||
} else {
|
||||
@@ -395,7 +400,7 @@ class TicketController extends Controller
|
||||
'body' => $request->input('reply_content'),
|
||||
];
|
||||
if (!$request->has('do-not-send')) {
|
||||
\Event::fire('Reply-Ticket', [$data]);
|
||||
event('Reply-Ticket', [$data]);
|
||||
}
|
||||
// sending attachments via php mail function
|
||||
$message = '';
|
||||
@@ -503,7 +508,7 @@ class TicketController extends Controller
|
||||
* @see https://github.com/dompdf/dompdf/issues/1272
|
||||
* For time bieng we are silencing the error using "@" operator in front of it
|
||||
*/
|
||||
return @PDF::load($html1)->show();
|
||||
return PdfFacade::load($html1)->show(false, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -674,10 +679,10 @@ class TicketController extends Controller
|
||||
}
|
||||
$user->role = 'user';
|
||||
$user->active = $user_status;
|
||||
$token = str_random(60);
|
||||
$token = Str::random(60);
|
||||
$user->remember_token = $token;
|
||||
// mail user his/her password
|
||||
//\Event::fire(new \App\Events\ClientTicketFormPost($from_data, $emailadd, $source));
|
||||
//\Illuminate\Support\Facades\Event::dispatch(new \App\Events\ClientTicketFormPost($from_data, $emailadd, $source));
|
||||
if ($user->save()) {
|
||||
$user_id = $user->id;
|
||||
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
|
||||
@@ -690,10 +695,10 @@ class TicketController extends Controller
|
||||
'user_name' => $unique,
|
||||
'password' => $password,
|
||||
];
|
||||
\Event::fire(new \App\Events\LoginEvent($value));
|
||||
event(new \App\Events\LoginEvent($value));
|
||||
}
|
||||
// Event fire
|
||||
\Event::fire(new \App\Events\ReadMailEvent($user_id, $password));
|
||||
event(new \App\Events\ReadMailEvent($user_id, $password));
|
||||
|
||||
try {
|
||||
if ($auto_response == 0) {
|
||||
@@ -710,7 +715,7 @@ class TicketController extends Controller
|
||||
$username = $checkemail->first_name;
|
||||
$user_id = $checkemail->id;
|
||||
}
|
||||
\Event::fire(new \App\Events\ClientTicketFormPost($from_data, $emailadd, $source));
|
||||
event(new \App\Events\ClientTicketFormPost($from_data, $emailadd, $source));
|
||||
$ticket_number = $this->check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $status);
|
||||
|
||||
$ticket_number2 = $ticket_number[0];
|
||||
@@ -850,11 +855,11 @@ class TicketController extends Controller
|
||||
'status' => $status,
|
||||
'Priority' => $priority,
|
||||
];
|
||||
\Event::fire('Create-Ticket', [$data]);
|
||||
event('Create-Ticket', [$data]);
|
||||
$data = [
|
||||
'id' => $ticketdata->id,
|
||||
];
|
||||
\Event::fire('ticket-assignment', [$data]);
|
||||
event('ticket-assignment', [$data]);
|
||||
$this->NotificationController->create($ticketdata->id, $user_id, '3');
|
||||
|
||||
return ['0' => $ticket_number2, '1' => true];
|
||||
@@ -953,7 +958,7 @@ class TicketController extends Controller
|
||||
'first_name' => $username,
|
||||
'last_name' => '',
|
||||
];
|
||||
\Event::fire('change-status', [$data]);
|
||||
event('change-status', [$data]);
|
||||
}
|
||||
if (isset($id)) {
|
||||
if ($this->ticketThread($subject, $body, $id, $user_id)) {
|
||||
@@ -1061,7 +1066,7 @@ class TicketController extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
\Event::fire('after.ticket.created', [['ticket' => $ticket, 'form_data' => $form_data]]);
|
||||
event('after.ticket.created', [['ticket' => $ticket, 'form_data' => $form_data]]);
|
||||
|
||||
// store collaborators
|
||||
$this->storeCollaborators($headers, $id);
|
||||
@@ -1089,7 +1094,7 @@ class TicketController extends Controller
|
||||
$thread->title = $subject;
|
||||
$thread->body = $body;
|
||||
if ($thread->save()) {
|
||||
\Event::fire('ticket.details', ['ticket' => $thread]); //get the ticket details
|
||||
event('ticket.details', ['ticket' => $thread]); //get the ticket details
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1173,7 +1178,7 @@ class TicketController extends Controller
|
||||
'first_name' => Auth::user()->first_name,
|
||||
'last_name' => Auth::user()->last_name,
|
||||
];
|
||||
\Event::fire('change-status', [$data]);
|
||||
event('change-status', [$data]);
|
||||
|
||||
return 'your ticket'.$ticket_status->ticket_number.' has been closed';
|
||||
}
|
||||
@@ -1219,7 +1224,7 @@ class TicketController extends Controller
|
||||
'first_name' => Auth::user()->first_name,
|
||||
'last_name' => Auth::user()->last_name,
|
||||
];
|
||||
\Event::fire('change-status', [$data]);
|
||||
event('change-status', [$data]);
|
||||
|
||||
return 'your ticket'.$ticket_status->ticket_number.' has been resolved';
|
||||
}
|
||||
@@ -1259,7 +1264,7 @@ class TicketController extends Controller
|
||||
'first_name' => Auth::user()->first_name,
|
||||
'last_name' => Auth::user()->last_name,
|
||||
];
|
||||
\Event::fire('change-status', [$data]);
|
||||
event('change-status', [$data]);
|
||||
|
||||
return 'your ticket'.$ticket_status->ticket_number.' has been opened';
|
||||
}
|
||||
@@ -1291,7 +1296,7 @@ class TicketController extends Controller
|
||||
'first_name' => Auth::user()->first_name,
|
||||
'last_name' => Auth::user()->last_name,
|
||||
];
|
||||
\Event::fire('change-status', [$data]);
|
||||
event('change-status', [$data]);
|
||||
|
||||
return 'your ticket has been delete';
|
||||
} else {
|
||||
@@ -1311,7 +1316,7 @@ class TicketController extends Controller
|
||||
'first_name' => Auth::user()->first_name,
|
||||
'last_name' => Auth::user()->last_name,
|
||||
];
|
||||
\Event::fire('change-status', [$data]);
|
||||
event('change-status', [$data]);
|
||||
|
||||
return 'your ticket'.$ticket_delete->ticket_number.' has been delete';
|
||||
}
|
||||
@@ -1384,7 +1389,7 @@ class TicketController extends Controller
|
||||
$data = [
|
||||
'id' => $id,
|
||||
];
|
||||
\Event::fire('ticket-assignment', [$data]);
|
||||
event('ticket-assignment', [$data]);
|
||||
$ticket_thread = Ticket_Thread::where('ticket_id', '=', $id)->first();
|
||||
$ticket_subject = $ticket_thread->title;
|
||||
$thread = new Ticket_Thread();
|
||||
@@ -1434,7 +1439,7 @@ class TicketController extends Controller
|
||||
'u_id' => Auth::user()->first_name.' '.Auth::user()->last_name,
|
||||
'body' => $InternalContent,
|
||||
];
|
||||
\Event::fire('Reply-Ticket', [$data]);
|
||||
event('Reply-Ticket', [$data]);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1613,7 +1618,7 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function autosearch($id)
|
||||
{
|
||||
$term = \Input::get('term');
|
||||
$term = Input::get('term');
|
||||
$user = \App\User::where('email', 'LIKE', '%'.$term.'%')->pluck('email');
|
||||
echo json_encode($user);
|
||||
}
|
||||
@@ -1786,7 +1791,7 @@ class TicketController extends Controller
|
||||
$tickets = Tickets::find($ticket->id);
|
||||
$tickets->delete();
|
||||
$data = ['id' => $ticket->id];
|
||||
\Event::fire('ticket-permanent-delete', [$data]);
|
||||
event('ticket-permanent-delete', [$data]);
|
||||
}
|
||||
}
|
||||
if ($value == 'Delete') {
|
||||
@@ -2125,9 +2130,9 @@ class TicketController extends Controller
|
||||
$email = $email;
|
||||
$ticket_id = $ticket_id;
|
||||
$validator = \Validator::make(
|
||||
['email' => $email,
|
||||
'name' => $name, ],
|
||||
['email' => 'required|email',
|
||||
['email' => $email,
|
||||
'name' => $name, ],
|
||||
['email' => 'required|email',
|
||||
]
|
||||
);
|
||||
$user = User::where('email', '=', $email)->first();
|
||||
@@ -2248,7 +2253,7 @@ class TicketController extends Controller
|
||||
Tickets::where('id', '=', $value)
|
||||
->update(['status' => 3]);
|
||||
//event has $p_id and $value
|
||||
\Event::fire('ticket.merge', [['parent' => $p_id, 'child' => $value]]);
|
||||
event('ticket.merge', [['parent' => $p_id, 'child' => $value]]);
|
||||
if (!empty(Input::get('reason'))) {
|
||||
$reason = Input::get('reason');
|
||||
} else {
|
||||
@@ -2440,7 +2445,7 @@ class TicketController extends Controller
|
||||
* @see https://github.com/dompdf/dompdf/issues/1272
|
||||
* For time bieng we are silencing the error using "@" operator in front of it
|
||||
*/
|
||||
return @PDF::load($html1)->show();
|
||||
return PdfFacade::load($html1)->show(false, false, false);
|
||||
} catch (Exception $ex) {
|
||||
return redirect()->back()->with('fails', $ex->getMessage());
|
||||
}
|
||||
@@ -2608,7 +2613,7 @@ class TicketController extends Controller
|
||||
$url = [];
|
||||
$encode = [];
|
||||
$img = [];
|
||||
foreach ($result as $key=>$img_tag) {
|
||||
foreach ($result as $key => $img_tag) {
|
||||
//dd($img_tag);
|
||||
preg_match_all('/(src)=("[^"]*")/i', $img_tag[$key], $img[$key]);
|
||||
}
|
||||
@@ -2664,7 +2669,7 @@ class TicketController extends Controller
|
||||
array_push($child_ticket_numbers, $value->ticket_number);
|
||||
}
|
||||
// dd(implode(", ",$child_ticket_numbers), $ticket_details->ticket_number);
|
||||
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticket_details->dept_id), $to = ['user' => $user_detail->full_name, 'email' => $user_detail->email], $message = ['subject' => '', 'body' => '', 'scenario' => 'merge-ticket-notification'], $template_variables = ['user' => $user_detail->full_name, 'ticket_number' => $ticket_details->ticket_number, 'ticket_link' => route('ticket.thread', $p_id), 'merged_ticket_numbers' => implode(', ', $child_ticket_numbers)]);
|
||||
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticket_details->dept_id), $to = ['user' => $user_detail->full_name, 'email' => $user_detail->email], $message = ['subject' => '', 'body' => '', 'scenario' => 'merge-ticket-notification'], $template_variables = ['user' => $user_detail->full_name, 'ticket_number' => $ticket_details->ticket_number, 'ticket_link' => route('ticket.thread', $p_id), 'merged_ticket_numbers' => implode(', ', $child_ticket_numbers)]);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
@@ -2683,7 +2688,7 @@ class TicketController extends Controller
|
||||
*/
|
||||
public function getTableFormat()
|
||||
{
|
||||
return \Datatable::table()
|
||||
return DatatableFacade::table()
|
||||
->addColumn(
|
||||
'<a class="checkbox-toggle"><i class="far fa-square fa-2x"></i></a>',
|
||||
Lang::get('lang.subject'),
|
||||
@@ -2715,7 +2720,7 @@ class TicketController extends Controller
|
||||
*/
|
||||
public static function genreateTableJson($tickets)
|
||||
{
|
||||
return \Datatables::of($tickets)
|
||||
return DataTables::of($tickets)
|
||||
->editColumn('id', function ($tickets) {
|
||||
$rep = ($tickets->last_replier == 'client') ? '#F39C12'
|
||||
: '#000';
|
||||
@@ -2726,7 +2731,7 @@ class TicketController extends Controller
|
||||
if (isset($tickets->ticket_title)) {
|
||||
$string = utfEncoding($tickets->ticket_title);
|
||||
if (strlen($string) > 25) {
|
||||
$string = str_limit($string, 30).'...';
|
||||
$string = Str::limit($string, 30).'...';
|
||||
}
|
||||
} else {
|
||||
$string = Lang::get('lang.no-subject');
|
||||
@@ -2795,7 +2800,7 @@ class TicketController extends Controller
|
||||
$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').' '.strip_tags($name).'''.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".str_limit(strip_tags($name), 30).' <span style="color:#f75959">'.$color.'</span></span></a>';
|
||||
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.strip_tags($name).'''.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".Str::limit(strip_tags($name), 30).' <span style="color:#f75959">'.$color.'</span></span></a>';
|
||||
})
|
||||
->editColumn('a_uname', function ($tickets) {
|
||||
if ($tickets->assigned_to == null && $tickets->name == null) {
|
||||
@@ -2814,7 +2819,16 @@ class TicketController extends Controller
|
||||
}
|
||||
}
|
||||
})
|
||||
->editColumn('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);
|
||||
})
|
||||
->rawColumns(['id', 'title', 'ticket_number', 'c_uname', 'a_uname', 'updated_at'])
|
||||
->make();
|
||||
}
|
||||
|
||||
@@ -3158,13 +3172,13 @@ class TicketController extends Controller
|
||||
|
||||
public static function getTable($tickets)
|
||||
{
|
||||
return \Datatables::of($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);
|
||||
$string = Str::limit($tickets->ticket_title, 20);
|
||||
} else {
|
||||
$string = '(no subject)';
|
||||
}
|
||||
@@ -3220,7 +3234,7 @@ class TicketController extends Controller
|
||||
$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>';
|
||||
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) {
|
||||
@@ -3250,6 +3264,7 @@ class TicketController extends Controller
|
||||
|
||||
return '<span style="display:none">'.$updated.'</span>'.UTC::usertimezone($updated);
|
||||
})
|
||||
->rawColumns(['id', 'title', 'ticket_number', 'priority', 'user_name', 'assign_user_name', 'updated_at', 'created_at'])
|
||||
->make();
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ use Exception;
|
||||
use GeoIP;
|
||||
use Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Lang;
|
||||
use Redirect;
|
||||
|
||||
@@ -151,7 +151,7 @@ class UserController extends Controller
|
||||
}
|
||||
// displaying list of users with chumper datatables
|
||||
// return \Datatable::collection(User::where('role', "!=", "admin")->get())
|
||||
return \Datatables::of($users)
|
||||
return \Yajra\DataTables\Facades\DataTables::of($users)
|
||||
/* column username */
|
||||
->removeColumn('id', 'last_name', 'country_code', 'phone_number')
|
||||
->addColumn('user_name', function ($model) {
|
||||
@@ -231,6 +231,7 @@ class UserController extends Controller
|
||||
}
|
||||
}
|
||||
})
|
||||
->rawColumns(['user_name', 'email', 'mobile', 'active', 'updated_at', 'role', 'Actions'])
|
||||
->make();
|
||||
}
|
||||
|
||||
@@ -332,7 +333,7 @@ class UserController extends Controller
|
||||
// returns for the success case
|
||||
$email_mandatory = CommonSettings::select('status')->where('option_name', '=', 'email_mandatory')->first();
|
||||
if (($request->input('active') == '0' || $request->input('active') == 0) || ($email_mandatory->status == '0') || $email_mandatory->status == 0) {
|
||||
\Event::fire(new \App\Events\LoginEvent($request));
|
||||
event(new \App\Events\LoginEvent($request));
|
||||
}
|
||||
|
||||
return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully'));
|
||||
@@ -656,7 +657,7 @@ class UserController extends Controller
|
||||
// $org_name=Organization::where('id','=',$org_id)->pluck('name')->first();
|
||||
// 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);
|
||||
} catch (Exception $e) {
|
||||
return redirect()->back()->with('fails', $e->getMessage());
|
||||
}
|
||||
@@ -912,7 +913,7 @@ class UserController extends Controller
|
||||
// checking if the name is unique
|
||||
$check2 = Organization::where('name', '=', Input::get('name'))->first();
|
||||
// if any of the fields is not available then return false
|
||||
if (\Input::get('name') == null) {
|
||||
if (Input::get('name') == null) {
|
||||
return 'Name is required';
|
||||
} elseif ($check2 != null) {
|
||||
return 'Name should be Unique';
|
||||
@@ -995,7 +996,7 @@ class UserController extends Controller
|
||||
$users = $this->getUsers($first_date, $second_date);
|
||||
$excel_controller = new \App\Http\Controllers\Common\ExcelController();
|
||||
$filename = 'users'.$date;
|
||||
$excel_controller->export($filename, $users);
|
||||
return $excel_controller->export($filename, $users);
|
||||
} catch (Exception $ex) {
|
||||
return redirect()->back()->with('fails', $ex->getMessage());
|
||||
}
|
||||
@@ -1028,7 +1029,7 @@ class UserController extends Controller
|
||||
if (\Schema::hasTable('sms')) {
|
||||
$sms = DB::table('sms')->get();
|
||||
if (count($sms) > 0) {
|
||||
\Event::fire(new \App\Events\LoginEvent($request));
|
||||
event(new \App\Events\LoginEvent($request));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@@ -4,22 +4,23 @@ namespace App\Http\Controllers\Agent\kb;
|
||||
|
||||
// Controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
// Requests
|
||||
use App\Http\Requests\kb\ArticleRequest;
|
||||
// Requests
|
||||
use App\Http\Requests\kb\ArticleUpdate;
|
||||
// Models
|
||||
use App\Model\kb\Article;
|
||||
// Models
|
||||
use App\Model\kb\Category;
|
||||
use App\Model\kb\Comment;
|
||||
use App\Model\kb\Relationship;
|
||||
use App\Model\kb\Settings;
|
||||
// Classes
|
||||
use Auth;
|
||||
// Classes
|
||||
use Chumper\Datatable\Table;
|
||||
use Datatable;
|
||||
use DB;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
use Redirect;
|
||||
|
||||
@@ -72,7 +73,7 @@ class ArticleController extends Controller
|
||||
|
||||
/* add column name */
|
||||
->addColumn('name', function ($model) {
|
||||
$name = str_limit($model->name, 20, '...');
|
||||
$name = Str::limit($model->name, 20, '...');
|
||||
|
||||
return "<p title=$model->name>$name</p>";
|
||||
})
|
||||
@@ -157,7 +158,7 @@ class ArticleController extends Controller
|
||||
$publishTime = $request->input('year').'-'.$request->input('month').'-'.$request->input('day').' '.$request->input('hour').':'.$request->input('minute').':00';
|
||||
|
||||
$sl = $request->input('name');
|
||||
$slug = str_slug($sl, '-');
|
||||
$slug = Str::slug($sl, '-');
|
||||
$article->slug = $slug;
|
||||
$article->publish_time = $publishTime;
|
||||
$article->fill($request->except('created_at', 'slug'))->save();
|
||||
@@ -229,7 +230,7 @@ class ArticleController extends Controller
|
||||
|
||||
$id = $aid->id;
|
||||
$sl = $request->input('slug');
|
||||
$slug = str_slug($sl, '-');
|
||||
$slug = Str::slug($sl, '-');
|
||||
// dd($slug);
|
||||
|
||||
$article->slug = $slug;
|
||||
|
@@ -5,15 +5,16 @@ namespace App\Http\Controllers\Agent\kb;
|
||||
// Controllers
|
||||
use App\Http\Controllers\Agent\helpdesk\TicketController;
|
||||
use App\Http\Controllers\Controller;
|
||||
// Requests
|
||||
use App\Http\Requests\kb\CategoryRequest;
|
||||
// Requests
|
||||
use App\Http\Requests\kb\CategoryUpdate;
|
||||
// Model
|
||||
use App\Model\kb\Category;
|
||||
// Model
|
||||
use App\Model\kb\Relationship;
|
||||
// Classes
|
||||
use Datatable;
|
||||
// Classes
|
||||
use Exception;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
use Redirect;
|
||||
|
||||
@@ -78,7 +79,7 @@ class CategoryController extends Controller
|
||||
->addColumn('name', function ($model) {
|
||||
$string = strip_tags($model->name);
|
||||
|
||||
return str_limit($string, 20);
|
||||
return Str::limit($string, 20);
|
||||
})
|
||||
/* add column Created */
|
||||
->addColumn('Created', function ($model) {
|
||||
@@ -143,7 +144,7 @@ class CategoryController extends Controller
|
||||
{
|
||||
/* Get the whole request from the form and insert into table via model */
|
||||
$sl = $request->input('name');
|
||||
$slug = str_slug($sl, '-');
|
||||
$slug = Str::slug($sl, '-');
|
||||
$category->slug = $slug;
|
||||
// send success message to index page
|
||||
try {
|
||||
@@ -187,7 +188,7 @@ class CategoryController extends Controller
|
||||
/* Edit the selected category via id */
|
||||
$category = Category::where('id', $id)->first();
|
||||
$sl = $request->input('name');
|
||||
$slug = str_slug($sl, '-');
|
||||
$slug = Str::slug($sl, '-');
|
||||
/* update the values at the table via model according with the request */
|
||||
//redirct to index page with success message
|
||||
try {
|
||||
|
@@ -4,15 +4,16 @@ namespace App\Http\Controllers\Agent\kb;
|
||||
|
||||
use App\Http\Controllers\Agent\helpdesk\TicketController;
|
||||
use App\Http\Controllers\Controller;
|
||||
// request
|
||||
use App\Http\Requests\kb\PageRequest;
|
||||
// request
|
||||
use App\Http\Requests\kb\PageUpdate;
|
||||
use App\Model\kb\Page;
|
||||
// Model
|
||||
use Datatable;
|
||||
// classes
|
||||
// Model
|
||||
use Exception;
|
||||
// classes
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
@@ -127,7 +128,7 @@ class PageController extends Controller
|
||||
public function store(PageRequest $request)
|
||||
{
|
||||
$sl = $request->input('name');
|
||||
$slug = str_slug($sl, '-');
|
||||
$slug = Str::slug($sl, '-');
|
||||
$this->page->slug = $slug;
|
||||
|
||||
try {
|
||||
@@ -170,7 +171,7 @@ class PageController extends Controller
|
||||
// get pages with respect to slug
|
||||
$pages = $this->page->where('slug', $slug)->first();
|
||||
$sl = $request->input('name');
|
||||
$slug = str_slug($sl, '-');
|
||||
$slug = Str::slug($sl, '-');
|
||||
|
||||
try {
|
||||
$pages->fill($request->all())->save();
|
||||
|
@@ -16,8 +16,8 @@ use App\Model\kb\Settings;
|
||||
use Config;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Image;
|
||||
use Input;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
|
@@ -5,8 +5,8 @@ namespace App\Http\Controllers\Auth;
|
||||
// controllers
|
||||
use App\Http\Controllers\Admin\helpdesk\SocialMedia\SocialMediaController;
|
||||
use App\Http\Controllers\Common\PhpMailController;
|
||||
// requests
|
||||
use App\Http\Controllers\Controller;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\LoginRequest;
|
||||
use App\Http\Requests\helpdesk\OtpVerifyRequest;
|
||||
use App\Http\Requests\helpdesk\RegisterRequest;
|
||||
@@ -14,8 +14,8 @@ use App\Model\helpdesk\Settings\CommonSettings;
|
||||
use App\Model\helpdesk\Settings\Plugin;
|
||||
use App\Model\helpdesk\Settings\Security;
|
||||
use App\Model\helpdesk\Ticket\Ticket_Thread;
|
||||
// classes
|
||||
use App\Model\helpdesk\Ticket\Tickets;
|
||||
// classes
|
||||
use App\Model\helpdesk\Utility\Otp;
|
||||
use App\User;
|
||||
use Auth;
|
||||
@@ -23,6 +23,7 @@ use DateTime;
|
||||
use DB;
|
||||
use Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
use Socialite;
|
||||
|
||||
@@ -42,11 +43,15 @@ class AuthController extends Controller
|
||||
|
||||
// if auth is agent
|
||||
protected $redirectTo = '/dashboard';
|
||||
|
||||
// if auth is user
|
||||
protected $redirectToUser = '/profile';
|
||||
|
||||
/* Direct After Logout */
|
||||
protected $redirectAfterLogout = '/';
|
||||
|
||||
protected $loginPath = '/auth/login';
|
||||
|
||||
protected $social;
|
||||
|
||||
/**
|
||||
@@ -127,7 +132,7 @@ class AuthController extends Controller
|
||||
$settings = $settings->select('status')->where('option_name', '=', 'send_otp')->first();
|
||||
$email_mandatory = $settings->select('status')->where('option_name', '=', 'email_mandatory')->first();
|
||||
//dd($settings->status);
|
||||
\Event::fire(new \App\Events\FormRegisterEvent());
|
||||
event(new \App\Events\FormRegisterEvent());
|
||||
if (Auth::user()) {
|
||||
if (Auth::user()->role == 'admin' || Auth::user()->role == 'agent') {
|
||||
return \Redirect::route('dashboard');
|
||||
@@ -177,14 +182,14 @@ class AuthController extends Controller
|
||||
$user->user_name = $request->input('email');
|
||||
}
|
||||
$user->role = 'user';
|
||||
$code = str_random(60);
|
||||
$code = Str::random(60);
|
||||
$user->remember_token = $code;
|
||||
$user->save();
|
||||
$message12 = '';
|
||||
$settings = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
|
||||
$sms = Plugin::select('status')->where('name', '=', 'SMS')->first();
|
||||
// Event for login
|
||||
\Event::fire(new \App\Events\LoginEvent($request));
|
||||
event(new \App\Events\LoginEvent($request));
|
||||
if ($request->input('email') !== '') {
|
||||
$var = $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('1', '0'), $to = ['name' => $name, 'email' => $request->input('email')], $message = ['subject' => null, 'scenario' => 'registration'], $template_variables = ['user' => $name, 'email_address' => $request->input('email'), 'password_reset_link' => url('account/activate/'.$code)]);
|
||||
}
|
||||
@@ -296,7 +301,7 @@ class AuthController extends Controller
|
||||
{
|
||||
try {
|
||||
// dd($request->input());
|
||||
\Event::fire('auth.login.event', []); //added 5/5/2016
|
||||
event('auth.login.event', []); //added 5/5/2016
|
||||
// Set login attempts and login time
|
||||
$value = $_SERVER['REMOTE_ADDR'];
|
||||
$usernameinput = $request->input('email');
|
||||
@@ -321,10 +326,10 @@ class AuthController extends Controller
|
||||
return redirect()->back()
|
||||
->withInput($request->only('email', 'remember'))
|
||||
->withErrors([
|
||||
'email' => $this->getFailedLoginMessage(),
|
||||
'password' => $this->getFailedLoginMessage(),
|
||||
])->with(['error' => Lang::get('lang.not-registered'),
|
||||
'referer' => $referer, ]);
|
||||
'email' => $this->getFailedLoginMessage(),
|
||||
'password' => $this->getFailedLoginMessage(),
|
||||
])->with(['error' => Lang::get('lang.not-registered'),
|
||||
'referer' => $referer, ]);
|
||||
}
|
||||
|
||||
//if user exists
|
||||
@@ -343,11 +348,11 @@ class AuthController extends Controller
|
||||
// user has mobile number return verify OTP screen
|
||||
return \Redirect::route('otp-verification')
|
||||
->withInput($request->input())
|
||||
->with(['values' => $request->input(),
|
||||
'referer' => $referer,
|
||||
'name' => $check_active->first_name,
|
||||
'number' => $check_active->mobile,
|
||||
'code' => $check_active->country_code, ]);
|
||||
->with(['values' => $request->input(),
|
||||
'referer' => $referer,
|
||||
'name' => $check_active->first_name,
|
||||
'number' => $check_active->mobile,
|
||||
'code' => $check_active->country_code, ]);
|
||||
} else {
|
||||
goto a; //attenmpt login (be careful while using goto statements)
|
||||
}
|
||||
@@ -367,10 +372,10 @@ class AuthController extends Controller
|
||||
return redirect()->back()
|
||||
->withInput($request->only('email', 'remember'))
|
||||
->withErrors([
|
||||
'email' => $this->getFailedLoginMessage(),
|
||||
'password' => $this->getFailedLoginMessage(),
|
||||
])->with(['error' => Lang::get('lang.this_account_is_currently_inactive'),
|
||||
'referer' => $referer, ]);
|
||||
'email' => $this->getFailedLoginMessage(),
|
||||
'password' => $this->getFailedLoginMessage(),
|
||||
])->with(['error' => Lang::get('lang.this_account_is_currently_inactive'),
|
||||
'referer' => $referer, ]);
|
||||
} else {
|
||||
// try login
|
||||
$loginAttempts = 1;
|
||||
@@ -416,10 +421,10 @@ class AuthController extends Controller
|
||||
return redirect()->back()
|
||||
->withInput($request->only('email', 'remember'))
|
||||
->withErrors([
|
||||
'email' => $this->getFailedLoginMessage(),
|
||||
'password' => $this->getFailedLoginMessage(),
|
||||
])->with(['error' => Lang::get('lang.invalid'),
|
||||
'referer' => $referer, ]);
|
||||
'email' => $this->getFailedLoginMessage(),
|
||||
'password' => $this->getFailedLoginMessage(),
|
||||
])->with(['error' => Lang::get('lang.invalid'),
|
||||
'referer' => $referer, ]);
|
||||
// Increment login attempts
|
||||
} catch (\Exception $e) {
|
||||
return redirect()->back()->with('fails', $e->getMessage());
|
||||
@@ -592,7 +597,7 @@ class AuthController extends Controller
|
||||
} else {
|
||||
$sms = DB::table('sms')->get();
|
||||
if (count($sms) > 0) {
|
||||
\Event::fire(new \App\Events\LoginEvent($request));
|
||||
event(new \App\Events\LoginEvent($request));
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
@@ -651,7 +656,7 @@ class AuthController extends Controller
|
||||
*/
|
||||
public function getLogout(Request $request)
|
||||
{
|
||||
\Event::fire('user.logout', []);
|
||||
event('user.logout', []);
|
||||
$login = new LoginController();
|
||||
|
||||
return $login->logout($request);
|
||||
|
40
app/Http/Controllers/Auth/ConfirmPasswordController.php
Normal file
40
app/Http/Controllers/Auth/ConfirmPasswordController.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\ConfirmsPasswords;
|
||||
|
||||
class ConfirmPasswordController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Confirm Password Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This controller is responsible for handling password confirmations and
|
||||
| uses a simple trait to include the behavior. You're free to explore
|
||||
| this trait and override any functions that require customization.
|
||||
|
|
||||
*/
|
||||
|
||||
use ConfirmsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users when the intended url fails.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
}
|
@@ -7,7 +7,9 @@ use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Http\Request;
|
||||
use Lang;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Lang;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
@@ -47,19 +49,19 @@ class ForgotPasswordController extends Controller
|
||||
try {
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$this->validate($request, ['email' => 'required']);
|
||||
\Event::fire('reset.password', []);
|
||||
event('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();
|
||||
$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 = 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]);
|
||||
$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) {
|
||||
@@ -73,7 +75,7 @@ class ForgotPasswordController extends Controller
|
||||
'name' => $name,
|
||||
'mobile' => $user->mobile,
|
||||
'code' => $user->country_code, ];
|
||||
\Event::fire('reset.password2', [$value]);
|
||||
event('reset.password2', [$value]);
|
||||
}
|
||||
|
||||
return redirect()->back()->with('status', Lang::get('lang.we_have_e-mailed_your_password_reset_link'));
|
||||
|
@@ -18,6 +18,7 @@ class LoginController extends Controller
|
||||
|
|
||||
*/
|
||||
use AuthenticatesUsers;
|
||||
|
||||
//use AuthenticatesAndRegistersUsers, ThrottlesLogins;
|
||||
/**
|
||||
* Where to redirect users after login.
|
||||
|
@@ -5,12 +5,13 @@ namespace App\Http\Controllers\Auth;
|
||||
// controllers
|
||||
use App\Http\Controllers\Common\PhpMailController;
|
||||
use App\Http\Controllers\Controller;
|
||||
// request
|
||||
use App\User;
|
||||
// request
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
// model
|
||||
// classes
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
@@ -53,12 +54,12 @@ class PasswordController extends Controller
|
||||
try {
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$this->validate($request, ['email' => 'required']);
|
||||
\Event::fire('reset.password', []);
|
||||
event('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);
|
||||
$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]);
|
||||
@@ -79,7 +80,7 @@ class PasswordController extends Controller
|
||||
'name' => $name,
|
||||
'mobile' => $user->mobile,
|
||||
'code' => $user->country_code, ];
|
||||
\Event::fire('reset.password2', [$value]);
|
||||
event('reset.password2', [$value]);
|
||||
}
|
||||
|
||||
return redirect()->back()->with('status', Lang::get('lang.we_have_e-mailed_your_password_reset_link'));
|
||||
|
@@ -3,8 +3,10 @@
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use App\User;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class RegisterController extends Controller
|
||||
@@ -19,14 +21,15 @@ class RegisterController extends Controller
|
||||
| provide this functionality without requiring any additional code.
|
||||
|
|
||||
*/
|
||||
|
||||
use RegistersUsers;
|
||||
use AuthenticatesAndRegistersUsers;
|
||||
|
||||
/**
|
||||
* Where to redirect users after registration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
@@ -48,9 +51,9 @@ class RegisterController extends Controller
|
||||
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',
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -59,14 +62,14 @@ class RegisterController extends Controller
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return User
|
||||
* @return \App\User
|
||||
*/
|
||||
protected function create(array $data)
|
||||
{
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
'password' => Hash::make($data['password']),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -19,12 +20,13 @@ class ResetPasswordController extends Controller
|
||||
|
|
||||
*/
|
||||
use ResetsPasswords;
|
||||
|
||||
/**
|
||||
* Where to redirect users after resetting their password.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = RouteServiceProvider::HOME;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
@@ -24,7 +24,7 @@ use App\User;
|
||||
/* include tickets model */
|
||||
/* TicketRequest to validate the ticket response */
|
||||
/* Validate post check ticket */
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Redirect;
|
||||
|
||||
/**
|
||||
@@ -292,7 +292,7 @@ class UserController extends Controller
|
||||
*/
|
||||
public function UserAssignOrg($id)
|
||||
{
|
||||
$org = Input::get('org');
|
||||
$org = Request::get('org');
|
||||
$user_org = new User_org();
|
||||
$user_org->org_id = $org;
|
||||
$user_org->user_id = $id;
|
||||
@@ -308,17 +308,17 @@ class UserController extends Controller
|
||||
*/
|
||||
public function User_Create_Org($id)
|
||||
{
|
||||
if (Input::get('website') != null) {
|
||||
if (Request::get('website') != null) {
|
||||
// checking website
|
||||
$check = Organization::where('website', '=', Input::get('website'))->first();
|
||||
$check = Organization::where('website', '=', Request::get('website'))->first();
|
||||
} else {
|
||||
$check = null;
|
||||
}
|
||||
|
||||
// checking name
|
||||
$check2 = Organization::where('name', '=', Input::get('name'))->first();
|
||||
$check2 = Organization::where('name', '=', Request::get('name'))->first();
|
||||
|
||||
if (\Input::get('name') == null) {
|
||||
if (Request::get('name') == null) {
|
||||
return 'Name is required';
|
||||
} elseif ($check2 != null) {
|
||||
return 'Name should be Unique';
|
||||
@@ -326,11 +326,11 @@ class UserController extends Controller
|
||||
return 'Website should be Unique';
|
||||
} else {
|
||||
$org = new Organization();
|
||||
$org->name = Input::get('name');
|
||||
$org->phone = Input::get('phone');
|
||||
$org->website = Input::get('website');
|
||||
$org->address = Input::get('address');
|
||||
$org->internal_notes = Input::get('internal');
|
||||
$org->name = Request::get('name');
|
||||
$org->phone = Request::get('phone');
|
||||
$org->website = Request::get('website');
|
||||
$org->address = Request::get('address');
|
||||
$org->internal_notes = Request::get('internal');
|
||||
$org->save();
|
||||
|
||||
$user_org = new User_org();
|
||||
|
@@ -83,7 +83,7 @@ class FormController extends Controller
|
||||
$phonecode = '';
|
||||
}
|
||||
|
||||
list($max_size_in_bytes, $max_size_in_actual) = $this->fileUploadController->file_upload_max_size();
|
||||
[$max_size_in_bytes, $max_size_in_actual] = $this->fileUploadController->file_upload_max_size();
|
||||
|
||||
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'email_mandatory', 'max_size_in_bytes', 'max_size_in_actual'))->with('phonecode', $phonecode);
|
||||
} else {
|
||||
@@ -229,7 +229,7 @@ class FormController extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
\Event::fire(new \App\Events\ClientTicketFormPost($form_extras, $email, $source));
|
||||
event(new \App\Events\ClientTicketFormPost($form_extras, $email, $source));
|
||||
$result = $this->TicketWorkflowController->workflow($email, $name, $subject, $details, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $department, $assignto, $team_assign, $status, $form_extras, $auto_response);
|
||||
// dd($result);
|
||||
if ($result[1] == 1) {
|
||||
|
@@ -28,7 +28,7 @@ use Exception;
|
||||
use GeoIP;
|
||||
use Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Lang;
|
||||
use Socialite;
|
||||
|
||||
@@ -125,7 +125,7 @@ class GuestController extends Controller
|
||||
/**
|
||||
*@category fucntion to check if mobile number is unqique or not
|
||||
*
|
||||
*@param string $mobile
|
||||
*@param string $mobile
|
||||
*
|
||||
*@return bool true(if mobile exists in users table)/false (if mobile does not exist in user table)
|
||||
*/
|
||||
@@ -392,7 +392,7 @@ class GuestController extends Controller
|
||||
if (\Schema::hasTable('sms')) {
|
||||
$sms = DB::table('sms')->get();
|
||||
if (count($sms) > 0) {
|
||||
\Event::fire(new \App\Events\LoginEvent($request));
|
||||
event(new \App\Events\LoginEvent($request));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@@ -326,7 +326,7 @@ class UnAuthController extends Controller
|
||||
/**
|
||||
*@category function to change system's language
|
||||
*
|
||||
*@param string $lang //desired language's iso code
|
||||
*@param string $lang //desired language's iso code
|
||||
*
|
||||
*@return response
|
||||
*/
|
||||
@@ -337,7 +337,7 @@ class UnAuthController extends Controller
|
||||
// return Cache::get('language');
|
||||
//} else return 'false';
|
||||
// Cache::put('language',$)
|
||||
$path = base_path('resources/lang'); // Path to check available language packages
|
||||
$path = base_path('lang'); // Path to check available language packages
|
||||
if (array_key_exists($lang, \Config::get('languages')) && in_array($lang, scandir($path))) {
|
||||
// dd(array_key_exists($lang, Config::get('languages')));
|
||||
// app()->setLocale($lang);
|
||||
@@ -431,7 +431,7 @@ class UnAuthController extends Controller
|
||||
*/
|
||||
public static function changeUserLanguage($lang)
|
||||
{
|
||||
$path = base_path('resources/lang'); // Path to check available language packages
|
||||
$path = base_path('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;
|
||||
|
@@ -48,7 +48,7 @@ class UserController extends Controller
|
||||
$article->setPath('article-list');
|
||||
$categorys = $category->get();
|
||||
|
||||
return view('themes.default1.client.kb.article-list.articles', compact('time', 'categorys', 'article'));
|
||||
return view('themes.default1.client.kb.article-list.articles', compact('categorys', 'article'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -8,7 +8,7 @@ use App\Model\helpdesk\Ticket\Tickets;
|
||||
use DB;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Lang;
|
||||
use Log;
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers\Common;
|
||||
|
||||
use Exception;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
|
||||
|
||||
class CommonMailer
|
||||
{
|
||||
@@ -12,17 +13,12 @@ class CommonMailer
|
||||
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 = new EsmtpTransport($config['host'], $config['port']);
|
||||
$transport->setUsername($config['username']);
|
||||
$transport->setPassword($config['password']);
|
||||
$transport->setStreamOptions($https);
|
||||
$set = new \Swift_Mailer($transport);
|
||||
|
||||
// Set the mailer
|
||||
\Mail::setSwiftMailer($set);
|
||||
\Mail::setSymfonyTransport($transport);
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
|
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers\Common;
|
||||
|
||||
use App\Exports\UserExport;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Excel;
|
||||
//use Excel;
|
||||
use Exception;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class ExcelController extends Controller
|
||||
{
|
||||
@@ -13,10 +15,7 @@ class ExcelController extends Controller
|
||||
if (count($data) == 0) {
|
||||
throw new Exception('No data');
|
||||
}
|
||||
Excel::create($filename, function ($excel) use ($data) {
|
||||
$excel->sheet('sheet', function ($sheet) use ($data) {
|
||||
$sheet->fromArray($data);
|
||||
});
|
||||
})->export('xls');
|
||||
//dd(Excel::download(new UserExport($data), $filename.'.'.'xls'));
|
||||
return Excel::download(new UserExport($data), $filename.'.'.'xlsx');
|
||||
}
|
||||
}
|
||||
|
@@ -182,11 +182,11 @@ class PhpMailController extends Controller
|
||||
{
|
||||
switch ($mail->sending_protocol) {
|
||||
case 'smtp':
|
||||
$config = ['host' => $mail->sending_host,
|
||||
'port' => $mail->sending_port,
|
||||
'security' => $mail->sending_encryption,
|
||||
'username' => $mail->email_address,
|
||||
'password' => $mail->password,
|
||||
$config = ['host' => $mail->sending_host,
|
||||
'port' => $mail->sending_port,
|
||||
'security' => $mail->sending_encryption,
|
||||
'username' => $mail->email_address,
|
||||
'password' => $mail->password,
|
||||
];
|
||||
if (!$this->commonMailer->setSmtpDriver($config)) {
|
||||
\Log::info('Invaid configuration :- '.$config);
|
||||
@@ -237,6 +237,7 @@ class PhpMailController extends Controller
|
||||
//dd($to, $toname, $subject, $data, $cc, $attach);
|
||||
//dd(\Config::get('mail'));
|
||||
//dd($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->from($from_address->email_address, $from_address->email_name);
|
||||
@@ -263,6 +264,7 @@ class PhpMailController extends Controller
|
||||
$name = $attach[$i]['file_name'];
|
||||
$mime = $attach[$i]['mime'];
|
||||
$this->attachmentMode($m, $file, $name, $mime, $mode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,20 +4,21 @@ namespace App\Http\Controllers\Common;
|
||||
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
// requests
|
||||
use App\Http\Requests;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\SmtpRequest;
|
||||
use App\Model\helpdesk\Email\Smtp;
|
||||
// models
|
||||
use App\Model\helpdesk\Settings\Plugin;
|
||||
// models
|
||||
use App\Model\helpdesk\Theme\Widgets;
|
||||
use Config;
|
||||
// classes
|
||||
use Crypt;
|
||||
// classes
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Collection;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Lang;
|
||||
|
||||
/**
|
||||
@@ -306,7 +307,7 @@ class SettingsController extends Controller
|
||||
return \Datatable::collection(new Collection($plugins))
|
||||
->searchColumns('name')
|
||||
->addColumn('name', function ($model) {
|
||||
if (array_has($model, 'path')) {
|
||||
if (Arr::has($model, 'path')) {
|
||||
if ($model['status'] == 0) {
|
||||
$activate = '<a href='.url('plugin/status/'.$model['path']).'>Activate</a>';
|
||||
$settings = ' ';
|
||||
|
@@ -19,6 +19,7 @@ use Lang;
|
||||
class TemplateController extends Controller
|
||||
{
|
||||
public $template;
|
||||
|
||||
public $type;
|
||||
|
||||
public function __construct()
|
||||
|
@@ -5,25 +5,27 @@ namespace App\Http\Controllers\Installer\helpdesk;
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
// requests
|
||||
use App\Http\Controllers\Update\SyncFaveoToLatestVersion;
|
||||
use App\Http\Requests\helpdesk\InstallerRequest;
|
||||
use App\Model\helpdesk\Settings\System;
|
||||
// models
|
||||
use App\Model\helpdesk\Utility\Date_time_format;
|
||||
use App\Model\helpdesk\Utility\Timezones;
|
||||
use App\User;
|
||||
use Artisan;
|
||||
Use Illuminate\Support\Facades\Artisan;
|
||||
// classes
|
||||
use Cache;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use DB;
|
||||
use Exception;
|
||||
use File;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Hash;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Redirect;
|
||||
use Session;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use UnAuth;
|
||||
use View;
|
||||
use Illuminate\Support\Facades\View;
|
||||
|
||||
/**
|
||||
* |=======================================================================
|
||||
@@ -257,7 +259,7 @@ class InstallController extends Controller
|
||||
return redirect()->back()->with('fails', 'invalid date-time format');
|
||||
}
|
||||
|
||||
$lang_path = base_path('resources/lang');
|
||||
$lang_path = base_path('lang');
|
||||
|
||||
//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))) {
|
||||
@@ -285,15 +287,15 @@ class InstallController extends Controller
|
||||
$admin_tzone = $timezones->id;
|
||||
// creating an user
|
||||
$user = User::updateOrCreate(['id' => 1], [
|
||||
'first_name' => $firstname,
|
||||
'last_name' => $lastname,
|
||||
'email' => $email,
|
||||
'user_name' => $username,
|
||||
'password' => Hash::make($password),
|
||||
'first_name' => $firstname,
|
||||
'last_name' => $lastname,
|
||||
'email' => $email,
|
||||
'user_name' => $username,
|
||||
'password' => Hash::make($password),
|
||||
//'assign_group' => 1,
|
||||
'primary_dpt' => 1,
|
||||
'active' => 1,
|
||||
'role' => 'admin',
|
||||
'primary_dpt' => 1,
|
||||
'active' => 1,
|
||||
'role' => 'admin',
|
||||
]);
|
||||
|
||||
// checking if the user have been created
|
||||
@@ -434,7 +436,8 @@ class InstallController extends Controller
|
||||
$ENV['DB_DATABASE'] = '"'.$database.'"';
|
||||
$ENV['DB_USERNAME'] = '"'.$dbusername.'"';
|
||||
$ENV['DB_PASSWORD'] = '"'.$dbpassword.'"';
|
||||
$ENV['MAIL_DRIVER'] = 'smtp';
|
||||
$ENV['DB_ENGINE'] = 'InnoDB';
|
||||
$ENV['MAIL_MAILER'] = 'smtp';
|
||||
$ENV['MAIL_HOST'] = 'mailtrap.io';
|
||||
$ENV['MAIL_PORT'] = '2525';
|
||||
$ENV['MAIL_USERNAME'] = 'null';
|
||||
@@ -442,7 +445,7 @@ class InstallController extends Controller
|
||||
$ENV['CACHE_DRIVER'] = 'file';
|
||||
$ENV['SESSION_DRIVER'] = 'file';
|
||||
$ENV['SESSION_COOKIE_NAME'] = 'faveo_'.rand(0, 10000);
|
||||
$ENV['QUEUE_DRIVER'] = 'sync';
|
||||
$ENV['QUEUE_CONNECTION'] = 'sync';
|
||||
$ENV['JWT_TTL'] = 4;
|
||||
$ENV['FCM_SERVER_KEY'] = 'AIzaSyCyx5OFnsRFUmDLTMbPV50ZMDUGSG-bLw4';
|
||||
$ENV['FCM_SENDER_ID'] = '661051343223';
|
||||
@@ -489,29 +492,23 @@ class InstallController extends Controller
|
||||
|
||||
public function migrate()
|
||||
{
|
||||
$db_install_method = '';
|
||||
|
||||
try {
|
||||
$tableNames = \Schema::getConnection()->getDoctrineSchemaManager()->listTableNames();
|
||||
$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 {
|
||||
(new SyncFaveoToLatestVersion())->sync();
|
||||
if (Cache::get('dummy_data_installation')) {
|
||||
$path = base_path().DIRECTORY_SEPARATOR.'DB'.DIRECTORY_SEPARATOR.'dummy-data.sql';
|
||||
DB::unprepared(file_get_contents($path));
|
||||
$db_install_method = 'dump';
|
||||
}
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
dd($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];
|
||||
$result = ['success' => 'Database has been setup successfully.'];
|
||||
|
||||
return response()->json(compact('result'));
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
|
||||
use Exception;
|
||||
use Form;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Request as Input;
|
||||
|
||||
class MailController extends Controller
|
||||
{
|
||||
@@ -31,7 +32,7 @@ class MailController extends Controller
|
||||
|
||||
public function form($label, $name, $class)
|
||||
{
|
||||
$mailid = \Input::get('emailid');
|
||||
$mailid = Input::get('emailid');
|
||||
if ($mailid) {
|
||||
$emails = new \App\Model\helpdesk\Email\Emails();
|
||||
$email = $emails->find($mailid);
|
||||
|
65
app/Http/Controllers/Update/SyncFaveoToLatestVersion.php
Normal file
65
app/Http/Controllers/Update/SyncFaveoToLatestVersion.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Update;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Model\helpdesk\Settings\System;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class SyncFaveoToLatestVersion extends Controller
|
||||
{
|
||||
public function sync()
|
||||
{
|
||||
ini_set('memory_limit', '-1');
|
||||
ini_set('max_execution_time', '-1');
|
||||
set_time_limit(0);
|
||||
|
||||
$latestVersion = $this->getPhpComaptibleVersion(Config::get('app.version'));
|
||||
$olderVersion = $this->getOlderVersion();
|
||||
|
||||
if (version_compare($latestVersion, $olderVersion) == 1) {
|
||||
$this->updateToLatestVersion($olderVersion);
|
||||
}
|
||||
Artisan::call('storage:link');
|
||||
System::first()->update(['version' => Config::get('app.version')]);
|
||||
}
|
||||
|
||||
private function updateToLatestVersion($olderVersion)
|
||||
{
|
||||
Artisan::call('migrate', ['--force' => true]);
|
||||
|
||||
$seederPath = base_path('database'.DIRECTORY_SEPARATOR.'seeders');
|
||||
|
||||
if(file_exists($seederPath)){
|
||||
$seederVersions = scandir($seederPath);
|
||||
|
||||
natsort($seederVersions);
|
||||
$formattedOlderVersion = $olderVersion;
|
||||
foreach ($seederVersions as $version) {
|
||||
if(version_compare($this->getPhpComaptibleVersion($version), $formattedOlderVersion) == 1){
|
||||
Artisan::call('db:seed',['--class' => "Database\Seeders\\$version\DatabaseSeeder", '--force' => true]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function getOlderVersion()
|
||||
{
|
||||
if (!isInstall()) {
|
||||
return '0.0.0';
|
||||
}
|
||||
|
||||
$version = System::value('version') ?: '0.0.0';
|
||||
return $this->getPhpComaptibleVersion($version);
|
||||
}
|
||||
|
||||
private function getPhpComaptibleVersion($version)
|
||||
{
|
||||
return preg_replace('#v\.|v#', '', str_replace('_', '.', $version));
|
||||
}
|
||||
}
|
@@ -8,6 +8,7 @@ use App\Model\Update\BarNotification;
|
||||
use Artisan;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UpgradeController extends Controller
|
||||
{
|
||||
@@ -43,7 +44,7 @@ class UpgradeController extends Controller
|
||||
'data' => $data,
|
||||
];
|
||||
$url = 'http://faveohelpdesk.com/billing/public/verification';
|
||||
if (str_contains($url, ' ')) {
|
||||
if (Str::contains($url, ' ')) {
|
||||
$url = str_replace(' ', '%20', $url);
|
||||
}
|
||||
$curl = $this->postCurl($url, $post_data);
|
||||
@@ -65,7 +66,7 @@ class UpgradeController extends Controller
|
||||
{
|
||||
$name = \Config::get('app.name');
|
||||
$durl = 'http://www.faveohelpdesk.com/billing/public/download-url';
|
||||
if (str_contains($durl, ' ')) {
|
||||
if (Str::contains($durl, ' ')) {
|
||||
$durl = str_replace(' ', '%20', $durl);
|
||||
}
|
||||
$data = [
|
||||
|
@@ -61,7 +61,7 @@ class LibraryController extends Controller
|
||||
$public_key = openssl_get_publickey($key_content);
|
||||
|
||||
$encrypted = $e = null;
|
||||
openssl_seal($data, $encrypted, $e, [$public_key]);
|
||||
openssl_seal($data, $encrypted, $e, [$public_key], 'rc4');
|
||||
|
||||
$sealed_data = base64_encode($encrypted);
|
||||
$envelope = base64_encode($e[0]);
|
||||
|
@@ -17,7 +17,7 @@ class Kernel extends HttpKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -27,7 +27,7 @@ class Kernel extends HttpKernel
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
@@ -37,8 +37,8 @@ class Kernel extends HttpKernel
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
'api' => [
|
||||
'throttle:60,1',
|
||||
'bindings',
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
@@ -48,24 +48,25 @@ class Kernel extends HttpKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'roles' => \App\Http\Middleware\CheckRole::class,
|
||||
'role.agent' => \App\Http\Middleware\CheckRoleAgent::class,
|
||||
'role.user' => \App\Http\Middleware\CheckRoleUser::class,
|
||||
'api' => \App\Http\Middleware\ApiKey::class,
|
||||
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
|
||||
'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
|
||||
'jwt.authOveride' => \App\Http\Middleware\JwtAuthenticate::class,
|
||||
'update' => \App\Http\Middleware\CheckUpdate::class,
|
||||
'board' => \App\Http\Middleware\CheckBoard::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,
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'roles' => \App\Http\Middleware\CheckRole::class,
|
||||
'role.agent' => \App\Http\Middleware\CheckRoleAgent::class,
|
||||
'role.user' => \App\Http\Middleware\CheckRoleUser::class,
|
||||
'api' => \App\Http\Middleware\ApiKey::class,
|
||||
'jwt.authOveride' => \App\Http\Middleware\JwtAuthenticate::class,
|
||||
'update' => \App\Http\Middleware\CheckUpdate::class,
|
||||
'board' => \App\Http\Middleware\CheckBoard::class,
|
||||
'install' => \App\Http\Middleware\Install::class,
|
||||
'redirect' => \App\Http\Middleware\Redirect::class,
|
||||
'installer' => \App\Http\Middleware\IsInstalled::class,
|
||||
'force.option' => \App\Http\Middleware\TicketViewURL::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
];
|
||||
}
|
||||
|
17
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Normal file
17
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
||||
|
||||
class PreventRequestsDuringMaintenance extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be reachable while maintenance mode is enabled.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
@@ -3,41 +3,28 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* The Guard implementation.
|
||||
*
|
||||
* @var Guard
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*
|
||||
* @param Guard $auth
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @param string|null ...$guards
|
||||
*
|
||||
* @return mixed
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
public function handle(Request $request, Closure $next, ...$guards)
|
||||
{
|
||||
if ($this->auth->check()) {
|
||||
return redirect(url('dashboard'));
|
||||
$guards = empty($guards) ? [null] : $guards;
|
||||
|
||||
foreach ($guards as $guard) {
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect(url('dashboard'));
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
@@ -3,7 +3,7 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Input;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
|
||||
//use Redirect;
|
||||
|
||||
@@ -19,20 +19,20 @@ class TicketViewURL
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
// dd(\Input::all(), $request->fullUrl());
|
||||
// dd(Request::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) {
|
||||
if (count(Request::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())) {
|
||||
if (!array_key_exists('show', Request::all()) && !array_key_exists('departments', Request::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())) {
|
||||
} elseif (!array_key_exists('show', Request::all()) && array_key_exists('departments', Request::all())) {
|
||||
return \Redirect::to($request_str.'&show%5B%5D=inbox');
|
||||
} elseif (array_key_exists('show', Input::all()) && !array_key_exists('departments', Input::all())) {
|
||||
} elseif (array_key_exists('show', Request::all()) && !array_key_exists('departments', Request::all())) {
|
||||
return \Redirect::to($request_str.'&departments%5B%5D=All');
|
||||
} else {
|
||||
// do nothing
|
||||
|
19
app/Http/Middleware/TrimStrings.php
Normal file
19
app/Http/Middleware/TrimStrings.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||
|
||||
class TrimStrings extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the attributes that should not be trimmed.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
'current_password',
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
}
|
20
app/Http/Middleware/TrustHosts.php
Normal file
20
app/Http/Middleware/TrustHosts.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
||||
|
||||
class TrustHosts extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the host patterns that should be trusted.
|
||||
*
|
||||
* @return array<int, string|null>
|
||||
*/
|
||||
public function hosts()
|
||||
{
|
||||
return [
|
||||
$this->allSubdomainsOfApplicationUrl(),
|
||||
];
|
||||
}
|
||||
}
|
28
app/Http/Middleware/TrustProxies.php
Normal file
28
app/Http/Middleware/TrustProxies.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array<int, string>|string|null
|
||||
*/
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers =
|
||||
Request::HEADER_X_FORWARDED_FOR |
|
||||
Request::HEADER_X_FORWARDED_HOST |
|
||||
Request::HEADER_X_FORWARDED_PORT |
|
||||
Request::HEADER_X_FORWARDED_PROTO |
|
||||
Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||
}
|
22
app/Http/Middleware/ValidateSignature.php
Normal file
22
app/Http/Middleware/ValidateSignature.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
|
||||
|
||||
class ValidateSignature extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the query string parameters that should be ignored.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
// 'fbclid',
|
||||
// 'utm_campaign',
|
||||
// 'utm_content',
|
||||
// 'utm_medium',
|
||||
// 'utm_source',
|
||||
// 'utm_term',
|
||||
];
|
||||
}
|
@@ -4,6 +4,7 @@ namespace App\Http\Requests\helpdesk;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use App\Model\helpdesk\Settings\CommonSettings;
|
||||
use Illuminate\Contracts\Validation\Validator;
|
||||
|
||||
/**
|
||||
* AgentRequest.
|
||||
@@ -38,12 +39,12 @@ class AgentRequest extends Request
|
||||
'user_name' => 'required|unique:users|max:30',
|
||||
'first_name' => 'required|max:30',
|
||||
// 'last_name' => 'required|max:30',
|
||||
'email' => 'required|unique:users',
|
||||
'active' => 'required',
|
||||
'email' => 'required|unique:users',
|
||||
'active' => 'required',
|
||||
// 'account_status' => 'required',
|
||||
'group' => 'required',
|
||||
'primary_department' => 'required',
|
||||
'agent_time_zone' => 'required',
|
||||
'group' => 'required',
|
||||
'primary_department' => 'required',
|
||||
'agent_time_zone' => 'required',
|
||||
// 'phone_number' => 'phone:IN',
|
||||
'mobile' => 'unique:users',
|
||||
'team' => 'required',
|
||||
@@ -53,7 +54,7 @@ class AgentRequest extends Request
|
||||
/**
|
||||
*@category Funcion to set rule if send opt is enabled
|
||||
*
|
||||
*@param object $settings (instance of Model common settings)
|
||||
*@param object $settings (instance of Model common settings)
|
||||
*
|
||||
*@author manish.verma@ladybirdweb.com
|
||||
*
|
||||
@@ -64,20 +65,20 @@ class AgentRequest extends Request
|
||||
$settings = $settings->select('status')->where('option_name', '=', 'send_otp')->first();
|
||||
if ($settings->status == '1' || $settings->status == 1) {
|
||||
return [
|
||||
'user_name' => 'required|unique:users|max:30',
|
||||
'first_name' => 'required|max:30',
|
||||
'user_name' => 'required|unique:users|max:30',
|
||||
'first_name' => 'required|max:30',
|
||||
// 'last_name' => 'required|max:30',
|
||||
'email' => 'required|unique:users',
|
||||
'active' => 'required',
|
||||
'email' => 'required|unique:users',
|
||||
'active' => 'required',
|
||||
// 'account_status' => 'required',
|
||||
'group' => 'required',
|
||||
'primary_department' => 'required',
|
||||
'agent_time_zone' => 'required',
|
||||
'group' => 'required',
|
||||
'primary_department' => 'required',
|
||||
'agent_time_zone' => 'required',
|
||||
// 'phone_number' => 'phone:IN',
|
||||
// 'mobile' => 'phone:IN',
|
||||
'team' => 'required',
|
||||
'mobile' => 'required|unique:users',
|
||||
'country_code' => 'required',
|
||||
'team' => 'required',
|
||||
'mobile' => 'required|unique:users',
|
||||
'country_code' => 'required',
|
||||
];
|
||||
} else {
|
||||
return 0;
|
||||
|
@@ -29,17 +29,17 @@ class AgentUpdate extends Request
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'user_name' => 'required|max:30|min:3|unique:users,user_name,'.$this->segment(2),
|
||||
'first_name' => 'required|max:30',
|
||||
'user_name' => 'required|max:30|min:3|unique:users,user_name,'.$this->segment(2),
|
||||
'first_name' => 'required|max:30',
|
||||
// 'last_name' => 'required|max:30',
|
||||
'email' => 'required|email|unique:users,email,'.$this->segment(2),
|
||||
'active' => 'required',
|
||||
'role' => 'required',
|
||||
'group' => 'required',
|
||||
'primary_department' => 'required',
|
||||
'agent_time_zone' => 'required',
|
||||
'team' => 'required',
|
||||
'mobile' => 'unique:users,mobile,'.$this->segment(2),
|
||||
'email' => 'required|email|unique:users,email,'.$this->segment(2),
|
||||
'active' => 'required',
|
||||
'role' => 'required',
|
||||
'group' => 'required',
|
||||
'primary_department' => 'required',
|
||||
'agent_time_zone' => 'required',
|
||||
'team' => 'required',
|
||||
'mobile' => 'unique:users,mobile,'.$this->segment(2),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ namespace App\Http\Requests\helpdesk;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use App\Model\helpdesk\Settings\CommonSettings;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
/**
|
||||
* CompanyRequest.
|
||||
@@ -118,7 +119,7 @@ class ClientRequest extends Request
|
||||
/**
|
||||
*@category Funcion to set rule if send opt is enabled
|
||||
*
|
||||
*@param object $settings (instance of Model common settings)
|
||||
*@param object $settings (instance of Model common settings)
|
||||
*
|
||||
*@author manish.verma@ladybirdweb.com
|
||||
*
|
||||
@@ -158,6 +159,6 @@ class ClientRequest extends Request
|
||||
// $purified[] = $this->purifyArray($value);
|
||||
// }
|
||||
// }
|
||||
// return array_dot($purified);
|
||||
// return Arr::dot($purified);
|
||||
// }
|
||||
}
|
||||
|
@@ -44,9 +44,9 @@ class CreateTicketRequest extends Request
|
||||
}
|
||||
|
||||
return [
|
||||
'email' => 'required|email|max:60',
|
||||
'first_name' => 'required|min:3|max:40',
|
||||
'helptopic' => 'required',
|
||||
'email' => 'required|email|max:60',
|
||||
'first_name' => 'required|min:3|max:40',
|
||||
'helptopic' => 'required',
|
||||
// 'dept' => 'required',
|
||||
'sla' => 'required',
|
||||
'subject' => 'required|min:5',
|
||||
@@ -58,7 +58,7 @@ class CreateTicketRequest extends Request
|
||||
/**
|
||||
*@category Funcion to set rule if send opt is enabled
|
||||
*
|
||||
*@param object $settings (instance of Model common settings)
|
||||
*@param object $settings (instance of Model common settings)
|
||||
*
|
||||
*@author manish.verma@ladybirdweb.com
|
||||
*
|
||||
@@ -71,9 +71,9 @@ class CreateTicketRequest extends Request
|
||||
// dd($settings->status, $email_mandatory->status);
|
||||
if (($settings->status == '1' || $settings->status == 1) && ($email_mandatory->status == '1' || $email_mandatory->status == 1)) {
|
||||
return [
|
||||
'email' => 'required|email|max:60',
|
||||
'first_name' => 'required|min:3|max:40',
|
||||
'helptopic' => 'required',
|
||||
'email' => 'required|email|max:60',
|
||||
'first_name' => 'required|min:3|max:40',
|
||||
'helptopic' => 'required',
|
||||
// 'dept' => 'required',
|
||||
'sla' => 'required',
|
||||
'subject' => 'required|min:5',
|
||||
@@ -107,9 +107,9 @@ class CreateTicketRequest extends Request
|
||||
public function onlyMobleRequired()
|
||||
{
|
||||
return [
|
||||
'email' => 'email|max:60',
|
||||
'first_name' => 'required|min:3|max:40',
|
||||
'helptopic' => 'required',
|
||||
'email' => 'email|max:60',
|
||||
'first_name' => 'required|min:3|max:40',
|
||||
'helptopic' => 'required',
|
||||
// 'dept' => 'required',
|
||||
'sla' => 'required',
|
||||
'subject' => 'required|min:5',
|
||||
|
@@ -29,12 +29,12 @@ class DatabaseRequest extends Request
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'default' => 'required',
|
||||
'host' => 'required',
|
||||
'databasename' => 'required',
|
||||
'username' => 'required',
|
||||
'default' => 'required',
|
||||
'host' => 'required',
|
||||
'databasename' => 'required',
|
||||
'username' => 'required',
|
||||
// 'password' => '',
|
||||
'port' => 'integer|min:0',
|
||||
'port' => 'integer|min:0',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -36,12 +36,12 @@ class TaskRequest extends Request
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
'fetching-commands.required_if' => 'Please choose your Email Fetching timing',
|
||||
'notification-commands.required_if'=> 'Please choose your Email Notification timing',
|
||||
'work-commands.required_if' => 'Please choose your Auto-close Workflow timing',
|
||||
'workflow-dailyAt.required_if' => 'Please enter the time for Auto-close Workflow timing',
|
||||
'notification-dailyAt.required_if' => 'Please enter the time for Email Notification timing',
|
||||
'fetching-dailyAt.required_if' => 'Please enter the time for Email Fetching timing',
|
||||
'fetching-commands.required_if' => 'Please choose your Email Fetching timing',
|
||||
'notification-commands.required_if' => 'Please choose your Email Notification timing',
|
||||
'work-commands.required_if' => 'Please choose your Auto-close Workflow timing',
|
||||
'workflow-dailyAt.required_if' => 'Please enter the time for Auto-close Workflow timing',
|
||||
'notification-dailyAt.required_if' => 'Please enter the time for Email Notification timing',
|
||||
'fetching-dailyAt.required_if' => 'Please enter the time for Email Fetching timing',
|
||||
|
||||
];
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user