From a5db985ae84345d3dbe77c12113c803ce841e8b7 Mon Sep 17 00:00:00 2001 From: Kevin Adametz Date: Fri, 7 Aug 2020 16:02:03 +0200 Subject: [PATCH] User Order step1 --- .env | 4 +- .../Laravel_30_07_20__14_22.xml | 3114 +++++++++++++++++ .../frameworkDescriptionVersion1.1.4.xsd | 47 + .idea/php-test-framework.xml | 14 + .idea/workspace.xml | 196 +- .phpstorm.meta.php | 2 +- .phpunit.result.cache | 1 + _ide_helper.php | 2 +- _ide_helper_models.php | 111 +- app/Http/Controllers/AdminUserController.php | 47 +- app/Http/Controllers/Api/KasSLLController.php | 60 +- app/Http/Controllers/Api/PayoneController.php | 7 +- .../Api/ShoppingUserController.php | 47 +- app/Http/Controllers/CustomerController.php | 7 +- app/Http/Controllers/DataTableController.php | 17 +- app/Http/Controllers/LeadController.php | 3 + app/Http/Controllers/ModalController.php | 20 + .../Controllers/PaymentMethodController.php | 87 + app/Http/Controllers/ProductController.php | 4 +- app/Http/Controllers/ShippingController.php | 2 +- .../Controllers/SyS/SettingController.php | 50 + .../Controllers/Sys/AdminToolsController.php | 11 + .../Controllers/User/CustomerController.php | 15 +- app/Http/Controllers/User/OrderController.php | 187 + .../Controllers/Web/ContactController.php | 42 +- .../Controllers/Web/RegisterController.php | 2 +- app/Mail/MailContact.php | 18 +- app/Mail/MailInfo.php | 4 +- app/Mail/MailSyS.php | 63 + app/Models/Logger.php | 71 + app/Models/PaymentMethod.php | 77 + app/Models/Product.php | 55 +- app/Models/Shipping.php | 2 + app/Models/ShippingPrice.php | 93 +- app/Models/ShoppingOrder.php | 4 +- app/Models/ShoppingOrderItem.php | 9 + app/Models/ShoppingUser.php | 2 + app/Models/SySetting.php | 64 + app/Repositories/ProductRepository.php | 3 +- app/Repositories/UserRepository.php | 6 + app/Services/HTMLHelper.php | 18 + app/Services/SysLog.php | 78 + app/Services/UserService.php | 1 + app/User.php | 17 +- .../2014_10_12_000000_create_users_table.php | 1 + ...018_10_21_164001_create_products_table.php | 2 + ...06_004849_create_shipping_prices_table.php | 2 + ...23_163527_create_shopping_orders_table.php | 1 + ...0014_create_payment_transactions_table.php | 1 - ...25_131854_create_payment_methods_table.php | 38 + ...2020_07_30_142848_create_loggers_table.php | 51 + ..._07_31_114539_create_sy_settings_table.php | 41 + public/assets/css/custom-style.css | 4 +- public/css/application.css | 4 + public/js/custom.js | 13 +- public/js/shopping_card.js | 106 + resources/lang/de/email.php | 4 +- resources/lang/de/navigation.php | 5 + resources/lang/de/validation.php | 2 + .../admin/customer/_customer_detail.blade.php | 110 + .../views/admin/customer/_detail.blade.php | 110 +- .../views/admin/customer/_edit.blade.php | 4 +- resources/views/admin/lead/index.blade.php | 2 + resources/views/admin/level/index.blade.php | 4 +- .../views/admin/modal/show_product.blade.php | 120 + .../admin/modal/show_user_customers.blade.php | 84 + .../admin/payment_method/index.blade.php | 148 + resources/views/admin/product/form.blade.php | 4 + resources/views/admin/product/index.blade.php | 8 +- resources/views/admin/shipping/edit.blade.php | 20 +- resources/views/admin/user/index.blade.php | 64 +- resources/views/emails/sys.blade.php | 180 + resources/views/layouts/application.blade.php | 4 +- .../layouts/includes/layout-sidenav.blade.php | 26 +- resources/views/sys/admin/customers.blade.php | 2 + resources/views/sys/settings/index.blade.php | 152 + resources/views/user/customer/index.blade.php | 2 + resources/views/user/order/delivery.blade.php | 94 + resources/views/user/order/index.blade.php | 89 + resources/views/user/order/list.blade.php | 131 + .../views/user/order/list_form.blade.php | 104 + .../views/user/order/shipping_me.blade.php | 102 + .../views/user/order/shipping_ot.blade.php | 99 + .../views/web/layouts/application.blade.php | 5 +- .../web/layouts/includes/footer.blade.php | 2 +- .../views/web/templates/kontakt.blade.php | 192 +- .../web/templates/registrierung.blade.php | 10 +- .../web/user/layouts/application.blade.php | 5 +- .../user/layouts/includes/footer.blade.php | 4 +- routes/web.php | 20 +- 90 files changed, 6439 insertions(+), 421 deletions(-) create mode 100644 .idea/commandlinetools/Laravel_30_07_20__14_22.xml create mode 100644 .idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd create mode 100644 .idea/php-test-framework.xml create mode 100644 .phpunit.result.cache create mode 100755 app/Http/Controllers/PaymentMethodController.php create mode 100755 app/Http/Controllers/SyS/SettingController.php create mode 100755 app/Http/Controllers/User/OrderController.php create mode 100644 app/Mail/MailSyS.php create mode 100644 app/Models/Logger.php create mode 100644 app/Models/PaymentMethod.php create mode 100644 app/Models/SySetting.php create mode 100644 app/Services/SysLog.php create mode 100644 database/migrations/2020_07_25_131854_create_payment_methods_table.php create mode 100644 database/migrations/2020_07_30_142848_create_loggers_table.php create mode 100644 database/migrations/2020_07_31_114539_create_sy_settings_table.php create mode 100644 public/js/shopping_card.js create mode 100644 resources/views/admin/customer/_customer_detail.blade.php create mode 100644 resources/views/admin/modal/show_product.blade.php create mode 100644 resources/views/admin/modal/show_user_customers.blade.php create mode 100755 resources/views/admin/payment_method/index.blade.php create mode 100644 resources/views/emails/sys.blade.php create mode 100755 resources/views/sys/settings/index.blade.php create mode 100644 resources/views/user/order/delivery.blade.php create mode 100644 resources/views/user/order/index.blade.php create mode 100644 resources/views/user/order/list.blade.php create mode 100644 resources/views/user/order/list_form.blade.php create mode 100644 resources/views/user/order/shipping_me.blade.php create mode 100644 resources/views/user/order/shipping_ot.blade.php diff --git a/.env b/.env index 78b2ab8..42c533f 100644 --- a/.env +++ b/.env @@ -16,8 +16,8 @@ APP_URL_CRM=my. APP_CHECKOUT_MAIL=kevin.adametz@me.com APP_INFO_MAIL=info@adametz.media APP_DEFAULT_MAIL=info@mivita.care -APP_CHECKOUT_TEST_MAIL=devtest@mivita.care -APP_INFO_TEST_MAIL=devtest@mivita.care +APP_CHECKOUT_TEST_MAIL=kevin.adametz@me.com +APP_INFO_TEST_MAIL=kevin.adametz@me.com LOG_CHANNEL=stack diff --git a/.idea/commandlinetools/Laravel_30_07_20__14_22.xml b/.idea/commandlinetools/Laravel_30_07_20__14_22.xml new file mode 100644 index 0000000..e5c4e92 --- /dev/null +++ b/.idea/commandlinetools/Laravel_30_07_20__14_22.xml @@ -0,0 +1,3114 @@ + + + + + clear-compiled +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + down +
Options:
--messageThe message for the maintenance mode
--retryThe number of seconds after which the request may be retried
--allowIP or networks allowed to access the application while in maintenance mode
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + +
+ + env +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + help + help command displays help for a given command:

php /Volumes/Websites/mivita.care/artisan help list

You can also output the help in other formats by using the --format option:

php /Volumes/Websites/mivita.care/artisan help --format=xml list

To display the list of available commands, please use the list command.

Options:
--formatThe output format (txt, xml, json, or md)
--rawTo output raw command help
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ command_name[=null] + + + + + + + + + + + + +
+ + inspire +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + list + list command lists all commands:

php /Volumes/Websites/mivita.care/artisan list

You can also display the commands for a specific namespace:

php /Volumes/Websites/mivita.care/artisan list test

You can also output the information in other formats by using the --format option:

php /Volumes/Websites/mivita.care/artisan list --format=xml

It's also possible to get raw list of commands (useful for embedding command runner):

php /Volumes/Websites/mivita.care/artisan list --raw

Options:
--rawTo output raw command list
--formatThe output format (txt, xml, json, or md)

]]>
+ namespace[=null] + + + + +
+ + migrate +
Options:
--databaseThe database connection to use
--forceForce the operation to run when in production
--pathThe path(s) to the migrations files to be executed
--realpathIndicate any provided migration file paths are pre-resolved absolute paths
--pretendDump the SQL queries that would be run
--seedIndicates if the seed task should be re-run
--stepForce the migrations to be run so they can be rolled back individually
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + + + + +
+ + optimize +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + preset +
Options:
--optionPass an option to the preset command
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ type + + + + + + + + + + + +
+ + serve +
Options:
--hostThe host address to serve the application on
--portThe port to serve the application on
--triesThe max number of ports to attempt to serve from
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + +
+ + tinker +
Options:
--executeExecute the given code using Tinker
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ include[=null] + + + + + + + + + + + +
+ + up +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + auth:clear-resets +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name[=null] + + + + + + + + + + +
+ + cache:clear +
Options:
--tagsThe cache tags you would like to clear
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ store[=null] + + + + + + + + + + + +
+ + cache:forget +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ key store[=null] + + + + + + + + + + +
+ + cache:table +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + code:models +
Options:
--schema(-s)The name of the MySQL database
--connection(-c)The name of the connection
--table(-t)The name of the table
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + +
+ + config:cache +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + config:clear +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + db:seed +
Options:
--classThe class name of the root seeder
--databaseThe database connection to seed
--forceForce the operation to run when in production
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + +
+ + db:wipe +
Options:
--databaseThe database connection to use
--drop-viewsDrop all tables and views
--drop-typesDrop all tables and types (Postgres only)
--forceForce the operation to run when in production
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + +
+ + debugbar:clear +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + event:cache +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + event:clear +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + event:generate +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + event:list +
Options:
--eventFilter the events by name
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + +
+ + ide-helper:eloquent +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + ide-helper:generate +
Options:
--format(-F)The format for the IDE Helper
--write_mixins(-W)Write mixins to Laravel Model?
--helpers(-H)Include the helper files
--memory(-M)Use sqlite memory driver
--sublime(-S)DEPRECATED: Use different style for SublimeText CodeIntel
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ filename[=null] + + + + + + + + + + + + + + + +
+ + ide-helper:meta +
Options:
--filename(-F)The path to the meta file
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + +
+ + ide-helper:models +
Options:
--filename(-F)The path to the helper file
--dir(-D)The model dir
--write(-W)Write to Model file
--nowrite(-N)Don't write to Model file
--reset(-R)Remove the original phpdocs instead of appending
--smart-reset(-r)Refresh the properties/methods list, but keep the text
--phpstorm-noinspections(-p)Add PhpFullyQualifiedNameUsageInspection and PhpUnnecessaryFullyQualifiedNameInspection PHPStorm noinspection tags
--ignore(-I)Which models to ignore
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ model[=null] + + + + + + + + + + + + + + + + + + +
+ + key:generate +
Options:
--showDisplay the key instead of modifying files
--forceForce the operation to run when in production
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + +
+ + make:channel +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + +
+ + make:command +
Options:
--commandThe terminal command that should be assigned
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + +
+ + make:controller +
Options:
--apiExclude the create and edit methods from the controller.
--forceCreate the class even if the controller already exists
--invokable(-i)Generate a single method, invokable controller class.
--model(-m)Generate a resource controller for the given model.
--parent(-p)Generate a nested resource controller class.
--resource(-r)Generate a resource controller class.
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + + + + + +
+ + make:event +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + +
+ + make:exception +
Options:
--renderCreate the exception with an empty render method
--reportCreate the exception with an empty report method
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + +
+ + make:export +
Options:
--model(-m)Generate an export for the given model.
--queryGenerate an export for a query.
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + +
+ + make:factory +
Options:
--model(-m)The name of the model
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + +
+ + make:import +
Options:
--model(-m)Generate an import for the given model.
--queryGenerate an import for a query.
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + +
+ + make:job +
Options:
--syncIndicates that job should be synchronous
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + +
+ + make:listener +
Options:
--event(-e)The event class being listened for
--queuedIndicates the event listener should be queued
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + +
+ + make:mail +
Options:
--force(-f)Create the class even if the mailable already exists
--markdown(-m)Create a new Markdown template for the mailable
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + +
+ + make:middleware +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + +
+ + make:migration +
Options:
--createThe table to be created
--tableThe table to migrate
--pathThe location where the migration file should be created
--realpathIndicate any provided migration file paths are pre-resolved absolute paths
--fullpathOutput the full path of the migration
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + + + + +
+ + make:model +
Options:
--all(-a)Generate a migration, seeder, factory, and resource controller for the model
--controller(-c)Create a new controller for the model
--factory(-f)Create a new factory for the model
--forceCreate the class even if the model already exists
--migration(-m)Create a new migration file for the model
--seed(-s)Create a new seeder file for the model
--pivot(-p)Indicates if the generated model should be a custom intermediate table model
--resource(-r)Indicates if the generated controller should be a resource controller
--apiIndicates if the generated controller should be an API controller
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + + + + + + + + +
+ + make:notification +
Options:
--force(-f)Create the class even if the notification already exists
--markdown(-m)Create a new Markdown template for the notification
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + + +
+ + make:observer +
Options:
--model(-m)The model that the observer applies to.
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + +
+ + make:policy +
Options:
--model(-m)The model that the policy applies to
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + +
+ + make:provider +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + +
+ + make:request +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + +
+ + make:resource +
Options:
--collection(-c)Create a resource collection
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + +
+ + make:rule +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + +
+ + make:seeder +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + +
+ + make:test +
Options:
--unitCreate a unit test
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ name + + + + + + + + + + + +
+ + migrate:fresh +
Options:
--databaseThe database connection to use
--drop-viewsDrop all tables and views
--drop-typesDrop all tables and types (Postgres only)
--forceForce the operation to run when in production
--pathThe path(s) to the migrations files to be executed
--realpathIndicate any provided migration file paths are pre-resolved absolute paths
--seedIndicates if the seed task should be re-run
--seederThe class name of the root seeder
--stepForce the migrations to be run so they can be rolled back individually
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + + + + + + +
+ + migrate:install +
Options:
--databaseThe database connection to use
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + +
+ + migrate:refresh +
Options:
--databaseThe database connection to use
--forceForce the operation to run when in production
--pathThe path(s) to the migrations files to be executed
--realpathIndicate any provided migration file paths are pre-resolved absolute paths
--seedIndicates if the seed task should be re-run
--seederThe class name of the root seeder
--stepThe number of migrations to be reverted & re-run
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + + + + +
+ + migrate:reset +
Options:
--databaseThe database connection to use
--forceForce the operation to run when in production
--pathThe path(s) to the migrations files to be executed
--realpathIndicate any provided migration file paths are pre-resolved absolute paths
--pretendDump the SQL queries that would be run
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + + +
+ + migrate:rollback +
Options:
--databaseThe database connection to use
--forceForce the operation to run when in production
--pathThe path(s) to the migrations files to be executed
--realpathIndicate any provided migration file paths are pre-resolved absolute paths
--pretendDump the SQL queries that would be run
--stepThe number of migrations to be reverted
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + + + +
+ + migrate:status +
Options:
--databaseThe database connection to use
--pathThe path(s) to the migrations files to use
--realpathIndicate any provided migration file paths are pre-resolved absolute paths
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + +
+ + notifications:table +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + optimize:clear +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + package:discover +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + passport:client +
Options:
--personalCreate a personal access token client
--passwordCreate a password grant client
--clientCreate a client credentials grant client
--nameThe name of the client
--providerThe name of the user provider
--redirect_uriThe URI to redirect to after authorization
--user_idThe user ID the client should be assigned to
--publicCreate a public client (Auth code grant type only)
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + + + + + +
+ + passport:hash +
Options:
--forceForce the operation to run without confirmation prompt
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + +
+ + passport:install +
Options:
--uuidsUse UUIDs for all client IDs
--forceOverwrite keys they already exist
--lengthThe length of the private key
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + +
+ + passport:keys +
Options:
--forceOverwrite keys they already exist
--lengthThe length of the private key
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + +
+ + passport:purge +
Options:
--revokedOnly purge revoked tokens and authentication codes
--expiredOnly purge expired tokens and authentication codes
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + +
+ + queue:failed +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + queue:failed-table +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + queue:flush +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + queue:forget +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ id + + + + + + + + + + +
+ + queue:listen +
Options:
--delayThe number of seconds to delay failed jobs
--forceForce the worker to run even in maintenance mode
--memoryThe memory limit in megabytes
--queueThe queue to listen on
--sleepNumber of seconds to sleep when no job is available
--timeoutThe number of seconds a child process can run
--triesNumber of times to attempt a job before logging it failed
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ connection[=null] + + + + + + + + + + + + + + + + + +
+ + queue:restart +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + queue:retry +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ id + + + + + + + + + + +
+ + queue:table +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + queue:work +
Options:
--queueThe names of the queues to work
--daemonRun the worker in daemon mode (Deprecated)
--onceOnly process the next job on the queue
--stop-when-emptyStop when the queue is empty
--delayThe number of seconds to delay failed jobs
--forceForce the worker to run even in maintenance mode
--memoryThe memory limit in megabytes
--sleepNumber of seconds to sleep when no job is available
--timeoutThe number of seconds a child process can run
--triesNumber of times to attempt a job before logging it failed
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ connection[=null] + + + + + + + + + + + + + + + + + + + + +
+ + route:cache +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + route:clear +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + route:list +
Options:
--columnsColumns to include in the route table
--compact(-c)Only show method, URI and action columns
--jsonOutput the route list as JSON
--methodFilter the routes by method
--nameFilter the routes by name
--pathFilter the routes by path
--reverse(-r)Reverse the ordering of the routes
--sortThe column (domain, method, uri, name, action, middleware) to sort by
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + + + + + +
+ + schedule:finish +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ id code[=null] + + + + + + + + + + +
+ + schedule:run +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + session:table +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + storage:link +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + vendor:publish +
Options:
--forceOverwrite any existing files
--allPublish assets for all service providers without prompt
--providerThe service provider that has assets you want to publish
--tagOne or many tags that have assets you want to publish
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + + + + + +
+ + view:cache +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+ + view:clear +
Options:
--help(-h)Display this help message
--quiet(-q)Do not output any message
--verbose(-v)Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version(-V)Display this application version
--ansiForce ANSI output
--no-ansiDisable ANSI output
--no-interaction(-n)Do not ask any interactive question
--envThe environment the command should run under

]]>
+ + + + + + + + + + +
+
+ diff --git a/.idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd b/.idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd new file mode 100644 index 0000000..f2efc6d --- /dev/null +++ b/.idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml new file mode 100644 index 0000000..8f691a4 --- /dev/null +++ b/.idea/php-test-framework.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index dfead78..c3b2448 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,19 +2,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + - + + + + + + + + + + + + + - - - + + + + + + + + + + + + - - - - - + + + + + @@ -275,7 +344,11 @@ - + + + + + + + + + + + @@ -487,7 +566,22 @@ - + + + + + + + + + + + + + + + + @@ -501,7 +595,7 @@ - - + - - + + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + - + - - - - + + + + + + + - + diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index 1add5b7..f4512e2 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -5,7 +5,7 @@ namespace PHPSTORM_META { /** * PhpStorm Meta file, to provide autocomplete information for PhpStorm - * Generated on 2020-06-12 14:15:43. + * Generated on 2020-07-25 15:29:15. * * @author Barry vd. Heuvel * @see https://github.com/barryvdh/laravel-ide-helper diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000..e98b45b --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +C:37:"PHPUnit\Runner\DefaultTestResultCache":44:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:0:{}}} \ No newline at end of file diff --git a/_ide_helper.php b/_ide_helper.php index aea3cf0..e85b6e9 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -3,7 +3,7 @@ /** * A helper file for Laravel, to provide autocomplete information to your IDE - * Generated for Laravel 6.18.14 on 2020-06-12 14:15:41. + * Generated for Laravel 6.18.14 on 2020-07-25 15:29:12. * * This file should not be included in your code, only analyzed by your IDE! * diff --git a/_ide_helper_models.php b/_ide_helper_models.php index 6178730..1fe5428 100644 --- a/_ide_helper_models.php +++ b/_ide_helper_models.php @@ -113,10 +113,43 @@ namespace App{ * @property-read int|null $clients_count * @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens * @property-read int|null $tokens_count + * @property array|null $payment_methods + * @method static \Illuminate\Database\Eloquent\Builder|\App\User wherePaymentMethods($value) */ class User extends \Eloquent {} } +namespace App\Models{ +/** + * Class PaymentMethod + * + * @property int $id + * @property string $name + * @property string $short + * @property int $show_at + * @property int $pos + * @property bool $active + * @property bool $default + * @property Carbon $created_at + * @property Carbon $updated_at + * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereDefault($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod wherePos($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereShort($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereShowAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereUpdatedAt($value) + * @mixin \Eloquent + */ + class PaymentMethod extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\ShippingCountry @@ -214,10 +247,12 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereSlug($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUpdatedAt($value) * @mixin \Eloquent + * @property float|null $tax_rate * @property \Illuminate\Support\Carbon|null $deleted_at * @property string|null $user_deleted_at * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereTaxRate($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUserDeletedAt($value) * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withoutTrashed() @@ -253,7 +288,7 @@ namespace App\Models{ * @property int $id * @property int $shipping_id * @property float|null $price - * @property float|null $tax + * @property float|null $tax_rate * @property float|null $factor * @property float|null $total_from * @property float|null $total_to @@ -277,6 +312,8 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightFrom($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightTo($value) * @mixin \Eloquent + * @property-write mixed $tax + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereTaxRate($value) */ class ShippingPrice extends \Eloquent {} } @@ -524,6 +561,8 @@ namespace App\Models{ * @property-read int|null $country_prices_count * @property int|null $wp_number * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWpNumber($value) + * @property bool|null $shipping_addon + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereShippingAddon($value) */ class Product extends \Eloquent {} } @@ -592,6 +631,8 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereTransName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereUpdatedAt($value) * @mixin \Eloquent + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShippingPrice[] $shipping_prices + * @property-read int|null $shipping_prices_count */ class Shipping extends \Eloquent {} } @@ -914,6 +955,74 @@ namespace App\Models{ class Attribute extends \Eloquent {} } +namespace App\Models{ +/** + * App\Models\ShoppingOrder + * + * @property int $id + * @property int $shopping_user_id + * @property int|null $auth_user_id + * @property int $country_id + * @property int $user_shop_id + * @property float|null $total + * @property float|null $shipping + * @property float|null $subtotal + * @property float|null $tax_rate + * @property float|null $tax + * @property float|null $total_shipping + * @property int|null $weight + * @property int|null $paid + * @property string|null $txaction + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read \App\User|null $auth_user + * @property-read \App\Models\Country $country + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingOrderItem[] $shopping_order_items + * @property-read int|null $shopping_order_items_count + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingPayment[] $shopping_payments + * @property-read int|null $shopping_payments_count + * @property-read \App\Models\ShoppingUser $shopping_user + * @property-read \App\Models\UserShop $user_shop + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereAuthUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder wherePaid($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereShipping($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereShoppingUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereSubtotal($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTax($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTaxRate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTotal($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTotalShipping($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTxaction($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserShopId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereWeight($value) + * @mixin \Eloquent + * @property int|null $payment_for + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder wherePaymentFor($value) + * @property int|null $member_id + * @property string|null $mode + * @property-read \App\User|null $member + * @property-read \App\Models\UserHistory|null $user_history + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereMemberId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereMode($value) + * @property \Illuminate\Support\Carbon|null $deleted_at + * @property string|null $user_deleted_at + * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserDeletedAt($value) + * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withTrashed() + * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withoutTrashed() + * @property-read \App\Models\ShippingCountry $shipping_country + */ + class ShoppingOrder extends \Eloquent {} +} + namespace App\Models{ /** * Class CountryPrice diff --git a/app/Http/Controllers/AdminUserController.php b/app/Http/Controllers/AdminUserController.php index 9d29ea2..9e8d563 100755 --- a/app/Http/Controllers/AdminUserController.php +++ b/app/Http/Controllers/AdminUserController.php @@ -4,8 +4,11 @@ namespace App\Http\Controllers; +use App\Models\PaymentMethod; use App\Models\UserAccount; use App\Repositories\UserRepository; +use App\Services\HTMLHelper; +use App\Services\SysLog; use App\User; use Auth; use Illuminate\Support\Facades\Mail; @@ -63,6 +66,11 @@ class AdminUserController extends Controller if(isset($data['save-admin'])){ $user->admin = $data['admin']; + SysLog::action('save-admin', 'admin_user', 3) + ->setUserId(Auth::user()->id) + ->setModel($user->id, User::class) + ->setMessage('Set user admin value: '.HTMLHelper::getRoleLabel($user->admin)) + ->save(); } if(isset($data['save-confirmed'])){ @@ -77,10 +85,14 @@ class AdminUserController extends Controller }else{ $user->confirmation_date = null; } + SysLog::action('save-confirmed', 'admin_user', 3) + ->setUserId(Auth::user()->id) + ->setModel($user->id, User::class) + ->setMessage('Set user confirmed value: '.$user->confirmed." to date: ".$data['confirmation_date']) + ->save(); } if(isset($data['save-active'])){ - $data['active'] = isset($data['active']) ? true : false; $user->active = $data['active']; if($data['active']){ @@ -92,28 +104,59 @@ class AdminUserController extends Controller }else{ $user->active_date = null; } + SysLog::action('save-active', 'admin_user', 3) + ->setUserId(Auth::user()->id) + ->setModel($user->id, User::class) + ->setMessage('Set user active value: '.$user->active." to date: ".$data['active_date']) + ->save(); } if(isset($data['save-account'])){ + $old = $user->getPaymentAccountDateFormat(true); if(!isset($data['payment_account']) || $data['payment_account'] == ""){ $user->payment_account = null; }else{ $user->wizard = 100; $user->payment_account = \Carbon::parse(str_replace("- ", "", $data['payment_account'])); } + SysLog::action('save-account', 'admin_user', 3) + ->setUserId(Auth::user()->id) + ->setModel($user->id, User::class) + ->setMessage('Set user payment_account from date: '.$old." to date: ".$data['payment_account']) + ->save(); } if(isset($data['save-shop'])){ + $old = $user->getPaymentShopDateFormat(true); if(!isset($data['payment_shop']) || $data['payment_shop'] == ""){ $user->payment_shop = null; }else{ $user->wizard = 100; $user->payment_shop = \Carbon::parse(str_replace("- ", "", $data['payment_shop'])); } + SysLog::action('save-shop', 'admin_user', 3) + ->setUserId(Auth::user()->id) + ->setModel($user->id, User::class) + ->setMessage('Set user payment_shop from date: '.$old." to date: ".$data['payment_shop']) + ->save(); } if(isset($data['save-test_mode'])){ - $user->test_mode = isset($data['test_mode']) ? true : false;; + $user->test_mode = isset($data['test_mode']) ? true : false; + SysLog::action('save-test_mode', 'admin_user', 3) + ->setUserId(Auth::user()->id) + ->setModel($user->id, User::class) + ->setMessage('Set user test_mode value: '.$user->test_mode) + ->save(); + } + + if(isset($data['save-payment_methods'])){ + $user->payment_methods = isset($data['payment_methods']) ? array_map('intval', $data['payment_methods']) : null; + SysLog::action('save-payment_methods', 'admin_user', 3) + ->setUserId(Auth::user()->id) + ->setModel($user->id, User::class) + ->setMessage('Set user payment_methods value: '.$user->getPaymentMethodsShort()) + ->save(); } $user->save(); diff --git a/app/Http/Controllers/Api/KasSLLController.php b/app/Http/Controllers/Api/KasSLLController.php index 9d932fe..e41b481 100755 --- a/app/Http/Controllers/Api/KasSLLController.php +++ b/app/Http/Controllers/Api/KasSLLController.php @@ -132,36 +132,36 @@ idWkvklsQLI+qGu41SWyxP7x09fn1txDAXYw+zuLXfdKiXyaNb78yvBXAfCNP6CH MntHWpdLgtJmwsQt6j8k9Kf5qLnjatkYYaA7jBU= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- -MIIFdzCCBF+gAwIBAgIQE+oocFv07O0MNmMJgGFDNjANBgkqhkiG9w0BAQwFADBv -MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk -ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF -eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow -gYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5MRQwEgYDVQQHEwtK -ZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMS4wLAYD -VQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjAN -BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAgBJlFzYOw9sIs9CsVw127c0n00yt -UINh4qogTQktZAnczomfzD2p7PbPwdzx07HWezcoEStH2jnGvDoZtF+mvX2do2NC -tnbyqTsrkfjib9DsFiCQCT7i6HTJGLSR1GJk23+jBvGIGGqQIjy8/hPwhxR79uQf -jtTkUcYRZ0YIUcuGFFQ/vDP+fmyc/xadGL1RjjWmp2bIcmfbIWax1Jt4A8BQOujM -8Ny8nkz+rwWWNR9XWrf/zvk9tyy29lTdyOcSOk2uTIq3XJq0tyA9yn8iNK5+O2hm -AUTnAU5GU5szYPeUvlM3kHND8zLDU+/bqv50TmnHa4xgk97Exwzf4TKuzJM7UXiV -Z4vuPVb+DNBpDxsP8yUmazNt925H+nND5X4OpWaxKXwyhGNVicQNwZNUMBkTrNN9 -N6frXTpsNVzbQdcS2qlJC9/YgIoJk2KOtWbPJYjNhLixP6Q5D9kCnusSTJV882sF -qV4Wg8y4Z+LoE53MW4LTTLPtW//e5XOsIzstAL81VXQJSdhJWBp/kjbmUZIO8yZ9 -HE0XvMnsQybQv0FfQKlERPSZ51eHnlAfV1SoPv10Yy+xUGUJ5lhCLkMaTLTwJUdZ -+gQek9QmRkpQgbLevni3/GcV4clXhB4PY9bpYrrWX1Uu6lzGKAgEJTm4Diup8kyX -HAc/DVL17e8vgg8CAwEAAaOB9DCB8TAfBgNVHSMEGDAWgBStvZh6NLQm9/rEJlTv -A73gJMtUGjAdBgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/ -BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAAMEQGA1Ud -HwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9BZGRUcnVzdEV4 -dGVybmFsQ0FSb290LmNybDA1BggrBgEFBQcBAQQpMCcwJQYIKwYBBQUHMAGGGWh0 -dHA6Ly9vY3NwLnVzZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggEBAJNl9jeD -lQ9ew4IcH9Z35zyKwKoJ8OkLJvHgwmp1ocd5yblSYMgpEg7wrQPWCcR23+WmgZWn -RtqCV6mVksW2jwMibDN3wXsyF24HzloUQToFJBv2FAY7qCUkDrvMKnXduXBBP3zQ -YzYhBx9G/2CkkeFnvN4ffhkUyWNnkepnB2u0j4vAbkN9w6GAbLIevFOFfdyQoaS8 -Le9Gclc1Bb+7RrtubTeZtv8jkpHGbkD4jylW6l/VXxRTrPBPYer3IsynVgviuDQf -Jtl7GQVoP7o81DgGotPmjw7jtHFtQELFhLRAlSv0ZaBIefYdgWOWnU914Ph85I6p -0fKtirOMxyHNwu8= +MIIFgTCCBGmgAwIBAgIQOXJEOvkit1HX02wQ3TE1lTANBgkqhkiG9w0BAQwFADB7 +MQswCQYDVQQGEwJHQjEbMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYD +VQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UE +AwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTE5MDMxMjAwMDAwMFoXDTI4 +MTIzMTIzNTk1OVowgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5 +MRQwEgYDVQQHEwtKZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBO +ZXR3b3JrMS4wLAYDVQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAgBJlFzYOw9sI +s9CsVw127c0n00ytUINh4qogTQktZAnczomfzD2p7PbPwdzx07HWezcoEStH2jnG +vDoZtF+mvX2do2NCtnbyqTsrkfjib9DsFiCQCT7i6HTJGLSR1GJk23+jBvGIGGqQ +Ijy8/hPwhxR79uQfjtTkUcYRZ0YIUcuGFFQ/vDP+fmyc/xadGL1RjjWmp2bIcmfb +IWax1Jt4A8BQOujM8Ny8nkz+rwWWNR9XWrf/zvk9tyy29lTdyOcSOk2uTIq3XJq0 +tyA9yn8iNK5+O2hmAUTnAU5GU5szYPeUvlM3kHND8zLDU+/bqv50TmnHa4xgk97E +xwzf4TKuzJM7UXiVZ4vuPVb+DNBpDxsP8yUmazNt925H+nND5X4OpWaxKXwyhGNV +icQNwZNUMBkTrNN9N6frXTpsNVzbQdcS2qlJC9/YgIoJk2KOtWbPJYjNhLixP6Q5 +D9kCnusSTJV882sFqV4Wg8y4Z+LoE53MW4LTTLPtW//e5XOsIzstAL81VXQJSdhJ +WBp/kjbmUZIO8yZ9HE0XvMnsQybQv0FfQKlERPSZ51eHnlAfV1SoPv10Yy+xUGUJ +5lhCLkMaTLTwJUdZ+gQek9QmRkpQgbLevni3/GcV4clXhB4PY9bpYrrWX1Uu6lzG +KAgEJTm4Diup8kyXHAc/DVL17e8vgg8CAwEAAaOB8jCB7zAfBgNVHSMEGDAWgBSg +EQojPpbxB+zirynvgqV/0DCktDAdBgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rID +ZsswDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAG +BgRVHSAAMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29t +L0FBQUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDQGCCsGAQUFBwEBBCgwJjAkBggr +BgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMA0GCSqGSIb3DQEBDAUA +A4IBAQAYh1HcdCE9nIrgJ7cz0C7M7PDmy14R3iJvm3WOnnL+5Nb+qh+cli3vA0p+ +rvSNb3I8QzvAP+u431yqqcau8vzY7qN7Q/aGNnwU4M309z/+3ri0ivCRlv79Q2R+ +/czSAaF9ffgZGclCKxO/WIu6pKJmBHaIkU4MiRTOok3JMrO66BQavHHxW/BBC5gA +CiIDEOUMsfnNkjcZ7Tvx5Dq2+UUTJnWvu6rvP3t3O9LEApE9GQDTF1w52z97GA1F +zZOFli9d31kWTz9RvdVFGD/tSo7oBmF0Ixa1DVBzJ0RHfxBdiSprhTEUxOipakyA +vGp4z7h/jnZymQyd/teRCBaho1+V -----END CERTIFICATE-----"; diff --git a/app/Http/Controllers/Api/PayoneController.php b/app/Http/Controllers/Api/PayoneController.php index 96ebda5..980b5ca 100755 --- a/app/Http/Controllers/Api/PayoneController.php +++ b/app/Http/Controllers/Api/PayoneController.php @@ -86,8 +86,11 @@ class PayoneController extends Controller die(); } - $price = intval($data['price']*100); - if($shopping_payment->amount != $price){ + $price = number_format((round($data['price'],2) * 100), 0, '.', ''); + $price_amount = number_format($shopping_payment->amount, 0, '.', ''); + if($price_amount != $price){ + $data['shopping_payment-amount'] = $price_amount; + $data['price-amount'] = $price; \Log::channel('payone')->error('PaymentStatus: Price error: '.json_encode($data)); echo "PaymentStatus: Price error:"; var_dump($data); diff --git a/app/Http/Controllers/Api/ShoppingUserController.php b/app/Http/Controllers/Api/ShoppingUserController.php index 686372d..bac2629 100755 --- a/app/Http/Controllers/Api/ShoppingUserController.php +++ b/app/Http/Controllers/Api/ShoppingUserController.php @@ -229,6 +229,7 @@ class ShoppingUserController extends Controller 'wp_order' => 'required', ]); + $shopping_user = ShoppingUser::where('wp_order_number', '=', $request->wp_order_number)->first(); if (!$shopping_user) { return response()->json([ @@ -251,7 +252,10 @@ class ShoppingUserController extends Controller }else{ $wp_order = $request->wp_order; } - $wp_order = $this->prepareOrder($wp_order, $shopping_user); + + $wp_invoice_path = isset($request->wp_invoice_path) ? $request->wp_invoice_path : null; + $wp_order = $this->prepareOrder($wp_order, $shopping_user, $wp_invoice_path); + //TODO Status if ($wp_order){ $user = $this->prepareForShow($shopping_user); @@ -260,6 +264,7 @@ class ShoppingUserController extends Controller 'success' => true, 'data' => [ 'wp_order_number' => $shopping_user->wp_order_number, + 'wp_invoice_path' => $wp_invoice_path, 'wp_order' => $wp_order, 'user' => $user, 'order' => $order, @@ -351,6 +356,7 @@ class ShoppingUserController extends Controller } $ret = [ 'country' => isset($shopping_order->shipping_country->country->code) ? $shopping_order->shipping_country->country->code : '', + 'wp_invoice_path' => $shopping_order->wp_invoice_path, 'total' => ($shopping_order->total*100), 'shipping' => ($shopping_order->shipping*100), 'total_net' => ($shopping_order->subtotal*100), @@ -374,18 +380,21 @@ class ShoppingUserController extends Controller private function prepareForUpdate($data){ //$salutation = array(1 => 'mr', 2 => 'ms', 3=>null); + + if(isset($data['billing_salutation'])){ + $data['billing_salutation'] = (int) $data['billing_salutation']; + $data['billing_salutation'] = $data['billing_salutation'] == 2 ? 'ms' : 'mr'; + } + if(isset($data['shipping_salutation'])){ + $data['shipping_salutation'] = (int) $data['shipping_salutation']; + $data['shipping_salutation'] = $data['shipping_salutation'] == 2 ? 'ms' : 'mr'; + } + $ret = []; $needs = [ 'billing_salutation', 'billing_company', 'billing_firstname', 'billing_lastname', 'billing_address', 'billing_address_2', 'billing_zipcode', 'billing_city', 'billing_phone', 'billing_email', 'same_as_billing', 'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_phone']; foreach ($data as $key=>$value){ - - if($key === 'billing_salutation') { - $ret['billing_salutation'] = $data['billing_salutation'] == 2 ? 'ms' : 'mr'; - } - if($key === 'shipping_salutation') { - $ret['shipping_salutation'] = $data['shipping_salutation'] == 2 ? 'ms' : 'mr'; - } if($key === 'billing_country_code' && isset($data['billing_country_code'])) { $ret['billing_country_id'] = Country::getCountryIdByCodeOrOne($data['billing_country_code']); } @@ -408,6 +417,14 @@ class ShoppingUserController extends Controller private function prepareForStore($data){ //$salutation = array(1 => 'mr', 2 => 'ms', 3=>null); + if(isset($data['billing_salutation'])){ + $data['billing_salutation'] = (int) $data['billing_salutation']; + $data['billing_salutation'] = $data['billing_salutation'] == 2 ? 'ms' : 'mr'; + } + if(isset($data['shipping_salutation'])){ + $data['shipping_salutation'] = (int) $data['shipping_salutation']; + $data['shipping_salutation'] = $data['shipping_salutation'] == 2 ? 'ms' : 'mr'; + } $ret = []; $needs = [ 'billing_salutation', 'billing_company', 'billing_firstname', 'billing_lastname', 'billing_address', 'billing_address_2', 'billing_zipcode', 'billing_city', 'billing_country_id', 'billing_phone', 'billing_email', 'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_country_id', 'shipping_phone', @@ -417,13 +434,6 @@ class ShoppingUserController extends Controller foreach ($needs as $need){ $ret[$need] = isset($data[$need]) ? $data[$need] : null; - - if ($need === 'billing_salutation' && $ret[$need] !== null) { - $ret['billing_salutation'] = $ret['billing_salutation'] == 2 ? 'ms' : 'mr'; - } - if ($need === 'shipping_salutation' && $ret[$need] !== null) { - $ret['shipping_salutation'] = $ret['shipping_salutation'] == 2 ? 'ms' : 'mr'; - } if ($need === 'billing_country_id') { $ret['billing_country_id'] = isset($data['billing_country_code']) ? Country::getCountryIdByCodeOrOne($data['billing_country_code']) : 1; } @@ -448,7 +458,7 @@ class ShoppingUserController extends Controller return $ret; } - private function prepareOrder($wp_shopping_order, $shopping_user){ + private function prepareOrder($wp_shopping_order, $shopping_user, $wp_invoice_path){ Yard::instance('shopping')->destroy(); $ret = []; @@ -479,14 +489,14 @@ class ShoppingUserController extends Controller if($ShippingCountry){ Yard::instance('shopping')->setShippingCountryWithPrice($ShippingCountry->id); } - $shopping_order = $this->makeShoppingOrder($shopping_user); + $shopping_order = $this->makeShoppingOrder($shopping_user, $wp_invoice_path); $shopping_user->shopping_order = $shopping_order; Yard::instance('shopping')->destroy(); } return $ret; } - private function makeShoppingOrder($shopping_user){ + private function makeShoppingOrder($shopping_user, $wp_invoice_path){ $data = [ 'shopping_user_id' => $shopping_user->id, @@ -503,6 +513,7 @@ class ShoppingUserController extends Controller 'weight' => Yard::instance('shopping')->weight(), 'paid' => true, 'txaction' => 'extern', + 'wp_invoice_path' => $wp_invoice_path, 'mode' => $shopping_user->mode, ]; $shopping_order = $shopping_user->shopping_order; diff --git a/app/Http/Controllers/CustomerController.php b/app/Http/Controllers/CustomerController.php index 24c4448..a55c433 100755 --- a/app/Http/Controllers/CustomerController.php +++ b/app/Http/Controllers/CustomerController.php @@ -163,9 +163,6 @@ class CustomerController extends Controller return get_active_badge($ShoppingUser->auth_user_id).($ShoppingUser->mode==='dev' ? ' dev' : ''); }) ->addColumn('member_id', function (ShoppingUser $ShoppingUser) { - if($ShoppingUser->member_id){ - return ''.$ShoppingUser->member->getFullName().''; - } if($ShoppingUser->is_like){ return ''; } + if($ShoppingUser->member_id){ + return ''.$ShoppingUser->member->getFullName().''; + } + return ''; }) ->addColumn('created_at', function (ShoppingUser $ShoppingUser) { diff --git a/app/Http/Controllers/DataTableController.php b/app/Http/Controllers/DataTableController.php index d0db346..0efbcbe 100644 --- a/app/Http/Controllers/DataTableController.php +++ b/app/Http/Controllers/DataTableController.php @@ -70,10 +70,21 @@ class DataTableController extends Controller return $user->shop->getActiveDateFormatSmall(); } return "-"; + }) + ->addColumn('my_payment_methods', function (User $user) { + $payment_methods = json_encode($user->payment_methods); + $link = ''; + if(!$user->payment_methods){ + return $link.''; + } + return $link.' '.$user->getPaymentMethodsShort().''; + + + }) ->addColumn('action_delete', function (User $user) { - return ' - '; + return ' + '; }) ->addColumn('test_mode', function (User $user) { $link = ''; @@ -85,7 +96,7 @@ class DataTableController extends Controller ->orderColumn('active', 'active $1') ->orderColumn('shop', 'shop $1') ->orderColumn('admin', 'active $1') - ->rawColumns(['id', 'admin', 'confirmed', 'active', 'account', 'shop', 'test_mode', 'action_delete']) + ->rawColumns(['id', 'admin', 'confirmed', 'active', 'account', 'shop', 'my_payment_methods', 'test_mode', 'action_delete']) ->make(true); } } diff --git a/app/Http/Controllers/LeadController.php b/app/Http/Controllers/LeadController.php index 36d3838..fc7dfc3 100755 --- a/app/Http/Controllers/LeadController.php +++ b/app/Http/Controllers/LeadController.php @@ -344,6 +344,9 @@ class LeadController extends Controller ->addColumn('last_name', function (User $user) { return $user->account ? $user->account->last_name : ''; }) + ->addColumn('user_level', function (User $user) { + return $user->user_level ? $user->user_level->name : ''; + }) ->addColumn('id', function (User $user) { return ''; }) diff --git a/app/Http/Controllers/ModalController.php b/app/Http/Controllers/ModalController.php index a92abc1..5948404 100644 --- a/app/Http/Controllers/ModalController.php +++ b/app/Http/Controllers/ModalController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; +use App\Models\Product; use App\Models\ShoppingOrder; use App\Models\ShoppingUser; @@ -42,6 +43,25 @@ class ModalController extends Controller } $ret = view("admin.modal.is_like_member", compact('current', 'possibles', 'data'))->render(); } + if($data['action'] === 'user-order-show-product'){ + $product = Product::find($data['id']); //current user form order + $ret = view("admin.modal.show_product", compact('product', 'data'))->render(); + } + + if($data['action'] === 'user-order-my-delivery-show'){ + $user = \Auth::user(); + $ret = view("admin.modal.show_user_customers", compact('user', 'data'))->render(); + } + + if($data['action'] === 'user-order-my-delivery-add'){ + $user = \Auth::user(); + + /* $product = Product::find($data['id']); //current user form order + $ret = view("admin.modal.show_product", compact('product', 'data'))->render(); */ + } + + + } diff --git a/app/Http/Controllers/PaymentMethodController.php b/app/Http/Controllers/PaymentMethodController.php new file mode 100755 index 0000000..c85c494 --- /dev/null +++ b/app/Http/Controllers/PaymentMethodController.php @@ -0,0 +1,87 @@ +middleware('admin'); + } + + public function index() + { + + $data = [ + 'values' => PaymentMethod::all(), + 'trans' => array_keys(config('localization.supportedLocales')), + ]; + return view('admin.payment_method.index', $data); + } + + public function store() + { + + $data = Request::all(); + if($data['id'] === "new"){ + $model = PaymentMethod::create([ + 'name' => $data['name'], + 'short' => $data['short'], + 'pos' => $data['pos'], + 'show_at' => $data['show_at'], + 'default' => isset($data['default']) ? true : false, + 'active' => isset($data['active']) ? true : false, + ]); + }else{ + $model = PaymentMethod::find($data['id']); + $model->name = $data['name']; + $model->short = $data['short']; + $model->pos = $data['pos']; + $model->show_at = $data['show_at']; + $model->default = isset($data['default']) ? true : false; + $model->active = isset($data['active']) ? true : false; + $model->save(); + } + + /* if(!empty($data['trans'])){ + $trans = []; + foreach ($data['trans'] as $lang => $value){ + if($value && $value != null){ + $trans[$lang] = $value; + } + } + if(count($trans)){ + $model->trans_name = $trans; + $model->save(); + } + }*/ + + \Session()->flash('alert-save', '1'); + return redirect(route('admin_payment_methods')); + + + } + + + /*public function delete($id){ + + if(ProductAttribute::where('attribute_id', $id)->count()){ + \Session()->flash('alert-error', 'Eintrag wird als Produktattribute verwendet'); + return redirect(route('admin_product_attributes')); + } + + $model = Attribute::findOrFail($id); + $model->delete(); + \Session()->flash('alert-success', 'Eintrag gelöscht'); + return redirect(route('admin_product_attributes')); + } + */ + +} \ No newline at end of file diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index 0f67aef..cf71c28 100755 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -41,7 +41,7 @@ class ProductController extends Controller public function edit($id) { - if($id == "new"){ + if($id === "new"){ $model = new Product(); $model->active = true; }else{ @@ -66,7 +66,7 @@ class ProductController extends Controller ); $validator = Validator::make(Request::all(), $rules); - if($data['id'] == "new"){ + if($data['id'] === "new"){ $model = new Product(); }else{ $model = Product::findOrFail($data['id']); diff --git a/app/Http/Controllers/ShippingController.php b/app/Http/Controllers/ShippingController.php index 1f6733e..15d4de8 100755 --- a/app/Http/Controllers/ShippingController.php +++ b/app/Http/Controllers/ShippingController.php @@ -34,7 +34,7 @@ class ShippingController extends Controller public function edit($shipping_id) { - if($shipping_id == "new"){ + if($shipping_id === "new"){ $shipping = new Shipping(); $shipping->active = 1; diff --git a/app/Http/Controllers/SyS/SettingController.php b/app/Http/Controllers/SyS/SettingController.php new file mode 100755 index 0000000..be8c5e6 --- /dev/null +++ b/app/Http/Controllers/SyS/SettingController.php @@ -0,0 +1,50 @@ +middleware('sysadmin'); + + } + + public function index() + { + + $data = [ + 'values' => SySetting::all(), + ]; + return view('sys.settings.index', $data); + } + + public function store() + { + + $data = Request::all(); + + $data['active'] = isset($data['active']) ? true : false; + if($data['id'] === "new"){ + $model = SySetting::create($data); + }else{ + $model = SySetting::find($data['id']); + $model->fill($data); + $model->save(); + } + + + \Session()->flash('alert-save', '1'); + return redirect(route('sysadmin_settings')); + + } + + +} \ No newline at end of file diff --git a/app/Http/Controllers/Sys/AdminToolsController.php b/app/Http/Controllers/Sys/AdminToolsController.php index be66395..511d96f 100755 --- a/app/Http/Controllers/Sys/AdminToolsController.php +++ b/app/Http/Controllers/Sys/AdminToolsController.php @@ -7,10 +7,12 @@ use App\Http\Controllers\Api\KasController; use App\Http\Controllers\Api\KasSLLController; use App\Http\Controllers\Controller; use App\Mail\MailInfo; +use App\Models\PaymentMethod; use App\Models\ShoppingUser; use App\Models\UserShop; use App\Services\CustomerPriority; use App\Services\Shop; +use App\User; use Auth; use Illuminate\Support\Facades\Mail; use Request; @@ -50,6 +52,15 @@ class AdminToolsController extends Controller public function customerStore() { $data = Request::all(); + $ret = ""; + if($data['action'] === 'makePaymentMethodsDefault'){ + $users = User::where('payment_methods', '=', NULL)->get(); + //$users = User::all(); + foreach ($users as $user){ + $user->payment_methods = PaymentMethod::getDefaultAsArray(); + $user->save(); + } + } if($data['action'] === 'checkForAll'){ $shopping_users = CustomerPriority::checkForAll(); } diff --git a/app/Http/Controllers/User/CustomerController.php b/app/Http/Controllers/User/CustomerController.php index fc56bb6..e391a92 100755 --- a/app/Http/Controllers/User/CustomerController.php +++ b/app/Http/Controllers/User/CustomerController.php @@ -177,9 +177,9 @@ class CustomerController extends Controller { $user = User::find(\Auth::user()->id); - $query = ShoppingUser::select(['id', 'billing_company', 'billing_salutation', 'billing_firstname', 'billing_lastname', 'billing_email', 'billing_zipcode', 'billing_city', 'billing_country_id', 'orders', 'subscribed', 'created_at', 'number', 'mode', 'wp_order_number']) + $query = ShoppingUser::select(['id', 'billing_company', 'billing_salutation', 'billing_firstname', 'billing_lastname', 'billing_email', 'billing_zipcode', 'billing_city', 'billing_country_id', 'orders', 'subscribed', 'created_at', 'number', 'mode', 'is_like', 'wp_order_number']) ->where('shopping_users.member_id', '=', $user->id); - //->groupBy('shopping_users.number'); + //->groupBy('shopping_users.number'); /*set_user_attr('filter_member_id', Request::get('filter_member_id')); if(Request::get('filter_member_id') != ""){ @@ -187,8 +187,11 @@ class CustomerController extends Controller }*/ return \DataTables::eloquent($query) + ->addColumn('send_to', function (ShoppingUser $ShoppingUser) { + return $ShoppingUser->is_like ? ' in Prüfung' : ' wählen'; + }) ->addColumn('id', function (ShoppingUser $ShoppingUser) { - return ''; + return ''; }) ->addColumn('billing_salutation', function (ShoppingUser $ShoppingUser) { return HTMLHelper::getSalutationLang($ShoppingUser->billing_salutation); @@ -205,16 +208,20 @@ class CustomerController extends Controller ->addColumn('subscribed', function (ShoppingUser $ShoppingUser) { return get_active_badge($ShoppingUser->subscribed); }) + ->addColumn('status', function (ShoppingUser $ShoppingUser) { + return $ShoppingUser->is_like ? ' in Prüfung ' : ' aktiv'; + }) ->addColumn('extras', function (ShoppingUser $ShoppingUser) { return $ShoppingUser->wp_order_number.($ShoppingUser->mode==='dev' ? ' dev' : ''); }) + ->orderColumn('send_to', 'id $1') ->orderColumn('id', 'id $1') ->orderColumn('billing_country_id', 'billing_country_id $1') ->orderColumn('billing_salutation', 'billing_salutation $1') ->orderColumn('first_created_at', 'created_at $1') ->orderColumn('orders', 'orders $1') ->orderColumn('subscribed', 'subscribed $1') - ->rawColumns(['id', 'subscribed', 'extras']) + ->rawColumns(['send_to', 'id', 'subscribed', 'extras', 'status']) ->make(true); } } \ No newline at end of file diff --git a/app/Http/Controllers/User/OrderController.php b/app/Http/Controllers/User/OrderController.php new file mode 100755 index 0000000..a35b927 --- /dev/null +++ b/app/Http/Controllers/User/OrderController.php @@ -0,0 +1,187 @@ +middleware('active.shop'); + } + + + public function index() + { + $data = [ + ]; + return view('user.order.index', $data); + } + + public function detail($id) + { + $user = User::find(\Auth::user()->id); + $shopping_order = ShoppingOrder::findOrFail($id); + if($shopping_order->member_id !== $user->id){ + abort(404); + } + $data = [ + 'shopping_order' => $shopping_order, + 'isAdmin' => false, + ]; + return view('user.shop.sales.order_detail', $data); + } + + + public function delivery($for, $id=null) + { + $user = User::find(\Auth::user()->id); + + /*if (Request::isMethod('post')) { + $data = Request::all(); + if($data['switchers-radio-is-for'] === 'is-for-member'){ + return redirect(route('user_order_my_list', ['me'])); + } + if($data['switchers-radio-is-for'] === 'is-for-customer'){ + //check ist customer + return redirect(route('user_order_my_list', ['ot', $id])); + } + }*/ + $shopping_user = null; + $delivery_id = null; + if($for === 'ot'){ + $shopping_user = $this->checkShoppingUser($id, $user); + $delivery_id = $shopping_user->id; + + } + + $data = [ + 'shopping_user' => $shopping_user, + 'isAdmin' => false, + 'isView' => 'customer', + 'for' => $for, + 'delivery_id' => $delivery_id, + ]; + return view('user.order.delivery', $data); + } + + public function list($for, $id=null) + { + $user = User::find(\Auth::user()->id); + + $shopping_user = null; + $delivery_id = null; + if($for === 'ot'){ + $shopping_user = $this->checkShoppingUser($id, $user); + $delivery_id = $shopping_user->id; + } + //$data = Request::all(); + //dd(session('switchers-radio-is-for')); + //$shopping_user = new ShoppingUser(); + //$shopping_user->id = "new"; + //$shopping_user->same_as_billing = true; + + $data = [ + 'shopping_user' => $shopping_user, + 'user' => $user, + 'isAdmin' => false, + 'isView' => 'customer', + 'for' => $for, + 'delivery_id' => $delivery_id, + + ]; + return view('user.order.list', $data); + } + + private function checkShoppingUser($id, $user){ + if($id === null){ + abort(403, 'Error: Keine User ID'); + } + $shopping_user = ShoppingUser::findOrFail($id); + if($shopping_user->member_id !== $user->id){ + abort(403, 'Error: Falsche User ID'); + } + $shopping_user = ShoppingUser::findOrFail($id); + if($shopping_user->is_like){ + abort(403, 'Error: Kunde in Prüfung'); + } + return $shopping_user; + } + + public function datatable(){ + + // $user = User::find(\Auth::user()->id); + $query = Product::select('products.*')->where('active', true) + ->where('show_at', '=', 1); //Kunden und Berater + //->orWhere('show_at', '=', 2); // Nur Berater + //->orderBy('pos', 'DESC') + //->orderBy('id', 'DESC'); + + return \DataTables::eloquent($query) + ->addColumn('add_card', function (Product $product) { + return ' + € '.$product->getFormattedPriceWith().'  + + '; + + /*' + +
+ + + '*/; + }) + ->addColumn('quantity', function (Product $product) { + //return ''; + return '
+
+ + + + + + + +
+
'; + + }) + ->addColumn('picture', function (Product $product) { + if(count($product->images)){ + return ''; + } + return ""; + }) + ->addColumn('price', function (Product $product) { + return $product->getFormattedPriceWith(); + }) + ->addColumn('action', function (Product $product) { + return ''; + + + }) + + + ->orderColumn('name', 'name $1') + ->orderColumn('number', 'number $1') + ->orderColumn('points', 'points $1') + ->orderColumn('price', 'price $1') + ->orderColumn('contents_total', 'contents_total $1') + ->orderColumn('weight', 'weight $1') + ->rawColumns(['add_card', 'quantity', 'picture', 'action']) + ->make(true); + } + + +} \ No newline at end of file diff --git a/app/Http/Controllers/Web/ContactController.php b/app/Http/Controllers/Web/ContactController.php index d5e1424..85d5457 100755 --- a/app/Http/Controllers/Web/ContactController.php +++ b/app/Http/Controllers/Web/ContactController.php @@ -41,16 +41,25 @@ class ContactController extends Controller $user_shop = Util::getUserShop(); + $rules = array( - 'first_name'=>'required', - 'last_name'=>'required', - 'email'=>'required|email', - 'message'=>'required', - 'g-recaptcha-response'=>'required|recaptcha', + 'salutation' => 'required', + 'first_name' => 'required', + 'last_name' => 'required', + 'email' => 'required|email', + 'message' => 'required', + 'g-recaptcha-response' => 'required|recaptcha', 'accepted_data_protection' => 'required', ); + if (!$user_shop || $user_shop->id === 22) { + $rules['sales_partnership'] = 'required'; + if (Request::get('sales_partnership') === 'JA') { + $rules['sales_partnership_message'] = 'required'; + } + } - Validator::extend('recaptcha', function($attribute, $value, $parameters, $validator) { + + Validator::extend('recaptcha', function ($attribute, $value, $parameters, $validator) { return $this->reCaptcha_validate($attribute, $value, $parameters, $validator); }); @@ -60,15 +69,20 @@ class ContactController extends Controller } - $contact = []; - $contact['first_name'] = Request::get('first_name'); - $contact['last_name'] = Request::get('last_name'); - $contact['email'] = Request::get('email'); - $contact['phone'] = Request::get('phone'); - $contact['subject'] = Request::get('subject'); - $contact['message'] = Request::get('message'); + $contact = []; + $contact['salutation'] = Request::get('salutation'); + $contact['first_name'] = Request::get('first_name'); + $contact['last_name'] = Request::get('last_name'); + $contact['email'] = Request::get('email'); + $contact['phone'] = Request::get('phone'); + $contact['message'] = Request::get('message'); + if (!$user_shop){ + $contact['sales_partnership'] = Request::get('sales_partnership'); + $contact['sales_partnership_message'] = Request::get('sales_partnership_message'); + } - $checkout_mail = config('app.checkout_mail'); + + $checkout_mail = config('app.checkout_mail'); if($user_shop){ Mail::to($contact['email'])->bcc([$user_shop->user->email, $checkout_mail])->send(new MailContact($contact)); }else{ diff --git a/app/Http/Controllers/Web/RegisterController.php b/app/Http/Controllers/Web/RegisterController.php index b38bf01..77049b1 100755 --- a/app/Http/Controllers/Web/RegisterController.php +++ b/app/Http/Controllers/Web/RegisterController.php @@ -67,9 +67,9 @@ class RegisterController extends Controller $rules = array( + 'salutation' => 'required', 'first_name'=>'required', 'last_name'=>'required', - 'salutation' => 'required', 'email' => 'required|string|email|max:255|unique:users', 'email-confirm' => 'required|same:email', 'password' => 'required|string|min:6|confirmed', diff --git a/app/Mail/MailContact.php b/app/Mail/MailContact.php index 0f576e1..144f040 100644 --- a/app/Mail/MailContact.php +++ b/app/Mail/MailContact.php @@ -21,20 +21,32 @@ class MailContact extends Mailable { $this->data = $data; $this->user_shop = Util::getUserShop(); - $this->subject = __('email.request_from').' mivita.care'; + $this->subject = __('email.your_request_from').' mivita.care'; if($this->user_shop){ - $this->subject = __('email.request_from')." ".$this->user_shop->slug.'.mivita.care'; + $this->subject = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care'; } } public function build() { - $salutation = __('email.salutation'); + $salutation = __('email.hello'); + if(isset($this->data['first_name'])){ + $salutation .= " ".$this->data['first_name']; + } + if(isset($this->data['salutation'])){ + if($this->data['salutation'] === 'mr'){ + $this->data['salutation'] = 'Herr'; + } + if($this->data['salutation'] === 'ms'){ + $this->data['salutation'] = 'Frau'; + } + } $copy1line = __('email.your_request_from')." mivita.care"; if($this->user_shop){ $copy1line = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care'; } + return $this->view('emails.contact')->with([ 'salutation' => $salutation, 'copy1line' => $copy1line, diff --git a/app/Mail/MailInfo.php b/app/Mail/MailInfo.php index cf98a85..ed1d238 100644 --- a/app/Mail/MailInfo.php +++ b/app/Mail/MailInfo.php @@ -67,7 +67,7 @@ class MailInfo extends Mailable if($this->action === "check_is_like_customer") { $copy1line = "Hier geht es zum Kunden:"."\n"; $button = "zum Kunden"; - $title = "Ein Kunden muss überprüfen werden und einem Berater zugeordnet werden, da die Adresse nicht eindeutig ist."; + $title = "Ein Kunden muss überprüft werden und einem Berater zugeordnet werden, da die Adresse nicht eindeutig ist."; $url = route('admin_customer_detail', $this->user->id); $content .= $this->user ? 'Firma: '.$this->user->billing_company."\n" : ''; $content .= \App\Services\HTMLHelper::getSalutationLang($this->user->billing_salutation)." "; @@ -85,7 +85,7 @@ class MailInfo extends Mailable if($this->action === "change_is_like_customer"){ $copy1line = "Hier geht es zum Kunden:"."\n"; $button = "zum Kunden"; - $title = "Ein Kunden muss erneut überprüfen werden, da bei einer Änderung eine bestehende Kundenhoheit gefunden wurde."; + $title = "Ein Kunden muss erneut überprüft werden, da bei einer Änderung eine bestehende Kundenhoheit gefunden wurde."; $url = route('admin_customer_detail', $this->user->id); $content .= "Folgende Daten für die Kundenhoheit wurden geändert:"."\n"; foreach ($this->data as $key=>$value){ diff --git a/app/Mail/MailSyS.php b/app/Mail/MailSyS.php new file mode 100644 index 0000000..49dabc9 --- /dev/null +++ b/app/Mail/MailSyS.php @@ -0,0 +1,63 @@ +model = $model; + $this->action = $action; + + if($this->action === "log"){ + $this->subject = 'mivita Logger'; + } + } + + + public function build() + { + $content = ""; + if($this->action === "log"){ + + $title = "New Log"; + + + if($this->model->user_id && $this->model->user){ + $content .= "From User: ".$this->model->user->id." | ".$this->model->user->email."\n"; + } + if($this->model->model && $this->model->model_id){ + $content .= "Apply: ".$this->model->model." | ".$this->model->model_id."\n"; + if($this->model->model === 'App\User'){ + $apply = User::find($this->model->model_id); + $content .= $this->model->model.": ".$apply->email." | ".$this->model->model_id."\n"; + } + } + $content .= "\n"; + $content .= "Action: ".$this->model->action."\n"; + $content .= "Message: ".$this->model->message."\n"; + $content .= "\n"; + $content .= "Channel: ".$this->model->channel."\n"; + $content .= "Level: ".$this->model->getLevelType()."\n"; + $content .= "\n"; + $content .= "Time: ".$this->model->created_at->format("d.m.Y H:i"); + } + + return $this->view('emails.sys')->with([ + 'title' => $title, + 'content' => $content, + ]); + } +} \ No newline at end of file diff --git a/app/Models/Logger.php b/app/Models/Logger.php new file mode 100644 index 0000000..b65aca7 --- /dev/null +++ b/app/Models/Logger.php @@ -0,0 +1,71 @@ + 'int', + 'model_id' => 'int', + 'level' => 'int' + ]; + + protected $fillable = [ + 'user_id', + 'model_id', + 'model', + 'action', + 'channel', + 'message', + 'level' + ]; + + public $levelTypes = [ + 1 => 'debug', + 2 => 'info', + 3 => 'notice', + 4 => 'warning', + 5 => 'error', + 6 => 'critical', + 7 => 'alert', + ]; + + public function user() + { + return $this->belongsTo(User::class); + } + + public function getLevelType(){ + + return isset($this->levelTypes[$this->level]) ? $this->levelTypes[$this->level] : ""; + } + +} diff --git a/app/Models/PaymentMethod.php b/app/Models/PaymentMethod.php new file mode 100644 index 0000000..2542756 --- /dev/null +++ b/app/Models/PaymentMethod.php @@ -0,0 +1,77 @@ + 'int', + 'pos' => 'int', + 'active' => 'bool', + 'default' => 'bool', + ]; + + protected $fillable = [ + 'name', + 'short', + 'show_at', + 'pos', + 'default', + 'active' + ]; + + public static $showATs = [ + 0 => 'Nur Kunden Shop', + 1 => 'Nur Berater Shop', + 2 => 'Kunden + Berater Shop', + 3 => 'Nur Reg/Mitgliedschaft Berater', + 4 => 'Kunden + Berater Shop + Reg/Mitgliedschaft', + 5 => 'Berater Shop + Reg/Mitgliedschaft', + 9 => 'überall', + ]; + + public function getShowAtType(){ + return isset(self::$showATs[$this->show_at]) ? self::$showATs[$this->show_at] : '-'; + } + + public static function getDefaultAsArray(){ + return PaymentMethod::where('active', true)->where('default', true)->pluck('id'); + } +} diff --git a/app/Models/Product.php b/app/Models/Product.php index 4c69c0c..3d0bd81 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -103,6 +103,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property-read int|null $country_prices_count * @property int|null $wp_number * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWpNumber($value) + * @property bool|null $shipping_addon + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereShippingAddon($value) */ class Product extends Model { @@ -124,7 +126,9 @@ class Product extends Model 'trans_usage' => 'array', 'trans_ingredients' => 'array', 'action' => 'array', - 'wp_number' => 'int' + 'wp_number' => 'int', + 'shipping_addon' => 'bool', + 'active' => 'bool' ]; use Sluggable; @@ -155,6 +159,7 @@ class Product extends Model 'amount', 'active', 'show_at', + 'shipping_addon', 'identifier', 'action', 'upgrade_to_id' @@ -235,20 +240,20 @@ class Product extends Model } public function setPriceAttribute( $value ) { - $value = $this->_format_number($value); - $this->attributes['price'] = floatval(str_replace(',', '.', $value)); + + $this->attributes['price'] = $value ? Util::reFormatNumber($value) : null; } public function setPriceEkAttribute( $value ) { - $value = $this->_format_number($value); - $this->attributes['price_ek'] = floatval(str_replace(',', '.', $value)); + + $this->attributes['price_ek'] = $value ? Util::reFormatNumber($value) : null; } public function setTaxAttribute( $value ) { - $value = $this->_format_number($value); - $this->attributes['tax'] = floatval(str_replace(',', '.', $value)); + + $this->attributes['tax'] = $value ? Util::reFormatNumber($value) : null; } public function setPriceOldAttribute( $value ) { - $value = $this->_format_number($value); - $this->attributes['price_old'] = floatval(str_replace(',', '.', $value)); + + $this->attributes['price_old'] = $value ? Util::reFormatNumber($value) : null; } public function getFormattedPrice() @@ -271,6 +276,34 @@ class Product extends Model return isset($this->attributes['price_old']) ? Util::formatNumber($this->attributes['price_old']) : ""; } + /*price by user Factor*/ + private function calcPriceUserFactor($price){ + if(\Auth::user() && \Auth::user()->user_level){ + $margin = ((\Auth::user()->user_level->margin -100)*-1) / 100; + $price = $price * $margin; + } + return $price; + } + /*price net*/ + private function calcPriceNet($price){ + $tax_rate = ($this->attributes['tax'] + 100) / 100; + + return $price / $tax_rate; + } + //price calu with + public function getPriceWith(Bool $net = true, Bool $ufactor = true){ + $price = $this->attributes['price']; + $price = $net ? $this->calcPriceNet($price) : $price; + $price = $ufactor ? $this->calcPriceUserFactor($price) : $price; + return $price; + } + /*out*/ + public function getFormattedPriceWith(Bool $net = true, Bool $ufactor = true) + { + return isset($this->attributes['price']) ? Util::formatNumber($this->getPriceWith($net, $ufactor)) : ""; + } + + public function getBasePriceFormattedFull(){ if($price = $this->getBasePrice()){ $unit = $this->attributes['unit']; @@ -310,6 +343,10 @@ class Product extends Model public function getUnitType(){ return isset($this->unitTypes[$this->unit]) ? $this->unitTypes[$this->unit] : '-'; } + public function getShowAtType(){ + return isset($this->showATs[$this->show_at]) ? $this->showATs[$this->show_at] : '-'; + } + public function setPosAttribute($value){ $this->attributes['pos'] = is_numeric($value) ? $value : null; diff --git a/app/Models/Shipping.php b/app/Models/Shipping.php index 405ee9c..7a3af40 100644 --- a/app/Models/Shipping.php +++ b/app/Models/Shipping.php @@ -29,6 +29,8 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereTransName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereUpdatedAt($value) * @mixin \Eloquent + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShippingPrice[] $shipping_prices + * @property-read int|null $shipping_prices_count */ class Shipping extends Model { diff --git a/app/Models/ShippingPrice.php b/app/Models/ShippingPrice.php index 54effe7..f4e1757 100644 --- a/app/Models/ShippingPrice.php +++ b/app/Models/ShippingPrice.php @@ -2,6 +2,7 @@ namespace App\Models; +use App\Services\Util; use Illuminate\Database\Eloquent\Model; /** @@ -34,13 +35,15 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightFrom($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightTo($value) * @mixin \Eloquent + * @property-write mixed $tax + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereTaxRate($value) */ class ShippingPrice extends Model { protected $table = 'shipping_prices'; protected $fillable = [ - 'shipping_id', 'price', 'tax_rate', 'factor', 'total_from', 'total_to', 'weight_from', 'weight_to', + 'shipping_id', 'price', 'price_comp', 'tax_rate', 'factor', 'total_from', 'total_to', 'weight_from', 'weight_to', ]; public function shipping() @@ -49,115 +52,65 @@ class ShippingPrice extends Model } - public function _format_number($value) - { - return preg_replace("/[^0-9,]/", "", $value); - } - public function setPriceAttribute($value) { - $value = $this->_format_number($value); - $this->attributes['price'] = floatval(str_replace(',', '.', $value)); + $this->attributes['price'] = $value ? Util::reFormatNumber($value) : null; + } + public function setPriceCompAttribute($value) + { + $this->attributes['price_comp'] = $value ? Util::reFormatNumber($value) : null; } public function setFactorAttribute($value) { - $value = $this->_format_number($value); - if ($value == "") { - $this->attributes['factor'] = null; - } else { - $this->attributes['factor'] = floatval(str_replace(',', '.', $value)); - } + $this->attributes['factor'] = $value ? Util::reFormatNumber($value) : null; } public function setTaxAttribute($value) { - $value = $this->_format_number($value); - if ($value == "") { - $this->attributes['tax_rate'] = null; - } else { - $this->attributes['tax_rate'] = floatval(str_replace(',', '.', $value)); - } + $this->attributes['tax_rate'] = $value ? Util::reFormatNumber($value) : null; } - public function setTotalFromAttribute($value) { - $value = $this->_format_number($value); - if ($value == "") { - $this->attributes['total_from'] = null; - } else { - $this->attributes['total_from'] = floatval(str_replace(',', '.', $value)); - } + $this->attributes['total_from'] = $value ? Util::reFormatNumber($value) : null; } public function setTotalToAttribute($value) { - $value = $this->_format_number($value); - if ($value == "") { - $this->attributes['total_to'] = null; - } else { - - $this->attributes['total_to'] = floatval(str_replace(',', '.', $value)); - } + $this->attributes['total_to'] = $value ? Util::reFormatNumber($value) : null; } - public function getFormattedPrice() { - if ($this->attributes['price'] === NULL) { - return $this->attributes['price']; - } - if (\App::getLocale() == "en") { - return number_format($this->attributes['price'], 2, '.', ','); - } - return number_format($this->attributes['price'], 2, ',', '.'); + return isset($this->attributes['price']) ? Util::formatNumber($this->attributes['price']) : ""; + } + + public function getFormattedPriceComp() + { + return isset($this->attributes['price_comp']) ? Util::formatNumber($this->attributes['price_comp']) : ""; } public function getFormattedTaxRate() { - if ($this->attributes['tax_rate'] === NULL) { - return $this->attributes['tax_rate']; - } - if (\App::getLocale() == "en") { - return number_format($this->attributes['tax_rate'], 2, '.', ','); - } - return number_format($this->attributes['tax_rate'], 2, ',', '.'); + return isset($this->attributes['tax_rate']) ? Util::formatNumber($this->attributes['tax_rate']) : ""; } public function getFormattedFactor() { - if ($this->attributes['factor'] === NULL) { - return $this->attributes['factor']; - } - if (\App::getLocale() == "en") { - return number_format($this->attributes['factor'], 2, '.', ','); - } - return number_format($this->attributes['factor'], 2, ',', '.'); + return isset($this->attributes['factor']) ? Util::formatNumber($this->attributes['factor']) : ""; } public function getFormatTotalFrom() { - if ($this->attributes['total_from'] === NULL) { - return $this->attributes['total_from']; - } - if (\App::getLocale() == "en") { - return number_format($this->attributes['total_from'], 2, '.', ','); - } - return number_format($this->attributes['total_from'], 2, ',', '.'); + return isset($this->attributes['total_from']) ? Util::formatNumber($this->attributes['total_from']) : ""; } public function getFormattedTotalTo() { - if ($this->attributes['total_to'] === NULL) { - return $this->attributes['total_to']; - } - if (\App::getLocale() == "en") { - return number_format($this->attributes['total_to'], 2, '.', ','); - } - return number_format($this->attributes['total_to'], 2, ',', '.'); + return isset($this->attributes['total_to']) ? Util::formatNumber($this->attributes['total_to']) : ""; } diff --git a/app/Models/ShoppingOrder.php b/app/Models/ShoppingOrder.php index 908d026..4416751 100644 --- a/app/Models/ShoppingOrder.php +++ b/app/Models/ShoppingOrder.php @@ -67,6 +67,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserDeletedAt($value) * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withoutTrashed() + * @property-read \App\Models\ShippingCountry $shipping_country */ class ShoppingOrder extends Model { @@ -90,6 +91,7 @@ class ShoppingOrder extends Model 'weight', 'paid', 'txaction', + 'wp_invoice_path', 'mode', ]; @@ -101,7 +103,7 @@ class ShoppingOrder extends Model public function country() { - return $this->belongsTo('App\Models\Sh','country_id'); + return $this->belongsTo('App\Models\ShippingCountry','country_id'); } public function shipping_country() diff --git a/app/Models/ShoppingOrderItem.php b/app/Models/ShoppingOrderItem.php index a7209ed..2ce7446 100644 --- a/app/Models/ShoppingOrderItem.php +++ b/app/Models/ShoppingOrderItem.php @@ -32,6 +32,15 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereSlug($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUpdatedAt($value) * @mixin \Eloquent + * @property float|null $tax_rate + * @property \Illuminate\Support\Carbon|null $deleted_at + * @property string|null $user_deleted_at + * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereTaxRate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUserDeletedAt($value) + * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withTrashed() + * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withoutTrashed() */ class ShoppingOrderItem extends Model { diff --git a/app/Models/ShoppingUser.php b/app/Models/ShoppingUser.php index e31182a..b0d1b14 100644 --- a/app/Models/ShoppingUser.php +++ b/app/Models/ShoppingUser.php @@ -101,6 +101,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereUserDeletedAt($value) * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingUser withTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingUser withoutTrashed() + * @property string|null $mode + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereMode($value) */ class ShoppingUser extends Model { diff --git a/app/Models/SySetting.php b/app/Models/SySetting.php new file mode 100644 index 0000000..6c51cc6 --- /dev/null +++ b/app/Models/SySetting.php @@ -0,0 +1,64 @@ + 'int', + 'active' => 'bool' + ]; + + protected $fillable = [ + 'name', + 'slug', + 'message', + 'action', + 'status', + 'active' + ]; + + public static $statusTypes = [ + 1 => 'default', + ]; + + public function sluggable() + { + return [ + 'slug' => [ + 'source' => 'name' + ] + ]; + } + + public function getStatusType(){ + return isset(self::$statusTypes[$this->status]) ? self::$statusTypes[$this->status] : ""; + } +} diff --git a/app/Repositories/ProductRepository.php b/app/Repositories/ProductRepository.php index bab0282..ac3a8fc 100644 --- a/app/Repositories/ProductRepository.php +++ b/app/Repositories/ProductRepository.php @@ -26,9 +26,10 @@ class ProductRepository extends BaseRepository { { $data['active'] = isset($data['active']) ? 1 : 0; + $data['shipping_addon'] = isset($data['shipping_addon']) ? 1 : 0; - if($data['id'] == "new"){ + if($data['id'] === "new"){ $this->model = Product::create($data); } else{ diff --git a/app/Repositories/UserRepository.php b/app/Repositories/UserRepository.php index bfa7fa3..ac2abfd 100644 --- a/app/Repositories/UserRepository.php +++ b/app/Repositories/UserRepository.php @@ -2,6 +2,7 @@ namespace App\Repositories; +use App\Models\PaymentMethod; use App\Models\UserAccount; use App\User; use Illuminate\Support\Facades\Hash; @@ -27,6 +28,10 @@ class UserRepository extends BaseRepository { 'email' => $data['email'], 'password' => env('APP_KEY'), ]); + $this->model->payment_methods = PaymentMethod::getDefaultAsArray(); + $this->model->save(); + + } else{ $this->model = $this->getById($data['user_id']); @@ -67,6 +72,7 @@ class UserRepository extends BaseRepository { ]); $this->model->account_id = $account->id; + $this->model->payment_methods = PaymentMethod::getDefaultAsArray(); $this->model->save(); diff --git a/app/Services/HTMLHelper.php b/app/Services/HTMLHelper.php index a7167d4..65a7558 100644 --- a/app/Services/HTMLHelper.php +++ b/app/Services/HTMLHelper.php @@ -6,6 +6,7 @@ use App\Models\Category; use App\Models\Country; use App\Models\Product; use App\Models\ShippingCountry; +use App\Models\ShoppingUser; use App\Models\UserLevel; use App\User; @@ -299,4 +300,21 @@ class HTMLHelper } return $ret; } + + public static function getUserCustomerOptions($id, $all=false){ + $values = ShoppingUser::select(['id', 'billing_firstname', 'billing_lastname', 'billing_email', 'number']) + ->where('shopping_users.member_id', '=', \Auth::user()->id)->get(); + $ret = ""; + if($all){ + $ret .= '\n'; + } + foreach ($values as $value){ + dump($value); + $attr = ($value->id == $id) ? 'selected="selected"' : ''; + $to = $value->billing_firstname." ".$value->billing_lastname." | ".$value->billing_email; + $ret .= '\n'; + + } + return $ret; + } } \ No newline at end of file diff --git a/app/Services/SysLog.php b/app/Services/SysLog.php new file mode 100644 index 0000000..95ddf38 --- /dev/null +++ b/app/Services/SysLog.php @@ -0,0 +1,78 @@ + 'debug', + 2 => 'info', + 3 => 'notice', + 4 => 'warning', + 5 => 'error', + 6 => 'critical', + 7 => 'alert', + ]; + + function __construct($action = null, $channel = 'default', $level = 1) + { + $this->log = new Logger(); + $this->log->action = $action; + $this->log->channel = $channel; + $this->log->level = $level; + } + + public static function action($action = null, $channel = 'default', $level = 1) + { + //Return new instance of this model + return new self($action, $channel, $level); + } + + public function setModel($id, $model){ + $this->log->model_id = $id; + $this->log->model = $model; + return $this; + } + + public function setUserId($user_id){ + $this->log->user_id = $user_id; + return $this; + } + + public function setMessage($message){ + $this->log->message = $message; + return $this; + } + + public function save(){ + $this->log->save(); + //send Mail + if($this->log->level >= 3){ + $mail = config('app.info_test_mail'); + Mail::to($mail)->send(new MailSyS($this->log, 'log')); + } + } + + public function getLevelType(){ + return $this->levelTypes[$this->log->level]; + } + + + +} diff --git a/app/Services/UserService.php b/app/Services/UserService.php index b8523b9..69e8b33 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -17,4 +17,5 @@ class UserService while(!$unique); return $confirmation_code; } + } \ No newline at end of file diff --git a/app/User.php b/app/User.php index cc17ec7..0d3d19f 100755 --- a/app/User.php +++ b/app/User.php @@ -2,6 +2,7 @@ namespace App; +use App\Models\PaymentMethod; use Carbon\Carbon; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; @@ -112,6 +113,8 @@ use Laravel\Passport\HasApiTokens; * @property-read int|null $clients_count * @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens * @property-read int|null $tokens_count + * @property array|null $payment_methods + * @method static \Illuminate\Database\Eloquent\Builder|\App\User wherePaymentMethods($value) */ class User extends Authenticatable { @@ -134,6 +137,7 @@ class User extends Authenticatable protected $casts = [ 'settings' => 'array', + 'payment_methods' => 'array' ]; /** @@ -366,7 +370,6 @@ class User extends Authenticatable if(!$this->attributes['payment_account']){ return ""; } if(!$time){ return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateDB()); - } return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateTimeDB()); } @@ -403,6 +406,18 @@ class User extends Authenticatable return isset($this->settings[$key]) ? $this->settings[$key] : $default; } + public function getPaymentMethodsShort(){ + $ret = ""; + if($this->payment_methods !== null){ + foreach ($this->payment_methods as $payment_method){ + if($find = PaymentMethod::find($payment_method)){ + $ret .= $find->short." | "; + } + } + $ret = rtrim($ret, " | "); + } + return $ret; + } /** * @return string */ diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index b077688..d364bd6 100755 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -48,6 +48,7 @@ class CreateUsersTable extends Migration $table->timestamp('payment_account')->nullable(); $table->timestamp('payment_shop')->nullable(); $table->boolean('abo_options')->default(false); + $table->string('payment_methods')->nullable(); $table->boolean('test_mode')->default(false); $table->text('settings')->nullable(); diff --git a/database/migrations/2018_10_21_164001_create_products_table.php b/database/migrations/2018_10_21_164001_create_products_table.php index 9f2db0f..0c0db81 100644 --- a/database/migrations/2018_10_21_164001_create_products_table.php +++ b/database/migrations/2018_10_21_164001_create_products_table.php @@ -59,6 +59,8 @@ class CreateProductsTable extends Migration $table->unsignedInteger('amount')->nullable(); //for shop $table->tinyInteger('show_at')->unsigned()->nullable()->default(0); + $table->boolean('shipping_addon')->default(false); + $table->string('identifier', 20)->nullable(); $table->string('action')->nullable(); diff --git a/database/migrations/2019_01_06_004849_create_shipping_prices_table.php b/database/migrations/2019_01_06_004849_create_shipping_prices_table.php index ed7944e..502f775 100644 --- a/database/migrations/2019_01_06_004849_create_shipping_prices_table.php +++ b/database/migrations/2019_01_06_004849_create_shipping_prices_table.php @@ -18,6 +18,8 @@ class CreateShippingPricesTable extends Migration $table->unsignedInteger('shipping_id'); $table->decimal('price', 8, 2)->nullable(); + $table->decimal('price_comp', 8, 2)->nullable(); + $table->decimal('tax_rate', 5, 2)->nullable(); $table->decimal('factor', 5, 2)->nullable(); diff --git a/database/migrations/2019_02_23_163527_create_shopping_orders_table.php b/database/migrations/2019_02_23_163527_create_shopping_orders_table.php index aa1fff8..cf9a2e1 100644 --- a/database/migrations/2019_02_23_163527_create_shopping_orders_table.php +++ b/database/migrations/2019_02_23_163527_create_shopping_orders_table.php @@ -36,6 +36,7 @@ class CreateShoppingOrdersTable extends Migration $table->unsignedInteger('weight')->nullable(); $table->boolean('paid')->default(false); + $table->string('wp_invoice_path', 255)->nullable(); $table->string('txaction', 20)->nullable()->index(); $table->char('mode', 4)->nullable(); diff --git a/database/migrations/2019_02_25_090014_create_payment_transactions_table.php b/database/migrations/2019_02_25_090014_create_payment_transactions_table.php index 6ac7c4a..68b9c8e 100644 --- a/database/migrations/2019_02_25_090014_create_payment_transactions_table.php +++ b/database/migrations/2019_02_25_090014_create_payment_transactions_table.php @@ -24,7 +24,6 @@ class CreatePaymentTransactionsTable extends Migration $table->string('status',20)->nullable(); - $table->string('key',40)->nullable(); $table->string('txaction',20)->nullable(); diff --git a/database/migrations/2020_07_25_131854_create_payment_methods_table.php b/database/migrations/2020_07_25_131854_create_payment_methods_table.php new file mode 100644 index 0000000..fbd649f --- /dev/null +++ b/database/migrations/2020_07_25_131854_create_payment_methods_table.php @@ -0,0 +1,38 @@ +increments('id'); + $table->string('name')->index(); + $table->string('short', 10); + $table->unsignedTinyInteger('show_at')->nullable()->default(0); + $table->unsignedTinyInteger('pos')->nullable()->default(0); + $table->boolean('active')->default(false); + $table->boolean('default')->default(false); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('payment_methods'); + } +} diff --git a/database/migrations/2020_07_30_142848_create_loggers_table.php b/database/migrations/2020_07_30_142848_create_loggers_table.php new file mode 100644 index 0000000..04a94d3 --- /dev/null +++ b/database/migrations/2020_07_30_142848_create_loggers_table.php @@ -0,0 +1,51 @@ +increments('id'); + + //from user + $table->unsignedInteger('user_id')->nullable(); + + //to model + $table->unsignedInteger('model_id')->index()->nullable(); + $table->string('model')->index()->nullable(); + + $table->string('action')->index()->nullable(); + $table->string('channel')->index()->nullable(); + $table->text('message')->nullable(); + + $table->unsignedTinyInteger('level')->index()->default(0); + + $table->timestamps(); + + $table->foreign('user_id') + ->references('id') + ->on('users') + ->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('loggers'); + } +} diff --git a/database/migrations/2020_07_31_114539_create_sy_settings_table.php b/database/migrations/2020_07_31_114539_create_sy_settings_table.php new file mode 100644 index 0000000..767581a --- /dev/null +++ b/database/migrations/2020_07_31_114539_create_sy_settings_table.php @@ -0,0 +1,41 @@ +increments('id'); + + $table->string('name')->index(); + $table->string('slug')->unique()->index(); + + $table->text('message')->nullable(); + + $table->string('action')->index()->nullable(); + $table->unsignedTinyInteger('status')->index()->default(0); + $table->boolean('active')->default(false); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('sy_settings'); + } +} diff --git a/public/assets/css/custom-style.css b/public/assets/css/custom-style.css index 0463bde..816ae98 100644 --- a/public/assets/css/custom-style.css +++ b/public/assets/css/custom-style.css @@ -163,7 +163,9 @@ border: #b5c49b 1px solid; .btn-text-500{ font-weight: 600; } - +.btn-text-400{ + font-weight: 500; +} div.shop-item-buttons .btn-xs { font-size: 13px; } diff --git a/public/css/application.css b/public/css/application.css index 23c815b..e6a2ca3 100644 --- a/public/css/application.css +++ b/public/css/application.css @@ -73,4 +73,8 @@ a[aria-expanded='true'] > .fa-caret-expand:before { .has-error .help-block{ color: #a94442; +} + +.no-line-break { + white-space: nowrap; } \ No newline at end of file diff --git a/public/js/custom.js b/public/js/custom.js index bb3ed0e..2d89808 100644 --- a/public/js/custom.js +++ b/public/js/custom.js @@ -98,9 +98,12 @@ $(function () { } var data = {}; $.each(button.data(), function(index, value){ - data[index] = value; + if(index !== 'bs.tooltip'){ + data[index] = value; + } }); - //console.log(data); + console.log(data); + loadModalInner(this, data); }); @@ -111,7 +114,9 @@ $(function () { button = $(this); var data = {}; $.each(button.data(), function(index, value){ - data[index] = value; + if(index !== 'bs.tooltip'){ + data[index] = value; + } }); //console.log(data); loadModalInner(this, data); @@ -133,7 +138,7 @@ $(function () { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, success: function(data) { - //console.log(data); + console.log(data); if(data.response.modal){ $(data.response.target).find('.modal-dialog').addClass(data.response.modal); } diff --git a/public/js/shopping_card.js b/public/js/shopping_card.js new file mode 100644 index 0000000..ab50201 --- /dev/null +++ b/public/js/shopping_card.js @@ -0,0 +1,106 @@ + +var ShoppingCard = { + + + image_dialog_images_url: "/iq/content/assets/modal", + image_dialog_title: 'Medien', + image_dialog_close_btn_text: 'schließen', + image_dialog_ok_btn_text: 'Einfügen', + data_id: null, + data_obj: null, + data_set: null, + data_img: null, + data_content: null, + modal: null, + + init: function () { + var _self = this; + var $modal = _self.modal = $('#modal_iq_assets').hide(); + $modal.find("button#modal_iq_save").click(function(event) + { + var items = LFileManager.getSelectedItems(); + $modal.modal('hide'); + if(items[0]){ + var item = items[0]; + if(_self.data_img){ + var img = $(_self.data_id).find(_self.data_img); + if(item['thumb_url'] && img){ + img.attr('src', item['thumb_url']); + } + } + //console.log(_self.data_content); + //console.log(item['content']); + if(_self.data_content){ + var input = $(_self.data_id).find('input[name="'+_self.data_obj+'['+_self.data_content+']"]'); + var val = item['content'][_self.data_content]; + //console.log(input); + //console.log(val); + + if(input){ + input.val(val).change(); + } + } + _self.data_set.forEach(function (setter, index) { + var input = $(_self.data_id).find('input[name="'+_self.data_obj+'['+setter+']"]'); + var val = item[setter] + if(input && val){ + input.val(val).change(); + } + }); + } + /*items.forEach(function (item, index) { + });*/ + }); + + $('.btn-lfm-open-modal').on('click', function () { + + _self.data_id = $(this).data('id'); + _self.data_obj = $(this).data('obj'); + _self.data_set = $(this).data('set'); + _self.data_img = $(this).data('img'); + _self.data_content = $(this).data('content'); + + _self.fillModal(); + _self.modal.modal(); + }); + }, + + fillModal: function () { + var _self = this; + var next = _self.setEvents; + _self.getImagesFromUrl(next); + }, + setEvents: function() + { + // images click event to select image + /*self.$modal.find('img').click(function(event) + { + // $(this).toggleClass(self.select_class); + });*/ + }, + getImagesFromUrl: function(callback) + { + var _self = this; + // get images html from url + $.get(_self.image_dialog_images_url, function(html) + { + _self.setModalHtml(html); + callback(); + + }).fail(function() + { + console.error("error loading from "+_self.image_dialog_images_url); + }) + }, + setModalHtml: function(html) + { // set variabl parts to modal html + var _self = this; + + _self.modal.find('.modal-title').html(_self.image_dialog_title); + _self.modal.find('#modal_iq_close').html(_self.image_dialog_close_btn_text); + _self.modal.find('#modal_iq_save').html(_self.image_dialog_ok_btn_tex); + + _self.modal.find('.modal-body').html(html); + LFileManager.initFileManager(true); + }, +}; \ No newline at end of file diff --git a/resources/lang/de/email.php b/resources/lang/de/email.php index 857314d..d9f779e 100644 --- a/resources/lang/de/email.php +++ b/resources/lang/de/email.php @@ -6,7 +6,6 @@ 'subject_activate' => 'Account aktivieren', 'account_active' => 'Account freigeschaltet', 'subject_reset' => 'Passwort zurücksetzen', - 'salutation' => 'Hallo Kunde', 'dear_mrs' => 'Hallo', 'dear_sir' => 'Hallo', 'hello' => 'Hallo', @@ -17,12 +16,15 @@ 'checkout_subject' => 'Deine Bestellung bei', 'checkout_subject_paid' => 'Zahlungsbestätigung - Deine Bestellung bei', 'change_e_mail' => 'E-Mail Adresse ändern', + 'salutation' => 'Anrede', 'first_name' => 'Vorname', 'last_name' => 'Nachname', 'email' => 'E-Mail', 'phone' => 'Telefon', 'subject' => 'Betreff', 'message' => 'Nachricht', + 'sales_partnership' => 'Vertriebspartnerschaft', + 'sales_partnership_message' => 'Hinweis', 'button_account' => 'zum Account', 'active_copy1line' => 'Du erhältst diese E-Mail, weil wir eine Anfrage zur Änderung Deiner E-Mail-Adresse für Dein Konto erhalten haben.', 'copy2line' => 'Oder kopiere diesen Link in die Adressleiste Deines Browsers.', diff --git a/resources/lang/de/navigation.php b/resources/lang/de/navigation.php index 61645c4..bc8aa50 100755 --- a/resources/lang/de/navigation.php +++ b/resources/lang/de/navigation.php @@ -9,11 +9,14 @@ return [ 'settings' => 'Einstellungen', 'my_team' => 'Mein Team', 'my_clients' => 'Meine Kunden', + 'my_orders' => 'Meine Bestellungen', 'member_register' => 'Berater registrieren', 'member'=>'Berater', 'membership' => 'Mitgliedschaft', 'my_membership' => 'Meine Mitgliedschaft', 'orders'=>'Bestellungen', + 'trigger'=>'auslösen', + 'do_order'=>'bestellen', 'clients'=>'Kunden', 'products'=>'Produkte', 'overview'=>'Übersicht', @@ -27,7 +30,9 @@ return [ 'modules'=>'Module', 'user_roles'=>'User Rechte', 'shipping_costs'=>'Versandkosten', + 'payment_methods' => 'Zahlungsarten', 'career_level'=>'Karriere-Level', 'countries'=>'Länder', 'logout'=>'Logout', + 'system_settings' => 'Systemeinstellungen' ]; diff --git a/resources/lang/de/validation.php b/resources/lang/de/validation.php index fcca382..4dc2911 100755 --- a/resources/lang/de/validation.php +++ b/resources/lang/de/validation.php @@ -204,5 +204,7 @@ return [ 'm_account' => 'Account ID', 'has_customer_buyed' => 'Die Angabe', 'billing_country_code' => 'Land Code', + 'sales_partnership' => 'Vertriebspartnerschaft', + 'sales_partnership_message' => 'Vertriebspartnerschaft Hinweis' ], ]; diff --git a/resources/views/admin/customer/_customer_detail.blade.php b/resources/views/admin/customer/_customer_detail.blade.php new file mode 100644 index 0000000..40a2e8d --- /dev/null +++ b/resources/views/admin/customer/_customer_detail.blade.php @@ -0,0 +1,110 @@ +
+
+ Kunden-, Rechnungsadresse +
+
+ @if($shopping_user->billing_company) +
+
Firma
+ {{ $shopping_user->billing_company }} +
+ @endif +
+
Anrede
+ {{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }} +
+
+
Vorname
+ {{ $shopping_user->billing_firstname }} +
+
+
Nachname
+ {{ $shopping_user->billing_lastname }} +
+
+
+
+
Straße
+ {{ $shopping_user->billing_address }} +
+
+
Zusatz
+ {{ $shopping_user->billing_address_2 }} +
+
+
PLZ
+ {{ $shopping_user->billing_zipcode }} +
+
+
Stadt
+ {{ $shopping_user->billing_city }} +
+
+
Land
+ {{ $shopping_user->billing_country->getLocated() }} +
+
+
Telefon
+ {{ $shopping_user->billing_phone }} +
+
+
+
+ + + +
+
+ Lieferadresse +
+ @if($shopping_user->same_as_billing) + {{__('email.checkout_mail_same_address')}} + @else +
+ @if($shopping_user->shipping_company) +
+
Firma
+ {{ $shopping_user->shipping_company }} +
+ @endif +
+
Anrede
+ {{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }} +
+
+
Vorname
+ {{ $shopping_user->shipping_firstname }} +
+
+
Nachname
+ {{ $shopping_user->shipping_lastname }} +
+
+
+
+
Straße
+ {{ $shopping_user->shipping_address }} +
+
+
Zusatz
+ {{ $shopping_user->shipping_address_2 }} +
+
+
PLZ
+ {{ $shopping_user->shipping_zipcode }} +
+
+
Stadt
+ {{ $shopping_user->shipping_city }} +
+
+
Land
+ {{ $shopping_user->shipping_country->getLocated() }} +
+
+
Telefon
+ {{ $shopping_user->shipping_phone }} +
+
+ @endif +
\ No newline at end of file diff --git a/resources/views/admin/customer/_detail.blade.php b/resources/views/admin/customer/_detail.blade.php index d986139..c1895c6 100644 --- a/resources/views/admin/customer/_detail.blade.php +++ b/resources/views/admin/customer/_detail.blade.php @@ -107,116 +107,8 @@ @endif -
-
- Rechnungsadresse -
-
- @if($shopping_user->billing_company) -
-
Firma
- {{ $shopping_user->billing_company }} -
- @endif -
-
Anrede
- {{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }} -
-
-
Vorname
- {{ $shopping_user->billing_firstname }} -
-
-
Nachname
- {{ $shopping_user->billing_lastname }} -
-
-
-
-
Straße
- {{ $shopping_user->billing_address }} -
-
-
Zusatz
- {{ $shopping_user->billing_address_2 }} -
-
-
PLZ
- {{ $shopping_user->billing_zipcode }} -
-
-
Stadt
- {{ $shopping_user->billing_city }} -
-
-
Land
- {{ $shopping_user->billing_country->getLocated() }} -
-
-
Telefon
- {{ $shopping_user->billing_phone }} -
-
-
-
- + @include('admin.customer._customer_detail') - -
-
- Lieferadresse -
- @if($shopping_user->same_as_billing) - {{__('email.checkout_mail_same_address')}} - @else -
- @if($shopping_user->shipping_company) -
-
Firma
- {{ $shopping_user->shipping_company }} -
- @endif -
-
Anrede
- {{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }} -
-
-
Vorname
- {{ $shopping_user->shipping_firstname }} -
-
-
Nachname
- {{ $shopping_user->shipping_lastname }} -
-
-
-
-
Straße
- {{ $shopping_user->shipping_address }} -
-
-
Zusatz
- {{ $shopping_user->shipping_address_2 }} -
-
-
PLZ
- {{ $shopping_user->shipping_zipcode }} -
-
-
Stadt
- {{ $shopping_user->shipping_city }} -
-
-
Land
- {{ $shopping_user->shipping_country->getLocated() }} -
-
-
Telefon
- {{ $shopping_user->shipping_phone }} -
-
- @endif -

diff --git a/resources/views/admin/customer/_edit.blade.php b/resources/views/admin/customer/_edit.blade.php index 455fc69..045767e 100644 --- a/resources/views/admin/customer/_edit.blade.php +++ b/resources/views/admin/customer/_edit.blade.php @@ -2,7 +2,7 @@
- Rechnungsadresse + Kunden-, Rechnungsadresse
* {{trans('register.required_fields')}} @@ -277,8 +277,6 @@ {{ Form::text('billing_email-confirm', $shopping_user->billing_email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'billing_email-confirm')) }}
- - @endif
diff --git a/resources/views/admin/lead/index.blade.php b/resources/views/admin/lead/index.blade.php index 3b8e82a..27e29b8 100644 --- a/resources/views/admin/lead/index.blade.php +++ b/resources/views/admin/lead/index.blade.php @@ -20,6 +20,7 @@ {{__('E-Mail')}} {{__('Vorname')}} {{__('Nachname')}} + {{__('Level')}} {{__('Mitglied')}} {{__('bis')}} {{__('Onlineshop')}} @@ -55,6 +56,7 @@ { data: 'email', name: 'email' }, { data: 'first_name', name: 'account.first_name' }, { data: 'last_name', name: 'account.last_name' }, + { data: 'user_level', name: 'user_level' }, { data: 'payment_account', name: 'payment_account' }, { data: 'payment_account_date', name: 'payment_account_date' }, { data: 'payment_shop', name: 'payment_shop' }, diff --git a/resources/views/admin/level/index.blade.php b/resources/views/admin/level/index.blade.php index 560df85..4b08238 100755 --- a/resources/views/admin/level/index.blade.php +++ b/resources/views/admin/level/index.blade.php @@ -35,9 +35,7 @@ {{ $value->name }} {{ $value->getFormattedMargin() }} {{ $value->getTranNames() }} - @if($value->active) @else@endif - - + {!! get_active_badge($value->active) !!} @endforeach diff --git a/resources/views/admin/modal/show_product.blade.php b/resources/views/admin/modal/show_product.blade.php new file mode 100644 index 0000000..90e9da1 --- /dev/null +++ b/resources/views/admin/modal/show_product.blade.php @@ -0,0 +1,120 @@ + + \ No newline at end of file diff --git a/resources/views/admin/modal/show_user_customers.blade.php b/resources/views/admin/modal/show_user_customers.blade.php new file mode 100644 index 0000000..963592b --- /dev/null +++ b/resources/views/admin/modal/show_user_customers.blade.php @@ -0,0 +1,84 @@ + \ No newline at end of file diff --git a/resources/views/admin/payment_method/index.blade.php b/resources/views/admin/payment_method/index.blade.php new file mode 100755 index 0000000..1bd0ac7 --- /dev/null +++ b/resources/views/admin/payment_method/index.blade.php @@ -0,0 +1,148 @@ +@extends('layouts.layout-2') + +@section('content') +
+
+ {{__('Zahlungsarten')}} +
+
+ + + + + + + + + + + + + @foreach($values as $value) + + + + + + + + + @endforeach + +
 {{__('Pos')}}{{__('Name')}}{{__('sichtbar') }}{{__('Standard')}}{{__('Status')}}
+ + {{ $value->pos }}{{ $value->name }} ({{ $value->short }}){{ $value->getShowAtType() }}{!! get_active_badge($value->default) !!}{!! get_active_badge($value->active) !!}
+
+ +
+
+ +
+ + + + + + + +@endsection diff --git a/resources/views/admin/product/form.blade.php b/resources/views/admin/product/form.blade.php index c0d124f..236e1f0 100755 --- a/resources/views/admin/product/form.blade.php +++ b/resources/views/admin/product/form.blade.php @@ -45,6 +45,10 @@ {{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Produktbeschreibung'), 'class'=>'form-control summernote', 'id'=>'copy')) }} + diff --git a/resources/views/admin/product/index.blade.php b/resources/views/admin/product/index.blade.php index 44c9971..19a2668 100755 --- a/resources/views/admin/product/index.blade.php +++ b/resources/views/admin/product/index.blade.php @@ -26,6 +26,8 @@ {{__('Einheit')}} {{__('Grundpreis')}} {{__('Gewicht')}} + {{__('sichbar')}} + {{__('KP')}} {{__('Status')}} @@ -51,13 +53,15 @@
{{ $category->category->name }}
@endforeach - {{ $value->points }} {{ $value->getFormattedPrice() }} + {{ $value->points }} {{ $value->contents_total }} {{ $value->getUnitType() }} {{ $value->getBasePriceFormatted() }} {{ $value->weight }} - @if($value->active) @else@endif + {{ $value->getShowAtType() }} + {!! get_active_badge($value->shipping_addon) !!} + {!! get_active_badge($value->active) !!}   diff --git a/resources/views/admin/shipping/edit.blade.php b/resources/views/admin/shipping/edit.blade.php index f6a3dd6..cf0362f 100755 --- a/resources/views/admin/shipping/edit.blade.php +++ b/resources/views/admin/shipping/edit.blade.php @@ -68,7 +68,8 @@   - {{__('Preis')}} + {{__('Kunden Preis')}} + {{__('Kompensation Preis')}} {{__('Tax')}} {{__('Preis von - bis')}} {{__('Gewicht von - bis')}} @@ -83,6 +84,7 @@ - {{ $price->getFormattedPrice() }} - {{ $price->getFormattedTaxRate() }} + {{ $price->getFormattedPrice() }} + {{ $price->getFormattedPriceComp() }} + {{ $price->getFormattedTaxRate() }} {{ $price->getFormatTotalFrom() }} - {{ $price->getFormattedTotalTo() }} {{ $price->weight_from }} - {{ $price->weight_to }} @@ -106,6 +109,7 @@ + @@ -257,6 +257,41 @@ + + + + @@ -196,9 +197,6 @@ }); $('.note-status-output').hide(); }); - - - \ No newline at end of file diff --git a/resources/views/layouts/includes/layout-sidenav.blade.php b/resources/views/layouts/includes/layout-sidenav.blade.php index 91bfd2d..ef25896 100755 --- a/resources/views/layouts/includes/layout-sidenav.blade.php +++ b/resources/views/layouts/includes/layout-sidenav.blade.php @@ -74,6 +74,22 @@ @endif + @if(Auth::user()->isActiveAccount() && Auth::user()->isSySAdmin()) +
  • + + +
    {{ __('navigation.my_orders') }}
    +
    + +
  • + @endif @endif @if(Auth::user()->isAdmin()) @@ -154,12 +170,15 @@
  • SUPERADMIN
  • -
  • +
  • {{ __('navigation.user_roles') }}
  • -
  • +
  • {{ __('navigation.shipping_costs') }}
  • +
  • +
    {{ __('navigation.payment_methods') }}
    +
  • {{ __('navigation.career_level') }}
  • @@ -195,6 +214,9 @@ +
  • +
    {{ __('navigation.system_settings') }}
    +
  • @endif
  • diff --git a/resources/views/sys/admin/customers.blade.php b/resources/views/sys/admin/customers.blade.php index c1952af..8ea4e3e 100644 --- a/resources/views/sys/admin/customers.blade.php +++ b/resources/views/sys/admin/customers.blade.php @@ -33,6 +33,8 @@ + + diff --git a/resources/views/sys/settings/index.blade.php b/resources/views/sys/settings/index.blade.php new file mode 100755 index 0000000..b4a95fd --- /dev/null +++ b/resources/views/sys/settings/index.blade.php @@ -0,0 +1,152 @@ +@extends('layouts.layout-2') + +@section('content') +
    +
    + {{__('Systemeinstellungen')}} +
    +
    + + + + + + + + + + + + + + @foreach($values as $value) + + + + + + + + + + @endforeach + +
     {{__('Name')}}{{__('slug') }}{{__('Info') }}{{__('Action') }}{{__('Status')}}{{__('Aktiv')}}
    + + {{ $value->name }}{{ $value->slug }}{{ $value->message }}{{ $value->action }}{{ $value->status }}{!! get_active_badge($value->active) !!}
    +
    + +
    +
    + +
    + + + + + + + +@endsection diff --git a/resources/views/user/customer/index.blade.php b/resources/views/user/customer/index.blade.php index e51c0fc..cfe7019 100644 --- a/resources/views/user/customer/index.blade.php +++ b/resources/views/user/customer/index.blade.php @@ -25,6 +25,7 @@ {{__('Käufe')}} {{__('Newsletter')}} {{__('erstellt')}} + {{__('Status')}} {{__('ID Kunden')}} WP @@ -66,6 +67,7 @@ { data: 'orders', name: 'orders' }, { data: 'subscribed', name: 'subscribed' }, { data: 'first_created_at', name: 'first_created_at' }, + {data: 'status', name: 'status', searchable: false, orderable: false }, { data: 'number', name: 'number'}, { data: 'extras', name: 'extras', searchable: false, orderable: false}, ], diff --git a/resources/views/user/order/delivery.blade.php b/resources/views/user/order/delivery.blade.php new file mode 100644 index 0000000..21ad344 --- /dev/null +++ b/resources/views/user/order/delivery.blade.php @@ -0,0 +1,94 @@ +@extends('layouts.layout-2') + +@section('content') +

    + {{ __('navigation.my_orders') }} / {{ __('navigation.do_order') }} +

    + + + +
    +
    + + {!! Form::open(['url' => route('user_order_my_list', [$for, $delivery_id]), 'class' => 'form-horizontal']) !!} + +

    Lieferdaten

    +
    + + + +
    +
    + + + + +
    + +
    +
    + {!! Form::close() !!} + +
    + + +@endsection + diff --git a/resources/views/user/order/index.blade.php b/resources/views/user/order/index.blade.php new file mode 100644 index 0000000..a066886 --- /dev/null +++ b/resources/views/user/order/index.blade.php @@ -0,0 +1,89 @@ +@extends('layouts.layout-2') + +@section('content') +

    + {{ __('navigation.my_orders') }} / {{ __('navigation.overview') }} +

    + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    #{{__('E-Mail')}}{{__('Anrede')}}{{__('Firma')}}{{__('Vorname')}}{{__('Nachname')}}{{__('PLZ')}}{{__('Stadt')}}{{__('Land')}}{{__('Käufe')}}{{__('Newsletter')}}{{__('erstellt')}}{{__('ID Kunden')}}WP
    +
    + +
    +
    +
    + + +@endsection + diff --git a/resources/views/user/order/list.blade.php b/resources/views/user/order/list.blade.php new file mode 100644 index 0000000..df5f6e9 --- /dev/null +++ b/resources/views/user/order/list.blade.php @@ -0,0 +1,131 @@ +@extends('layouts.layout-2') + +@section('content') +

    + {{ __('navigation.my_orders') }} / {{ __('navigation.do_order') }} +

    + + + +
    +
    + + + + + + + + + + + + + + + + + +
    {{__('Bild')}}#{{__('Anzahl')}}{{__('Produkt')}}{{__('Artikelnummer')}}{{__('Netto-Preis')}}{{__('Points')}}{{__('Inhalt (ml)')}}{{__('Gewicht (g)')}}#
    +
    + +
    + + {!! Form::open(['url' => route('wizard_store_payment', [20]), 'class' => 'form-horizontal']) !!} + +
    + + @if($for === 'ot') +

    Lieferadresse (Kunde)

    + @include('user.order.shipping_ot') + @endif + + @if($for === 'me') +

    Lieferadresse (meine)

    + @include('user.order.shipping_me') + @endif +
    + + + @include('user.order.list_form') + + {!! Form::close() !!} +
    + + +@endsection + diff --git a/resources/views/user/order/list_form.blade.php b/resources/views/user/order/list_form.blade.php new file mode 100644 index 0000000..04bbc6a --- /dev/null +++ b/resources/views/user/order/list_form.blade.php @@ -0,0 +1,104 @@ + + +
    +

    Warenkorb

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ProduktPreisAnzahlSumme
    +
    + +
    + Nike Men Black Liteforce III Sneakers + + Color: +   + Size: EU 37   + Ships from: China + +
    +
    +
    + $57.55 + + + + 115.1 € + + × +
    +
    + +
    + WALKING 400 BLUE CAT3 + + Ships from: Germany + +
    +
    +
    + $20.55 + + + + $20.55 + + × +
    +
    + + +
    +
    + {{-- + + --}} +
    +
    +
    + +
    $20
    +
    +
    + +
    $1164.65
    +
    +
    +
    +
    +
    + +
    +
    diff --git a/resources/views/user/order/shipping_me.blade.php b/resources/views/user/order/shipping_me.blade.php new file mode 100644 index 0000000..a829745 --- /dev/null +++ b/resources/views/user/order/shipping_me.blade.php @@ -0,0 +1,102 @@ + +@if($user->account) + @if($user->account->same_as_billing) + +
    + @if($user->account->company) +
    +
    Firma
    + {{ $user->account->company }} +
    + @endif +
    +
    Anrede
    + {{ \App\Services\HTMLHelper::getSalutationLang($user->account->salutation) }} +
    +
    +
    Vorname
    + {{ $user->account->first_name }} +
    +
    +
    Nachname
    + {{ $user->account->last_name }} +
    +
    +
    +
    +
    Straße
    + {{ $user->account->address }} +
    +
    +
    Zusatz
    + {{ $user->account->address_2 }} +
    +
    +
    PLZ
    + {{ $user->account->zipcode }} +
    +
    +
    Stadt
    + {{ $user->account->city }} +
    +
    +
    Land
    + @if($user->account->country){{ $user->account->country->getLocated() }}@endif +
    +
    +
    Telefon
    + {{ $user->account->phone }} +
    +
    + + @else +
    + @if($user->account->shipping_company) +
    +
    Firma
    + {{ $user->account->shipping_company }} +
    + @endif +
    +
    Anrede
    + {{ \App\Services\HTMLHelper::getSalutationLang($user->account->shipping_salutation) }} +
    +
    +
    Vorname
    + {{ $user->account->shipping_firstname }} +
    +
    +
    Nachname
    + {{ $user->account->shipping_lastname }} +
    +
    +
    +
    +
    Straße
    + {{ $user->account->shipping_address }} +
    +
    +
    Zusatz
    + {{ $user->account->shipping_address_2 }} +
    +
    +
    PLZ
    + {{ $user->account->shipping_zipcode }} +
    +
    +
    Stadt
    + {{ $user->account->shipping_city }} +
    +
    +
    Land
    + @if($user->account->shipping_country){{ $user->account->shipping_country->getLocated() }}@endif +
    +
    +
    Telefon
    + {{ $user->account->shipping_phone }} +
    +
    + @endif +@else +

    Fehler: Keine Adressdaten gefunden!

    +@endif \ No newline at end of file diff --git a/resources/views/user/order/shipping_ot.blade.php b/resources/views/user/order/shipping_ot.blade.php new file mode 100644 index 0000000..df3502b --- /dev/null +++ b/resources/views/user/order/shipping_ot.blade.php @@ -0,0 +1,99 @@ + + @if($shopping_user->same_as_billing) + +
    + @if($shopping_user->billing_company) +
    +
    Firma
    + {{ $shopping_user->billing_company }} +
    + @endif +
    +
    Anrede
    + {{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }} +
    +
    +
    Vorname
    + {{ $shopping_user->billing_firstname }} +
    +
    +
    Nachname
    + {{ $shopping_user->billing_lastname }} +
    +
    +
    +
    +
    Straße
    + {{ $shopping_user->billing_address }} +
    +
    +
    Zusatz
    + {{ $shopping_user->billing_address_2 }} +
    +
    +
    PLZ
    + {{ $shopping_user->billing_zipcode }} +
    +
    +
    Stadt
    + {{ $shopping_user->billing_city }} +
    +
    +
    Land
    + @if($shopping_user->billing_country){{ $shopping_user->billing_country->getLocated() }}@endif +
    +
    +
    Telefon
    + {{ $shopping_user->billing_phone }} +
    +
    + + @else +
    + @if($shopping_user->shipping_company) +
    +
    Firma
    + {{ $shopping_user->shipping_company }} +
    + @endif +
    +
    Anrede
    + {{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }} +
    +
    +
    Vorname
    + {{ $shopping_user->shipping_firstname }} +
    +
    +
    Nachname
    + {{ $shopping_user->shipping_lastname }} +
    +
    +
    +
    +
    Straße
    + {{ $shopping_user->shipping_address }} +
    +
    +
    Zusatz
    + {{ $shopping_user->shipping_address_2 }} +
    +
    +
    PLZ
    + {{ $shopping_user->shipping_zipcode }} +
    +
    +
    Stadt
    + {{ $shopping_user->shipping_city }} +
    +
    +
    Land
    + @if($shopping_user->shipping_country){{ $shopping_user->shipping_country->getLocated() }}@endif +
    +
    +
    Telefon
    + {{ $shopping_user->shipping_phone }} +
    +
    + @endif + \ No newline at end of file diff --git a/resources/views/web/layouts/application.blade.php b/resources/views/web/layouts/application.blade.php index e1ca0be..05f4403 100644 --- a/resources/views/web/layouts/application.blade.php +++ b/resources/views/web/layouts/application.blade.php @@ -61,7 +61,6 @@ @yield('layout-content') - @@ -69,12 +68,12 @@ - + {{-- --}} - + @yield('scripts') + @endif @endsection \ No newline at end of file diff --git a/resources/views/web/templates/registrierung.blade.php b/resources/views/web/templates/registrierung.blade.php index c39eff6..f8c68f5 100644 --- a/resources/views/web/templates/registrierung.blade.php +++ b/resources/views/web/templates/registrierung.blade.php @@ -91,6 +91,9 @@ @if(isset($from_member_id)) {!! Form::hidden('from_member_id', $from_member_id) !!} @endif +
    + * {{trans('register.required_fields')}} +
    @@ -166,15 +169,12 @@
    -
    - * {{trans('register.required_fields')}} -
    +
    @if ($errors->has('accepted_data_protection')) @@ -197,7 +197,7 @@
    --}} - + {!! Form::close() !!} diff --git a/resources/views/web/user/layouts/application.blade.php b/resources/views/web/user/layouts/application.blade.php index 22dd1b7..0cd7ae2 100644 --- a/resources/views/web/user/layouts/application.blade.php +++ b/resources/views/web/user/layouts/application.blade.php @@ -72,12 +72,12 @@ - + {{-- --}} - + @yield('scripts') + {{--