diff --git a/.env b/.env index 3e8c1fb..4fdce59 100644 --- a/.env +++ b/.env @@ -22,12 +22,14 @@ APP_CHECKOUT_TEST_MAIL=kevin.adametz@me.com APP_INFO_TEST_MAIL=kevin.adametz@me.com EXCEPTION_MAIL=exception@adametz.media +APP_MODE=test + APP_IPINFO=true APP_MAIN_TAX=1.19 APP_MAIN_TAX_RATE=19 -APP_PHP_VERSION=7.4 +APP_PHP_VERSION=8.2 LOG_CHANNEL=stack diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 5d69316..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Datasource local storage ignored files -/dataSources.local.xml -/dataSources/ diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index a55e7a1..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/commandlinetools/Laravel_30_07_20__14_22.xml b/.idea/commandlinetools/Laravel_30_07_20__14_22.xml deleted file mode 100644 index e5c4e92..0000000 --- a/.idea/commandlinetools/Laravel_30_07_20__14_22.xml +++ /dev/null @@ -1,3114 +0,0 @@ - - - - - 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 deleted file mode 100644 index f2efc6d..0000000 --- a/.idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.idea/composerJson.xml b/.idea/composerJson.xml deleted file mode 100644 index 1b07430..0000000 --- a/.idea/composerJson.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml deleted file mode 100644 index 1e7ac65..0000000 --- a/.idea/dataSources.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - mysql.8 - true - com.mysql.cj.jdbc.Driver - jdbc:mysql://localhost:3306/mivita - - - \ No newline at end of file diff --git a/.idea/deployment.xml b/.idea/deployment.xml deleted file mode 100644 index cc02949..0000000 --- a/.idea/deployment.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 97626ba..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/jsLinters/jshint.xml b/.idea/jsLinters/jshint.xml deleted file mode 100644 index 9a6f965..0000000 --- a/.idea/jsLinters/jshint.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/laravel-plugin.xml b/.idea/laravel-plugin.xml deleted file mode 100644 index 5aae25d..0000000 --- a/.idea/laravel-plugin.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 28a804d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/mivita.care.iml b/.idea/mivita.care.iml deleted file mode 100644 index 518b499..0000000 --- a/.idea/mivita.care.iml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index dc3e998..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml deleted file mode 100644 index 8f691a4..0000000 --- a/.idea/php-test-framework.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml deleted file mode 100644 index 08699a1..0000000 --- a/.idea/php.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/symfony2.xml b/.idea/symfony2.xml deleted file mode 100644 index e3f946c..0000000 --- a/.idea/symfony2.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index ac59790..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,627 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $PROJECT_DIR$/composer.json - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '; - - })*/ ->addColumn('picture', function (Product $product) { if(count($product->images)){ return ''; @@ -477,200 +676,289 @@ class OrderController extends Controller ->orderColumn('my_commission_net', 'price $1') ->orderColumn('contents_total', 'contents_total $1') ->orderColumn('weight', 'weight $1') - - ->rawColumns(['add_card', 'price_net', 'price_gross', 'price_vk_gross', 'customer_price_net', 'customer_price_gross', 'my_commission_net', 'product', 'quantity', 'picture', 'action']) + ->orderColumn('abo', 'show_on $1') + ->rawColumns(['add_card', 'price_net', 'price_gross', 'price_vk_gross', 'customer_price_net', 'customer_price_gross', 'my_commission_net', 'product', 'quantity', 'picture', 'abo', 'action']) ->make(true); } - - public function performRequest(){ - - if(Request::ajax()) { - $data = Request::all(); - - $is_for = isset($data['shipping_is_for']) ? $data['shipping_is_for'] : 'ot-member'; - $data['for'] = $is_for; - $data['comp_products'] = $this->getCompProducts($is_for); - - if($data['action'] === 'updateCart' && isset($data['product_id'])){ - if($product = Product::find($data['product_id'])){ - $image = ""; - if($product->images->count()){ - $image = $product->images->first()->slug; - } - - //get the card item - if($is_for === 'ot-customer' || $is_for === 'abo-ot-customer'){ - $cartItem = Yard::instance('shopping') - ->add($product->id, $product->getLang('name'), 1, - round($product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), 1), false, false, - ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]); - }else{ - $cartItem = Yard::instance('shopping') - ->add($product->id, $product->getLang('name'), 1, - $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), true, Yard::instance('shopping')->getUserCountry()), false, false, - ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]); - } - if(Yard::instance('shopping')->getUserTaxFree()){ - Yard::setTax($cartItem->rowId, 0); - }else{ - Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry())); - } - if(isset($data['qty']) && $data['qty'] > 0){ - Yard::instance('shopping')->update($cartItem->rowId, $data['qty']); - }else{ - //if 0 get the item by qty:1 and remove it - Yard::instance('shopping')->remove($cartItem->rowId); - } - Yard::instance('shopping')->reCalculateShippingPrice(); - $this->checkCompProduct(Yard::instance('shopping')->getNumComp()); - $html_card = view("user.order.yard_view_form", $data)->render(); - $html_comp = view("user.order.comp_product", $data)->render(); - - return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]); - } - } - if($data['action'] === 'clearCart') { - Yard::instance('shopping')->destroy(); - return response()->json(['response' => true, 'data'=>Yard::instance('shopping')->count(), 'html_card'=>'', 'html_comp'=>'']); - - } - - if($data['action'] === 'updateShippingCountry') { - if(isset($data['shipping_country_id'])){ - if($shipping_country = ShippingCountry::find($data['shipping_country_id'])){ - Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country->id, $is_for); - $this->checkCompProduct(Yard::instance('shopping')->getNumComp()); - } - } - $html_card = view("user.order.yard_view_form", $data)->render(); - $html_comp = view("user.order.comp_product", $data)->render(); - return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]); - - } - if($data['action'] === 'updateCompProduct'){ - // $data['comp_product_id'] - // $data['comp_num'] - //count_comp_products - $this->updateCompProduct($data); - Yard::instance('shopping')->reCalculateShippingPrice(); - $html_card = view("user.order.yard_view_form", $data)->render(); - $html_comp = view("user.order.comp_product", $data)->render(); - - return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]); - - } - return response()->json(['response' => false, 'data'=>$data]); + /** + * Handle AJAX requests for cart operations + */ + public function performRequest() + { + if (!Request::ajax()) { + Log::channel(self::LOG_CHANNEL)->warning("Non-AJAX request to performRequest method"); + return response()->json(['response' => false, 'message' => 'Only AJAX requests are allowed']); } + + $data = Request::all(); + $is_for = isset($data['shipping_is_for']) ? $data['shipping_is_for'] : 'ot-member'; + $data['for'] = $is_for; + $data['comp_products'] = Shop::getCompProducts($is_for); + + Log::channel(self::LOG_CHANNEL)->info("Performing cart action", [ + 'action' => $data['action'] ?? 'unknown', + 'is_for' => $is_for + ]); + + if ($data['action'] === 'updateCart' && isset($data['product_id'])) { + return $this->handleUpdateCart($data, $is_for); + } + + if ($data['action'] === 'clearCart') { + Yard::instance('shopping')->destroy(); + Log::channel(self::LOG_CHANNEL)->info("Cart cleared"); + return response()->json(['response' => true, 'data' => Yard::instance('shopping')->count(), 'html_card' => '', 'html_comp' => '']); + } + + if ($data['action'] === 'updateShippingCountry') { + return $this->handleUpdateShippingCountry($data, $is_for); + } + + if ($data['action'] === 'updateCompProduct') { + return $this->handleUpdateCompProduct($data, $is_for); + } + + Log::channel(self::LOG_CHANNEL)->warning("Unknown action in performRequest", ['action' => $data['action'] ?? 'not set']); + return response()->json(['response' => false, 'data' => $data]); } - private function checkCompProduct($count_comp_products){ + /** + * Handle updating cart items + */ + private function handleUpdateCart($data, $is_for) + { + $product = Product::find($data['product_id']); + if (!$product) { + Log::channel(self::LOG_CHANNEL)->warning("Product not found for cart update", ['product_id' => $data['product_id']]); + return response()->json(['response' => false, 'message' => 'Product not found']); + } + + $image = ""; + if ($product->images->count()) { + $image = $product->images->first()->slug; + } + + // Get the cart item + if ($is_for === 'ot-customer' || $is_for === 'abo-ot-customer') { + $cartItem = Yard::instance('shopping') + ->add($product->id, $product->getLang('name'), 1, + round($product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), 1), false, false, + ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]); + } else { + $cartItem = Yard::instance('shopping') + ->add($product->id, $product->getLang('name'), 1, + $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), true, Yard::instance('shopping')->getUserCountry()), false, false, + ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]); + } + + if (Yard::instance('shopping')->getUserTaxFree()) { + Yard::setTax($cartItem->rowId, 0); + } else { + Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry())); + } + + if (isset($data['qty']) && $data['qty'] > 0) { + Yard::instance('shopping')->update($cartItem->rowId, $data['qty']); + Log::channel(self::LOG_CHANNEL)->info("Cart item updated", [ + 'product_id' => $product->id, + 'product_name' => $product->getLang('name'), + 'qty' => $data['qty'] + ]); + } else { + // If 0 get the item by qty:1 and remove it + Yard::instance('shopping')->remove($cartItem->rowId); + Log::channel(self::LOG_CHANNEL)->info("Cart item removed", [ + 'product_id' => $product->id, + 'product_name' => $product->getLang('name') + ]); + } + + Yard::instance('shopping')->reCalculateShippingPrice(); + $this->checkCompProduct(Yard::instance('shopping')->getNumComp()); + + $html_card = view("user.order.yard_view_form", $data)->render(); + $html_comp = view("user.order.comp_product", $data)->render(); + + return response()->json(['response' => true, 'data' => $data, 'html_card' => $html_card, 'html_comp' => $html_comp]); + } + + /** + * Handle updating shipping country + */ + private function handleUpdateShippingCountry($data, $is_for) + { + if (isset($data['shipping_country_id'])) { + $shipping_country = ShippingCountry::find($data['shipping_country_id']); + if ($shipping_country) { + Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country->id, $is_for); + $this->checkCompProduct(Yard::instance('shopping')->getNumComp()); + + Log::channel(self::LOG_CHANNEL)->info("Shipping country updated", [ + 'shipping_country_id' => $shipping_country->id, + 'shipping_country_name' => $shipping_country->name ?? 'unknown' + ]); + } else { + Log::channel(self::LOG_CHANNEL)->warning("Shipping country not found", [ + 'shipping_country_id' => $data['shipping_country_id'] + ]); + } + } + + $html_card = view("user.order.yard_view_form", $data)->render(); + $html_comp = view("user.order.comp_product", $data)->render(); + + return response()->json(['response' => true, 'data' => $data, 'html_card' => $html_card, 'html_comp' => $html_comp]); + } + + /** + * Handle updating compensation products + */ + private function handleUpdateCompProduct($data, $is_for) + { + $this->updateCompProduct($data); + Yard::instance('shopping')->reCalculateShippingPrice(); + + Log::channel(self::LOG_CHANNEL)->info("Compensation product updated", [ + 'comp_product_id' => $data['comp_product_id'] ?? null, + 'comp_num' => $data['comp_num'] ?? null, + 'count_comp_products' => $data['count_comp_products'] ?? null + ]); + + $html_card = view("user.order.yard_view_form", $data)->render(); + $html_comp = view("user.order.comp_product", $data)->render(); + + return response()->json(['response' => true, 'data' => $data, 'html_card' => $html_card, 'html_comp' => $html_comp]); + } + + /** + * Check and remove compensation products if needed + */ + private function checkCompProduct($count_comp_products) + { foreach (Yard::instance('shopping')->content() as $row) { - //wenn gleich löschen, da neue Versandkosten - if($row->options->comp > $count_comp_products) { + // If equal or greater, delete due to new shipping costs + if ($row->options->comp && $row->options->comp > intval($count_comp_products)) { Yard::instance('shopping')->remove($row->rowId); + Log::channel(self::LOG_CHANNEL)->info("Compensation product removed due to count change", [ + 'product_id' => $row->id, + 'product_name' => $row->name, + 'comp_value' => $row->options->comp, + 'required_comp' => $count_comp_products + ]); } } } - private function updateCompProduct($data){ - //clear old - foreach (Yard::instance('shopping')->content() as $row) { - //wenn kleiner wurde ein produkt entfernt aufgrund der Anzahl - //wenn gleich löschen, da neue Versandkosten - if($row->options->comp === $data['comp_num'] || $row->options->comp > $data['count_comp_products']) { - Yard::instance('shopping')->remove($row->rowId); - } - } + /** + * Update compensation products + */ + private function updateCompProduct($data) + { + // Clear old + foreach (Yard::instance('shopping')->content() as $row) { + // If count_comp_products is smaller, the product was removed due to quantity + // if comp_num equals the comp product, the product was removed due to new shipping costs + //count_comp_products wie viele comp products werden gebraucht + //comp_num welches comp product wird hinzugefügt + if ($row->options->comp && ($row->options->comp == intval($data['comp_num']) || $row->options->comp > intval($data['count_comp_products']))) { + Yard::instance('shopping')->remove($row->rowId); + Log::channel(self::LOG_CHANNEL)->info("Compensation product removed during update", [ + 'product_id' => $row->id, + 'product_name' => $row->name, + 'comp_value' => $row->options->comp, + 'comp_num' => $data['comp_num'], + 'count_comp_products' => $data['count_comp_products'] + ]); + } + } - if(isset($data['comp_product_id'])) { - if ($product = Product::find($data['comp_product_id'])) { - $image = ""; - if ($product->images->count()) { - $image = $product->images->first()->slug; - } - $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, 0, false, false, - ['image' => $image, 'slug' => $product->slug, 'weight' => 0, 'points' => 0, - 'comp' => $data['comp_num'], 'product_id' => $product->id]); - Yard::setTax($cartItem->rowId, 0); + if (isset($data['comp_product_id'])) { + $product = Product::find($data['comp_product_id']); + if ($product) { + $image = ""; + if ($product->images->count()) { + $image = $product->images->first()->slug; } + $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, 0, false, false, [ + 'image' => $image, + 'slug' => $product->slug, + 'weight' => 0, + 'points' => 0, + 'comp' => intval($data['comp_num']), + 'product_id' => $product->id + ] + ); + + Yard::setTax($cartItem->rowId, 0); + + Log::channel(self::LOG_CHANNEL)->info("Compensation product added", [ + 'product_id' => $product->id, + 'product_name' => $product->getLang('name'), + 'comp_num' => $data['comp_num'] + ]); + } else { + Log::channel(self::LOG_CHANNEL)->warning("Compensation product not found", [ + 'comp_product_id' => $data['comp_product_id'] + ]); } + } } - private function getCompProducts($for){ - if(Shop::isCompProducts($for)){ - $show_on = '0'; - switch($for){ - case 'me': - $show_on = '2'; - break; - case 'abo-me': - $show_on = '12'; - break; - case 'ot-member': - $show_on = '3'; - break; - case 'ot-customer': - $show_on = '3'; - break; - case 'abo-ot-member': - $show_on = '13'; - break; - case 'abo-ot-customer': - $show_on = '13'; - break; - } - return Product::whereActive(true)->where('shipping_addon', true)->whereJsonContains('show_on', $show_on)->orderBy('pos', 'DESC')->get(); + /** + * Display custom payment page + */ + public function customPayment($identifier) + { + try { + $data = OrderPaymentService::getCustomPayment($identifier); + Log::channel(self::LOG_CHANNEL)->info("Custom payment page accessed", ['identifier' => $identifier]); + return view('user.order.payment.custom_payment', $data); + } catch (\Exception $e) { + Log::channel(self::LOG_CHANNEL)->error("Error accessing custom payment: " . $e->getMessage(), ['identifier' => $identifier]); + abort(404, 'Custom payment not found'); } - - return null; } - public function customPayment($identifier){ - - $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first(); - if(!$shopping_instance){ - abort(403, __('msg.shopping_instance_not_found')); - } - $shopping_data = $shopping_instance->shopping_data; - $shopping_user = $shopping_data['shopping_user_id'] ? ShoppingUser::find($shopping_data['shopping_user_id']) : null; - if(!$shopping_user){ - abort(403, __('msg.shopping_user_not_found')); - } - - $yard_shopping_items = Shop::getYardShoppingItems(); - - $data = [ - 'shopping_instance' => $shopping_instance, - 'shopping_user' => $shopping_user, - 'yard_shopping_items' => $yard_shopping_items, - 'identifier' => $identifier, - ]; - return view('user.order.custom_payment', $data); - } - - - private static function customPaymentSendMail($user, $identifier, $yard_shopping_items, $data){ + /** + * Send custom payment email + */ + private function customPaymentSendMail($user, $identifier, $yard_shopping_items, $data) + { $bcc = []; $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first(); - if(!$shopping_instance){ - abort(403, __('msg.shopping_instance_not_found')); + + if (!$shopping_instance) { + Log::channel(self::LOG_CHANNEL)->error("Shopping instance not found for email", ['identifier' => $identifier]); + throw new \Exception(__('msg.shopping_instance_not_found')); } + $shopping_user = $data['shopping_user_id'] ? ShoppingUser::find($data['shopping_user_id']) : null; - if(!$shopping_user){ - abort(403, __('msg.shopping_user_not_found')); + + if (!$shopping_user) { + Log::channel(self::LOG_CHANNEL)->error("Shopping user not found for email", ['shopping_user_id' => $data['shopping_user_id']]); + throw new \Exception(__('msg.shopping_user_not_found')); } - $route = route('checkout.checkout_card', ['identifier'=>$identifier]); - + $route = route('checkout.checkout_card', ['identifier' => $identifier]); + $billing_email = $shopping_user->billing_email; - if(!$billing_email){ + if (!$billing_email) { $billing_email = $data['mode'] === 'test' ? config('app.checkout_test_mail') : config('app.checkout_mail'); } + $bcc[] = $data['mode'] === 'test' ? config('app.checkout_test_mail') : config('app.checkout_mail'); $bcc[] = $shopping_user->member ? $shopping_user->member->email : $user->email; - Mail::to($billing_email)->bcc($bcc)->locale(\App::getLocale()) + Log::channel(self::LOG_CHANNEL)->info("Sending custom payment email", [ + 'to' => $billing_email, + 'bcc' => $bcc, + 'identifier' => $identifier + ]); + + Mail::to($billing_email) + ->bcc($bcc) + ->locale(\App::getLocale()) ->send(new MailCustomPaymet($route, $shopping_user, $shopping_instance, $yard_shopping_items, $data['mode'])); } } \ No newline at end of file diff --git a/app/Http/Controllers/User/OrderController_bak.php b/app/Http/Controllers/User/OrderController_bak.php new file mode 100644 index 0000000..3323d65 --- /dev/null +++ b/app/Http/Controllers/User/OrderController_bak.php @@ -0,0 +1,674 @@ +middleware('active.account'); + } + + 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->auth_user_id !== $user->id){ + abort(404); + } + if( $shopping_order->payment_for === 6 || $shopping_order->payment_for === 7){ + return redirect(route('user_shop_order_detail', [$shopping_order->id])); + abort(403, 'Kundenbestellung'); + } + $shopping_order->getLastShoppingPayment(); + + $data = [ + 'shopping_order' => $shopping_order, + 'isAdmin' => false, + ]; + return view('user.order.detail', $data); + } + + public function ordersDatatable(){ + + $user = User::find(\Auth::user()->id); + $query = ShoppingOrder::with('shopping_user', 'shopping_payments')->select('shopping_orders.*')->where('auth_user_id', '=', $user->id)->where('txaction', '!=', NULL); + + return \DataTables::eloquent($query) + ->addColumn('id', function (ShoppingOrder $ShoppingOrder) { + return ''; + }) + ->addColumn('created_at', function (ShoppingOrder $ShoppingOrder) { + return $ShoppingOrder->created_at->format("d.m.Y"); + }) + ->addColumn('txaction', function (ShoppingOrder $ShoppingOrder) { + return Payment::getShoppingOrderBadge($ShoppingOrder); + }) + ->addColumn('total_shipping', function (ShoppingOrder $ShoppingOrder) { + return ''.$ShoppingOrder->getFormattedTotalShipping()." €"; + }) + ->addColumn('payment', function (ShoppingOrder $ShoppingOrder) { + return $ShoppingOrder->getLastShoppingPayment('getPaymentType'); + }) + ->addColumn('shipped', function (ShoppingOrder $ShoppingOrder) { + if($ShoppingOrder->payment_for === 8){ + return ''; + } + return ''.$ShoppingOrder->getShippedType().''; + }) + ->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) { + return Payment::getPaymentForBadge($ShoppingOrder); + + }) + ->addColumn('invoice', function (ShoppingOrder $ShoppingOrder) { + return $ShoppingOrder->isInvoice() ? ' + ' : '-'; + }) + ->addColumn('reference', function (ShoppingOrder $ShoppingOrder) { + return $ShoppingOrder->getLastShoppingPayment('reference'); + }) + ->orderColumn('id', 'id $1') + ->orderColumn('txaction', 'txaction $1') + ->orderColumn('shipped', 'shipped $1') + ->orderColumn('total_shipping', 'total_shipping $1') + ->orderColumn('payment_for', 'payment_for $1') + + ->rawColumns(['id', 'txaction', 'payment_for', 'total_shipping', 'invoice', 'shipped']) + ->make(true); + } + + /* + $for = me, ot-member, ot-customer, abo-ot-member, abo-ot-customer, abo-me + */ + + public function delivery($for, $id=null) + { + $user = User::find(\Auth::user()->id); + $shopping_user = null; + $delivery_id = null; + if(strpos($for, 'ot') !== false){ //ot-member, ot-customer abo-ot-member, abo-ot-customer, + $shopping_user = Shop::checkShoppingUser($id, $user); + $delivery_id = $shopping_user->id; + if(!Shop::checkShoppingCountry($for, $delivery_id) && !\Session()->has('custom-error')){ + $country = Shop::getDeliveryCountry($for, $delivery_id); + \Session()->flash('custom-error', $country.": ".__('validation.custom.shipping_not_found')); + return redirect(route('user_order_my_delivery', [$for, $delivery_id])); + } + if($for === 'abo-ot-customer'){ + //check if user has an Abo + if(AboHelper::hasAboByEmail($shopping_user->billing_email) && !\Session()->has('custom-error')){ + \Session()->flash('custom-error', __('abo.error_email_has_abo', ['email' => $shopping_user->billing_email])); + return redirect(route('user_order_my_delivery', [$for, $delivery_id])); + } + } + } + if(Request::get('action') === 'next'){ + Yard::instance('shopping')->destroy(); + if(strpos(Request::get('switchers-radio-is-for'), 'ot') !== false){ + $delivery_id = $id; + } + return redirect(route('user_order_my_list', [Request::get('switchers-radio-is-for'), $delivery_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); + if($for === 'abo-me' && AboHelper::userHasAbo($user)){ + abort(403, 'User has an Abo. Cannot order.'); + } + $shopping_user = null; + $delivery_id = null; + if(strpos($for, 'ot') !== false){ //ot-member, ot-customer abo-ot-member, abo-ot-customer, + $shopping_user = Shop::checkShoppingUser($id, $user); + $delivery_id = $shopping_user->id; + } + if($for === 'ot-customer' || $for === 'abo-ot-customer'){ + //Liederung an (abo-) ot-customer (Kunden) Zahlung und Rechnung geht an Kunden + UserService::initCustomerYard($shopping_user, $for); + }else{ + //Lieferung an user oder (abo-) ot-member (Kunden) rechnung geht an User + //lieferland und rechnungsland prüfen + $shipping_country_id = Shop::checkShoppingCountry($for, $id); + if(!$shipping_country_id){ + $country = Shop::getDeliveryCountry($for, $id); + \Session()->flash('custom-error', $country.": ".__('validation.custom.shipping_not_found')); + return redirect(route('user_order_my_delivery', [$for, $delivery_id])); + } + UserService::initUserYard($user, $shipping_country_id, $for); + } + $data = [ + 'shopping_user' => $shopping_user, + 'user' => $user, + 'isAdmin' => false, + 'isView' => 'customer', + 'for' => $for, + 'template' => str_replace('abo-', '', $for), + 'delivery_id' => $delivery_id, + 'is_abo' => strpos($for, 'abo') !== false, + 'comp_products' => Shop::getCompProducts($for), + ]; + return view('user.order.list', $data); + } + + public function payment($for, $id=null){ + $data = Request::all(); + $user = User::find(Auth::user()->id); + $rules = array( + 'shipping_salutation' => 'required', + 'shipping_firstname'=>'required', + 'shipping_lastname'=>'required', + 'shipping_address'=>'required', + 'shipping_zipcode'=>'required', + 'shipping_city' => 'required', + 'shipping_state' => 'required', + ); + $validator = Validator::make(Request::all(), $rules); + if ($validator->fails()) { + return back()->withErrors($validator)->withInput(Request::all()); + } + //hier prüfen, ob versand etc richtig berechnet wurde + $this->checkSendYardForPayment($data, $id); + + if(Yard::instance('shopping')->getNumComp() > 0){ + if(!isset($data['switchers-comp-product'])){ + $validator->errors()->add('switchers-comp-product', __('msg.please_select_compensation_product')); + }else{ + if(!is_array($data['switchers-comp-product'])){ + $validator->errors()->add('switchers-comp-product', __('msg.please_select_compensation_product')); + }else{ + if(count($data['switchers-comp-product']) !== Yard::instance('shopping')->getNumComp()){ + $validator->errors()->add('switchers-comp-product', __('mdg.please_select_count_compensation_products', ['count'=>Yard::instance('shopping')->getNumComp()])); + } + } + } + if ($validator->errors()->count()) { + return back()->withErrors($validator)->withInput(Request::all()); + } + } + do { + $identifier = Util::getToken(); + } while( ShoppingInstance::where('identifier', $identifier)->count() ); + $data['is_from'] = 'user_order'; + $data['is_for'] = $for; + $data['is_abo'] = $data['is_abo'] ?? 0; + $data['abo_interval'] = $data['abo_interval'] ?? 0; + $data['shopping_user_id'] = $id; + $data['user_price_infos'] = Yard::instance('shopping')->getUserPriceInfos(); + unset($data['quantity']); + unset($data['_token']); + $data['mode'] = config('app.mode') === 'test' ? 'test' : 'live'; + if($for === 'ot-customer' || $for === 'abo-ot-customer'){ + $shopping_instance = ShoppingInstance::create([ + 'identifier' => $identifier, + 'user_shop_id' => $user->shop->id, + 'payment' => 6, //Berater Shop to Customer Shop + 'subdomain' => $user->shop->getSubdomain(), + 'country_id' => Yard::instance('shopping')->getShippingCountryId(), + 'language' => \App::getLocale(), + 'amount' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), + 'status' => 0, + 'shopping_user_id' => $id, + 'shopping_data' => $data, + 'back' => url()->previous(), + + ]); + Yard::instance('shopping')->store($identifier); + $yard_shopping_items = OrderPaymentService::getRestoredYardShoppingItems($shopping_instance); + + // send Mail to Customer + $this->customPaymentSendMail($user, $identifier, $yard_shopping_items, $data); + UserHistory::create(['user_id' => $user->id, 'action'=>'user_order_customer', 'status'=>1, 'product_id'=>null, 'identifier'=>$identifier, 'is_abo'=>$data['is_abo']]); + + //eine Abschließen bestellseite für den User + Link zum Kunden Shop + Mail an den Kunden / Berater + return redirect(route('user_order_my_custom_payment', ['identifier'=>$identifier])); + }else{ + ShoppingInstance::create([ + 'identifier' => $identifier, + 'user_shop_id' => 1, //is first faker shop for buy intern + 'auth_user_id' => Auth::user()->id, + 'payment' => 2, //Berater Shop + 'subdomain' => url('/'), + 'country_id' => Yard::instance('shopping')->getShippingCountryId(), + 'language' => \App::getLocale(), + 'amount' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), + 'status' => 0, + 'shopping_user_id' => $id, + 'shopping_data' => $data, + 'back' => url()->previous(), + + ]); + Yard::instance('shopping')->store($identifier); + $path = route('checkout.checkout_card', ['identifier'=>$identifier]); + UserHistory::create(['user_id' => $user->id, 'action'=>'user_order_payment', 'status'=>1, 'product_id'=>null, 'identifier'=>$identifier, 'is_abo'=>$data['is_abo']]); + //$path = str_replace('http', 'https', $path); + return redirect()->secure($path); + } + + } + + private function checkSendYardForPayment($data, $id){ + + $user = User::find(\Auth::user()->id); + $shopping_user = null; + if(strpos($data['shipping_is_for'], 'ot') !== false){ + $shopping_user = Shop::checkShoppingUser($id, $user); + } + + $shipping_country_id = Shop::checkShoppingCountry($data['shipping_is_for'], $id); + if(!$shipping_country_id){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'no shipping_country_id found | Yard identifier: '.$identifier, $data); + abort(403, __('msg.shipping_country_was_not_found')); + } + //must be the same shipping country + if($shipping_country_id != Yard::instance('shopping')->getShippingCountryId()){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'shipping_country_id is not the same from Yard | Yard identifier: '.$identifier, $data); + abort(403, __('msg.shipping_country_was_not_correctly')); + } + + if($data['shipping_is_for'] !== 'ot-customer'){ + if(Yard::instance('shopping')->shipping_free){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'Yard can by not shipping_free | Yard identifier: '.$identifier, $data); + abort(403, __('msg.shopping_cart_was_shipping_free')); + } + } + + if($data['shipping_is_for'] === 'ot-customer'){ + if(!$user->shop){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'User has no Shop for an User to Customer order| Yard identifier: '.$identifier, $data); + abort(403, __('msg.shopping_cart_was_not_user_shop')); + } + } + + $shipping_price = Shop::getShippingPriceByShippingCountryId($shipping_country_id, Yard::instance('shopping')->weight()); + dump($shipping_price); + //for other and has weight - check + if(strpos($data['shipping_is_for'], 'ot') !== false && $data['shipping_is_for'] !== 'ot-customer' && Yard::instance('shopping')->weight() > 0){ + if(!Yard::instance('shopping')->getShippingPrice() || Yard::instance('shopping')->getShippingPrice() == 0){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'Yard OT shipping_price is 0 or | Yard identifier: '.$identifier, $data); + abort(403, __('msg.shipping_cost_cannot_be_0')); + } + if(Yard::instance('shopping')->getShippingPrice() != $shipping_price->price){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'Yard OT shipping_price is not the same from shipping_price | Yard identifier: '.$identifier, $data); + abort(403, __('msg.shipping_costs_were_not_calculated_correctly')); + } + } + if(($data['shipping_is_for'] == 'me' || $data['shipping_is_for'] == 'abo-me') && Yard::instance('shopping')->weight() > 0){ + if(!Yard::instance('shopping')->getShippingPrice() || Yard::instance('shopping')->getShippingPrice() == 0){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is 0 or | Yard identifier: '.$identifier, $data); + abort(403, __('msg.shipping_cost_cannot_be_0')); + } + dump(Yard::instance('shopping')->getShippingPrice()); + dump($shipping_price->price_comp); + dump(Yard::instance('shopping')->getNumComp()); + dump($shipping_price->num_comp); + dd($data) ; + + if(Yard::instance('shopping')->getShippingPrice() != $shipping_price->price_comp){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'Yard ME shipping_price is not the same from shipping_price | Yard identifier: '.$identifier, $data); + abort(403, __('msg.shipping_costs_were_not_calculated_correctly')); + } + + if(Yard::instance('shopping')->getNumComp() != $shipping_price->num_comp){ + $identifier = 'error-'.time().mt_rand(1000000, 9999999); + Yard::instance('shopping')->store($identifier); + $data['user_id'] = Auth::user()->id; + $data['shopping_user_id'] = $id; + \App\Services\MyLog::writeLog('payment', 'error', 'Yard num_comp is 0 | Yard identifier: '.$identifier, $data); + abort(403, __('msg.compensation_products_cannot_be_0')); + } + + } + } + + public function datatable(){ + + + if(Request::get('shipping_is_for') === 'me' || Request::get('shipping_is_for') === 'abo-me'){ + $show_on_ids = Request::get('is_abo') ? ['12', '13'] : ['2']; + $query = Product::with('product_buyings') + ->select('products.*')->where('products.active', true) + ->where(function($q) use ($show_on_ids) { + foreach($show_on_ids as $id) { + $q->orWhereJsonContains('show_on', $id); + } + }) + ->orderByRaw("CASE + WHEN JSON_CONTAINS(show_on, ?, '$') THEN 1 + WHEN JSON_CONTAINS(show_on, ?, '$') THEN 2 + ELSE 3 END", + [$show_on_ids[0], isset($show_on_ids[1]) ? $show_on_ids[1] : $show_on_ids[0]]); + }else{ + $show_on_ids = Request::get('is_abo') ? ['12', '13'] : ['3']; + $query = Product::select('products.*') + ->where('active', true) + ->where(function($q) use ($show_on_ids) { + foreach($show_on_ids as $id) { + $q->orWhereJsonContains('show_on', $id); + } + }) + ->orderByRaw("CASE + WHEN JSON_CONTAINS(show_on, ?, '$') THEN 1 + WHEN JSON_CONTAINS(show_on, ?, '$') THEN 2 + ELSE 3 END", + [$show_on_ids[0], isset($show_on_ids[1]) ? $show_on_ids[1] : $show_on_ids[0]]); + } + return \DataTables::eloquent($query) + + ->addColumn('product', function (Product $product) { + $cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id); + $qty = isset($cartItem->qty) ? $cartItem->qty : 0; + $rowId = isset($cartItem->rowId) ? $cartItem->rowId : ''; + return ''.$product->getLang('name').'
+
+
+ + + + + + + +
+
'; + }) + ->addColumn('abo', function (Product $product) { + return AboHelper::getAboTypeBadge(AboHelper::getAboShowOn($product)); + }) + /* + ->addColumn('add_card', function (Product $product) { + return ''; + }) + ->addColumn('quantity', function (Product $product) { + $cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id); + $qty = isset($cartItem->qty) ? $cartItem->qty : 0; + $rowId = isset($cartItem->rowId) ? $cartItem->rowId : ''; + return '
+
+ + + + + + + +
+
'; + + })*/ + ->addColumn('picture', function (Product $product) { + if(count($product->images)){ + return ''; + } + return ""; + }) + ->addColumn('price_net', function (Product $product) { + return ''.$product->getFormattedPriceWith(true, true, Yard::instance('shopping')->getUserCountry()). " €".''.$product->getFormattedPriceCurrencyWith(true, true, Yard::instance('shopping')->getUserCountry()).''; + }) + ->addColumn('price_gross', function (Product $product) { + return ''.$product->getFormattedPriceWith(false, true, Yard::instance('shopping')->getUserCountry()). " €".''.$product->getFormattedPriceCurrencyWith(false, true, Yard::instance('shopping')->getUserCountry()).''; + }) + ->addColumn('price_vk_gross', function (Product $product) { + return ''.$product->getFormattedPriceWith(false, false, Yard::instance('shopping')->getUserCountry()). " €".''.$product->getFormattedPriceCurrencyWith(false, false, Yard::instance('shopping')->getUserCountry()).''; + }) + ->addColumn('customer_price_net', function (Product $product) { + return ''.$product->getFormattedPriceWith(true, false, Yard::instance('shopping')->getUserCountry()). " €".''.$product->getFormattedPriceCurrencyWith(true, false, Yard::instance('shopping')->getUserCountry()).''; + }) + ->addColumn('customer_price_gross', function (Product $product) { + return ''.$product->getFormattedPriceWith(false, false, Yard::instance('shopping')->getUserCountry()). " €".''.$product->getFormattedPriceCurrencyWith(false, false, Yard::instance('shopping')->getUserCountry()).''; + }) + ->addColumn('my_commission_net', function (Product $product) { + return ''.$product->getFormattedPriceWith(true, false, Yard::instance('shopping')->getUserCountry(), true). " €".''.$product->getFormattedPriceCurrencyWith(true, false, Yard::instance('shopping')->getUserCountry(), true).''; + }) + ->addColumn('action', function (Product $product) { + return ''; + }) + ->filterColumn('product', function($query, $keyword) { + if($keyword != ""){ + $query->where('name', 'LIKE', '%'.$keyword.'%'); + } + }) + ->orderColumn('name', 'name $1') + ->orderColumn('product', 'name $1') + ->orderColumn('number', 'number $1') + ->orderColumn('points', 'points $1') + ->orderColumn('price_net', 'price_net $1') + ->orderColumn('price_gross', 'price_gross $1') + ->orderColumn('price_vk_gross', 'price $1') + ->orderColumn('customer_price_net', 'price $1') + ->orderColumn('customer_price_gross', 'price $1') + ->orderColumn('my_commission_net', 'price $1') + ->orderColumn('contents_total', 'contents_total $1') + ->orderColumn('weight', 'weight $1') + ->orderColumn('abo', 'show_on $1') + ->rawColumns(['add_card', 'price_net', 'price_gross', 'price_vk_gross', 'customer_price_net', 'customer_price_gross', 'my_commission_net', 'product', 'quantity', 'picture', 'abo', 'action']) + ->make(true); + } + + + public function performRequest(){ + + if(Request::ajax()) { + $data = Request::all(); + + $is_for = isset($data['shipping_is_for']) ? $data['shipping_is_for'] : 'ot-member'; + $data['for'] = $is_for; + $data['comp_products'] = Shop::getCompProducts($is_for); + + if($data['action'] === 'updateCart' && isset($data['product_id'])){ + if($product = Product::find($data['product_id'])){ + $image = ""; + if($product->images->count()){ + $image = $product->images->first()->slug; + } + + //get the card item + if($is_for === 'ot-customer' || $is_for === 'abo-ot-customer'){ + $cartItem = Yard::instance('shopping') + ->add($product->id, $product->getLang('name'), 1, + round($product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), 1), false, false, + ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]); + }else{ + $cartItem = Yard::instance('shopping') + ->add($product->id, $product->getLang('name'), 1, + $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), true, Yard::instance('shopping')->getUserCountry()), false, false, + ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]); + } + if(Yard::instance('shopping')->getUserTaxFree()){ + Yard::setTax($cartItem->rowId, 0); + }else{ + Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry())); + } + if(isset($data['qty']) && $data['qty'] > 0){ + Yard::instance('shopping')->update($cartItem->rowId, $data['qty']); + }else{ + //if 0 get the item by qty:1 and remove it + Yard::instance('shopping')->remove($cartItem->rowId); + } + Yard::instance('shopping')->reCalculateShippingPrice(); + $this->checkCompProduct(Yard::instance('shopping')->getNumComp()); + $html_card = view("user.order.yard_view_form", $data)->render(); + $html_comp = view("user.order.comp_product", $data)->render(); + + return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]); + } + } + if($data['action'] === 'clearCart') { + Yard::instance('shopping')->destroy(); + return response()->json(['response' => true, 'data'=>Yard::instance('shopping')->count(), 'html_card'=>'', 'html_comp'=>'']); + + } + + if($data['action'] === 'updateShippingCountry') { + if(isset($data['shipping_country_id'])){ + if($shipping_country = ShippingCountry::find($data['shipping_country_id'])){ + Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country->id, $is_for); + $this->checkCompProduct(Yard::instance('shopping')->getNumComp()); + } + } + $html_card = view("user.order.yard_view_form", $data)->render(); + $html_comp = view("user.order.comp_product", $data)->render(); + return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]); + + } + if($data['action'] === 'updateCompProduct'){ + // $data['comp_product_id'] + // $data['comp_num'] + //count_comp_products + $this->updateCompProduct($data); + Yard::instance('shopping')->reCalculateShippingPrice(); + $html_card = view("user.order.yard_view_form", $data)->render(); + $html_comp = view("user.order.comp_product", $data)->render(); + + return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]); + + } + return response()->json(['response' => false, 'data'=>$data]); + } + } + + private function checkCompProduct($count_comp_products){ + foreach (Yard::instance('shopping')->content() as $row) { + //wenn gleich löschen, da neue Versandkosten + if($row->options->comp > $count_comp_products) { + Yard::instance('shopping')->remove($row->rowId); + } + } + } + + private function updateCompProduct($data){ + //clear old + foreach (Yard::instance('shopping')->content() as $row) { + //wenn kleiner wurde ein produkt entfernt aufgrund der Anzahl + //wenn gleich löschen, da neue Versandkosten + if($row->options->comp === $data['comp_num'] || $row->options->comp > $data['count_comp_products']) { + Yard::instance('shopping')->remove($row->rowId); + } + } + + if(isset($data['comp_product_id'])) { + if ($product = Product::find($data['comp_product_id'])) { + $image = ""; + if ($product->images->count()) { + $image = $product->images->first()->slug; + } + $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, 0, false, false, + ['image' => $image, 'slug' => $product->slug, 'weight' => 0, 'points' => 0, + 'comp' => $data['comp_num'], 'product_id' => $product->id]); + Yard::setTax($cartItem->rowId, 0); + } + } + } + + public function customPayment($identifier){ + + $data = OrderPaymentService::getCustomPayment($identifier); + return view('user.order.payment.custom_payment', $data); + } + + + private static function customPaymentSendMail($user, $identifier, $yard_shopping_items, $data){ + $bcc = []; + $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first(); + if(!$shopping_instance){ + abort(403, __('msg.shopping_instance_not_found')); + } + $shopping_user = $data['shopping_user_id'] ? ShoppingUser::find($data['shopping_user_id']) : null; + if(!$shopping_user){ + abort(403, __('msg.shopping_user_not_found')); + } + + $route = route('checkout.checkout_card', ['identifier'=>$identifier]); + + $billing_email = $shopping_user->billing_email; + if(!$billing_email){ + $billing_email = $data['mode'] === 'test' ? config('app.checkout_test_mail') : config('app.checkout_mail'); + } + $bcc[] = $data['mode'] === 'test' ? config('app.checkout_test_mail') : config('app.checkout_mail'); + $bcc[] = $shopping_user->member ? $shopping_user->member->email : $user->email; + + Mail::to($billing_email)->bcc($bcc)->locale(\App::getLocale()) + ->send(new MailCustomPaymet($route, $shopping_user, $shopping_instance, $yard_shopping_items, $data['mode'])); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/User/OrderPaymentController.php b/app/Http/Controllers/User/OrderPaymentController.php new file mode 100644 index 0000000..5934028 --- /dev/null +++ b/app/Http/Controllers/User/OrderPaymentController.php @@ -0,0 +1,97 @@ +middleware('active.account'); + } + + public function index() + { + $data = [ + ]; + return view('user.order.payment.index', $data); + } + + public function detail($identifier) + { + $data = OrderPaymentService::getCustomPayment($identifier); + $data['backlink'] = route('user_order_payment_links'); + return view('user.order.payment.custom_payment', $data); + } + + public function delete($identifier){ + OrderPaymentService::deleteInstance($identifier); + return redirect(route('user_order_payment_links')); + } + + public function datatable(){ + + $user = User::find(\Auth::user()->id); + $user_shop_id = $user->shop ? $user->shop->id : null; + $query = ShoppingInstance::select('*') + ->where('user_shop_id', '=', $user_shop_id) + ->where('payment', 6); + + return \DataTables::eloquent($query) + ->addColumn('id', function (ShoppingInstance $shoppingInstance) { + return ''; + }) + ->addColumn('created_at', function (ShoppingInstance $shoppingInstance) { + return $shoppingInstance->created_at->format("d.m.Y"); + }) + ->addColumn('status', function (ShoppingInstance $shoppingInstance) { + return OrderPaymentService::getStatusBadge($shoppingInstance); + }) + ->addColumn('payment_method', function (ShoppingInstance $shoppingInstance) { + return $shoppingInstance->payment_method ? $shoppingInstance->payment_method->name : '-'; + }) + ->addColumn('total', function (ShoppingInstance $shoppingInstance) { + if($shoppingInstance->amount > 0){ + return ''.$shoppingInstance->getAmountFormatted()." €"; + }else{ + return '-'; + } + }) + ->addColumn('type', function (ShoppingInstance $shoppingInstance) { + return OrderPaymentService::getTypeBadge($shoppingInstance); + }) + ->addColumn('billing_firstname', function (ShoppingInstance $shoppingInstance) { + return $shoppingInstance->shopping_data['billing_firstname'] ?? '-'; + }) + ->addColumn('billing_lastname', function (ShoppingInstance $shoppingInstance) { + return $shoppingInstance->shopping_data['billing_lastname'] ?? '-'; + }) + ->addColumn('billing_email', function (ShoppingInstance $shoppingInstance) { + return $shoppingInstance->shopping_data['billing_email'] ?? '-'; + }) + ->addColumn('delete', function (ShoppingInstance $shoppingInstance) { + return ''; + }) + + ->orderColumn('id', 'identifier $1') + ->orderColumn('created_at', 'created_at $1') + ->orderColumn('status', 'status $1') + ->orderColumn('total', 'total $1') + ->orderColumn('type', 'type $1') + ->orderColumn('billing_firstname', 'billing_firstname $1') + ->orderColumn('billing_lastname', 'billing_lastname $1') + ->orderColumn('billing_email', 'billing_email $1') + ->rawColumns(['id', 'status', 'type', 'total', 'invoice', 'delete']) + ->make(true); + } + + +} \ No newline at end of file diff --git a/app/Http/Controllers/User/PaymentController.php b/app/Http/Controllers/User/PaymentController.php index 47050b8..dd340f3 100644 --- a/app/Http/Controllers/User/PaymentController.php +++ b/app/Http/Controllers/User/PaymentController.php @@ -50,10 +50,9 @@ class PaymentController extends Controller if(Credit::isCredit($UserCredit)){ $ret .= ' '; $ret .= '
'; - if(Auth::user()->isVIP()){ - $ret .= ' '; - $ret .= ' '; - } + $ret .= ' '; + $ret .= ' '; + }else{ $ret = "-"; } diff --git a/app/Http/Controllers/User/ShopApiController.php b/app/Http/Controllers/User/ShopApiController.php index 0fdc918..8ff418f 100644 --- a/app/Http/Controllers/User/ShopApiController.php +++ b/app/Http/Controllers/User/ShopApiController.php @@ -146,7 +146,7 @@ class ShopApiController extends Controller return $ShoppingOrder->user_shop ? ''.$ShoppingOrder->user_shop->getSubdomain(false).'' : ''; }) ->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) { - return ''.$ShoppingOrder->getPaymentForType().''; + return Payment::getPaymentForBadge($ShoppingOrder); }) ->addColumn('shipped', function (ShoppingOrder $ShoppingOrder) { return ''.$ShoppingOrder->getShippedType().' diff --git a/app/Http/Controllers/User/ShopSalesController.php b/app/Http/Controllers/User/ShopSalesController.php index 9078162..9003cf6 100755 --- a/app/Http/Controllers/User/ShopSalesController.php +++ b/app/Http/Controllers/User/ShopSalesController.php @@ -28,7 +28,7 @@ class ShopSalesController extends Controller $user = User::find(\Auth::user()->id); $shopping_order = ShoppingOrder::findOrFail($id); if($shopping_order->member_id !== $user->id){ - abort(404); + abort(403, 'Unauthorized action. User ID does not match.'); } if( $shopping_order->payment_for !== 6 && $shopping_order->payment_for !== 7){ return redirect(route('user_order_detail', [$shopping_order->id])); @@ -67,7 +67,7 @@ class ShopSalesController extends Controller return $ShoppingOrder->user_shop ? ''.$ShoppingOrder->user_shop->getSubdomain(false).'' : ''; }) ->addColumn('payment_for', function (ShoppingOrder $ShoppingOrder) { - return ''.$ShoppingOrder->getPaymentForType().''; + return Payment::getPaymentForBadge($ShoppingOrder); }) ->addColumn('shipped', function (ShoppingOrder $ShoppingOrder) { return ''.$ShoppingOrder->getShippedType().' diff --git a/app/Http/Controllers/User/TeamController.php b/app/Http/Controllers/User/TeamController.php index dedb1d2..7978739 100755 --- a/app/Http/Controllers/User/TeamController.php +++ b/app/Http/Controllers/User/TeamController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers\User; + use Auth; use Request; use App\User; @@ -26,11 +27,11 @@ class TeamController extends Controller public function members() { $user = User::find(\Auth::user()->id); - if($user->isActiveShop() && $user->shop){ - $shop_register_link = $user->shop->getSubdomain(false)."/reg"; - }else{ - $member_id = 'm'.($user->id + config('mivita.add_number_id')); - $shop_register_link = config('app.protocol').config('app.domain').config('app.tld_care').'/reg/'.$member_id; + if ($user->isActiveShop() && $user->shop) { + $shop_register_link = $user->shop->getSubdomain(false) . "/reg"; + } else { + $member_id = 'm' . ($user->id + config('mivita.add_number_id')); + $shop_register_link = config('app.protocol') . config('app.domain') . config('app.tld_care') . '/reg/' . $member_id; } $data = [ 'shop_register_link' => $shop_register_link @@ -71,7 +72,7 @@ class TeamController extends Controller { $user = User::find(\Auth::user()->id); - if(!$user->isVIP()){ + if (!$user->isVIP()) { abort(404); } $ExportBot = new ExportBot('member'); @@ -82,14 +83,15 @@ class TeamController extends Controller return view('user.team.export', $data); } - public function userTeamExport(){ + public function userTeamExport() + { - if(Request::get('action') === "export"){ + if (Request::get('action') === "export") { $user = User::find(\Auth::user()->id); $ExportBot = new ExportBot('member'); $ExportBot->initStructureUser($user, 'list'); //tree or list $columns = []; - $filename = __('team.filename_export').date('Y-m-d-H-i-s'); + $filename = __('team.filename_export') . date('Y-m-d-H-i-s'); $headers = array( __('tables.line'), __('tables.level'), @@ -104,12 +106,13 @@ class TeamController extends Controller __('tables.phone'), __('tables.mobil'), __('tables.birthday'), + __('tables.partner_since'), __('tables.account'), __('tables.account_to'), __('tables.sponsor'), ); - if(isset($ExportBot->user_list->childs)){ - foreach ($ExportBot->user_list->childs as $child){ + if (isset($ExportBot->user_list->childs)) { + foreach ($ExportBot->user_list->childs as $child) { $columns[] = array( __('tables.line') => $child->line, __('tables.level') => $child->level_name, @@ -124,42 +127,44 @@ class TeamController extends Controller __('tables.phone') => $child->phone, __('tables.mobil') => $child->mobil, __('tables.birthday') => $child->birthday, + __('tables.partner_since') => $child->partner_since, __('tables.account') => ($child->active_account == 1 ? __('yes') : __('no')), __('tables.account_to') => $child->payment_account_date, __('tables.sponsor') => $child->sponsor_name, ); } } - return Excel::download(new UserTeamExport($columns, $headers), $filename.'.xls'); + return Excel::download(new UserTeamExport($columns, $headers), $filename . '.xls'); } } - private function setFilterVars(){ + private function setFilterVars() + { - if(!session('team_user_filter_month')){ + if (!session('team_user_filter_month')) { session(['team_user_filter_month' => intval(date('m'))]); } - if(!session('team_user_filter_year')){ + if (!session('team_user_filter_year')) { session(['team_user_filter_year' => intval(date('Y'))]); } - if(!session('team_user_points_filter_month')){ + if (!session('team_user_points_filter_month')) { session(['team_user_points_filter_month' => intval(date('m'))]); } - if(!session('team_user_points_filter_year')){ + if (!session('team_user_points_filter_year')) { session(['team_user_points_filter_year' => intval(date('Y'))]); } - - if(Request::get('team_user_filter_month')){ + + if (Request::get('team_user_filter_month')) { session(['team_user_filter_month' => Request::get('team_user_filter_month')]); } - if(Request::get('team_user_filter_year')){ + if (Request::get('team_user_filter_year')) { session(['team_user_filter_year' => Request::get('team_user_filter_year')]); } - if(Request::get('team_user_points_filter_month')){ + if (Request::get('team_user_points_filter_month')) { session(['team_user_points_filter_month' => Request::get('team_user_points_filter_month')]); } - if(Request::get('team_user_points_filter_year')){ + if (Request::get('team_user_points_filter_year')) { session(['team_user_points_filter_year' => Request::get('team_user_points_filter_year')]); } } @@ -170,46 +175,47 @@ class TeamController extends Controller $user_id = \Auth::user()->id; $query = UserSalesVolume::with('user', 'user.account')->with('shopping_order')->select('user_sales_volumes.*') - ->where('user_sales_volumes.user_id', '=', $user_id) - ->where('user_sales_volumes.month', '=', Request::get('team_user_points_filter_month')) - ->where('user_sales_volumes.year', '=', Request::get('team_user_points_filter_year')); + ->where('user_sales_volumes.user_id', '=', $user_id) + ->where('user_sales_volumes.month', '=', Request::get('team_user_points_filter_month')) + ->where('user_sales_volumes.year', '=', Request::get('team_user_points_filter_year')); return $query; } - public function datatablePoints(){ + public function datatablePoints() + { $query = $this->initSearchPoints(); return \DataTables::eloquent($query) - + ->addColumn('order', function (UserSalesVolume $UserSalesVolume) { - if($UserSalesVolume->shopping_order){ - if($UserSalesVolume->status === 1 && $UserSalesVolume->shopping_order->auth_user_id === $UserSalesVolume->user_id){ - return ''.$UserSalesVolume->shopping_order->id.''; + if ($UserSalesVolume->shopping_order) { + if ($UserSalesVolume->status === 1 && $UserSalesVolume->shopping_order->auth_user_id === $UserSalesVolume->user_id) { + return '' . $UserSalesVolume->shopping_order->id . ''; } - if(($UserSalesVolume->status === 2 || $UserSalesVolume->status === 3) && $UserSalesVolume->shopping_order->member_id === $UserSalesVolume->user_id){ - return ''.$UserSalesVolume->shopping_order->id.''; + if (($UserSalesVolume->status === 2 || $UserSalesVolume->status === 3) && $UserSalesVolume->shopping_order->member_id === $UserSalesVolume->user_id) { + return '' . $UserSalesVolume->shopping_order->id . ''; } } return ''; }) ->addColumn('total_net', function (UserSalesVolume $UserSalesVolume) { - return formatNumber($UserSalesVolume->total_net).' €'; + return formatNumber($UserSalesVolume->total_net) . ' €'; }) ->addColumn('status_turnover', function (UserSalesVolume $UserSalesVolume) { - return ''.$UserSalesVolume->getStatusTurnoverType().''; + return '' . $UserSalesVolume->getStatusTurnoverType() . ''; }) ->addColumn('status', function (UserSalesVolume $UserSalesVolume) { - return ''.$UserSalesVolume->getStatusType().''; + return '' . $UserSalesVolume->getStatusType() . ''; }) ->addColumn('message', function (UserSalesVolume $UserSalesVolume) { - return ''.$UserSalesVolume->message.''; + return '' . $UserSalesVolume->message . ''; }) ->addColumn('info', function (UserSalesVolume $UserSalesVolume) { - return ''.$UserSalesVolume->info.''; + return '' . $UserSalesVolume->info . ''; }) - + ->orderColumn('id', 'id $1') ->orderColumn('order', 'order $1') ->orderColumn('status', 'status $1') @@ -220,7 +226,8 @@ class TeamController extends Controller ->make(true); } - public function load(){ + public function load() + { $user = User::find(\Auth::user()->id); $userSalesVolume = $user->getUserSalesVolume(intval(session('team_user_points_filter_month')), intval(session('team_user_points_filter_year')), 'first'); @@ -229,9 +236,6 @@ class TeamController extends Controller 'userSalesVolume' => $userSalesVolume, ]; $html = view('user.team._points_sum', $data)->render(); - return response()->json(['response' => true, 'data'=>$data, 'html'=>$html]); - + return response()->json(['response' => true, 'data' => $data, 'html' => $html]); } - - -} \ No newline at end of file +} diff --git a/app/Http/Controllers/UserDataController.php b/app/Http/Controllers/UserDataController.php index 1a7cf78..2936081 100755 --- a/app/Http/Controllers/UserDataController.php +++ b/app/Http/Controllers/UserDataController.php @@ -64,6 +64,9 @@ class UserDataController extends Controller 'city' => 'required', 'email' => 'required|string|email|max:255|exists:users,email', 'email-confirm' => 'required|same:email', + 'bank_owner' => 'required', + 'bank_iban' => 'required', + 'bank_bic' => 'required', ); if(!Request::get('same_as_billing')){ $rules = array_merge($rules, [ diff --git a/app/Http/Controllers/Web/CardController.php b/app/Http/Controllers/Web/CardController.php index fb55deb..0dde4f2 100755 --- a/app/Http/Controllers/Web/CardController.php +++ b/app/Http/Controllers/Web/CardController.php @@ -36,7 +36,7 @@ class CardController extends Controller $cartItem = Yard::instance('shopping') ->add($product->id, $product->getLang('name'), $quantity, $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), false, false, - ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping]); + ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping, 'show_on' => $product->show_on]); if(Yard::instance('shopping')->getUserTaxFree()){ Yard::setTax($cartItem->rowId, 0); }else{ @@ -65,7 +65,7 @@ class CardController extends Controller $cartItem = Yard::instance('shopping') ->add($product->id, $product->getLang('name'), $quantity, $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), false, false, - ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping]); + ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'no_free_shipping' => $product->no_free_shipping, 'show_on' => $product->show_on]); if(Yard::instance('shopping')->getUserTaxFree()){ Yard::setTax($cartItem->rowId, 0); }else{ diff --git a/app/Http/Controllers/Web/CheckoutController.php b/app/Http/Controllers/Web/CheckoutController.php index c2fbc92..3d7f0ea 100755 --- a/app/Http/Controllers/Web/CheckoutController.php +++ b/app/Http/Controllers/Web/CheckoutController.php @@ -2,114 +2,92 @@ namespace App\Http\Controllers\Web; - -use Yard; -use Request; -use App\User; -use Validator; +use App\Http\Controllers\Controller; +use App\Http\Controllers\Pay\PayoneController; +use App\Models\PaymentTransaction; +use App\Models\ShoppingOrder; +use App\Models\ShoppingPayment; +use App\Models\ShoppingUser; +use App\Repositories\CheckoutRepository; +use App\Services\AboHelper; +use App\Services\CustomerPriority; +use App\Services\OrderPaymentService; +use App\Services\Payment; use App\Services\Shop; use App\Services\Util; -use App\Models\Homeparty; -use App\Services\Payment; -use App\Services\AboHelper; -use App\Models\ShoppingUser; -use App\Models\PaymentMethod; -use App\Models\ShoppingOrder; -use App\Models\ShippingCountry; -use App\Models\ShoppingPayment; -use App\Models\ShoppingOrderItem; -use App\Models\PaymentTransaction; -use App\Services\CustomerPriority; -use Illuminate\Support\Collection; -use App\Http\Controllers\Controller; -use App\Models\ShoppingCollectOrder; -use Illuminate\Session\SessionManager; -use App\Http\Controllers\Pay\PayoneController; +use App\User; +use Illuminate\Support\Facades\Session; +use Request; +use Validator; +use Yard; class CheckoutController extends Controller { - private $session; - private $instance; + private $checkoutRepo; + /** * Create a new controller instance. * * @return void */ - public function __construct(SessionManager $session) + public function __construct(CheckoutRepository $checkoutRepository) { - $this->session = $session; - $this->instance = sprintf('%s.%s', 'cart', 'payments'); + $this->checkoutRepo = $checkoutRepository; } + /** + * Zeigt die Checkout-Seite an + * + * @return \Illuminate\View\View + */ + public function checkout() + { + $shopping_data = Yard::instance('shopping')->getYardExtra('shopping_data'); + $is_from = $shopping_data['is_from'] ?? 'shopping'; + $is_for = $shopping_data['is_for'] ?? false; + $is_abo = isset($shopping_data['is_abo']) ? (bool) $shopping_data['is_abo'] : false; + $abo_interval = $shopping_data['abo_interval'] ?? 0; + $homeparty_id = $shopping_data['homeparty_id'] ?? null; + $shopping_user = null; - public function checkout(){ - - // dump(Request::all()); -// $user_shop = Util::getUserShop(); - $shopping_data = Yard::instance('shopping')->getYardExtra('shopping_data'); - - $is_from = isset($shopping_data['is_from']) ? $shopping_data['is_from'] : 'shopping'; - $is_for = isset($shopping_data['is_for']) ? $shopping_data['is_for'] : false; - $is_abo = isset($shopping_data['is_abo']) ? (bool) $shopping_data['is_abo'] : false; - $abo_interval = isset($shopping_data['abo_interval']) ? $shopping_data['abo_interval'] : 0; - if($is_for === 'ot-customer' || $is_for === 'abo-ot-customer'){ + if ($is_for === 'ot-customer' || $is_for === 'abo-ot-customer') { $is_from = 'shopping'; - } - $homeparty_id = isset($shopping_data['homeparty_id']) ? $shopping_data['homeparty_id'] : null; - $shopping_user = null; - - if(\Session::has('new_session')){ - $this->destroy(); - \Session::forget('new_session'); - } - - if(!$this->getPayments('shopping_user_id')){ - if($shopping_data && $is_from !== 'shopping'){ - //can wizard membership user_order - //$shopping_user_id = isset($shopping_data['shopping_user_id']) ? $shopping_data['shopping_user_id'] : false; - $shopping_user = $this->shoppingUserAuthData($is_from, $is_for, $shopping_data); - $shopping_user->save(); - $this->putPayments('shopping_user_id', $shopping_user->id); - }elseif($is_from === 'shopping' && ($is_for !== 'ot-customer' || $is_for !== 'abo-ot-customer')){ - $shopping_user = new ShoppingUser(); - $shopping_user->is_for = $is_for; - $shopping_user->is_from = $is_from; - $shopping_user->homeparty_id = $homeparty_id; - $shopping_user->mode = 'prev'; - $shopping_user->language = \App::getLocale(); - }elseif($is_from === 'shopping' && ($is_for === 'ot-customer' || $is_for === 'abo-ot-customer')){ - $shopping_user = $this->makeCustomerShoppingUser($shopping_data); - $shopping_user->is_for = $is_for; - $shopping_user->is_from = $is_from; - $shopping_user->mode = 'prev'; - $shopping_user->language = \App::getLocale(); - } - }else{ - $shopping_user = ShoppingUser::findOrFail($this->getPayments('shopping_user_id')); - $shopping_user->billing_state = Shop::getCountryShippingCountryId($shopping_user->billing_country_id); - $shopping_user->shipping_state = Shop::getCountryShippingCountryId($shopping_user->shipping_country_id); - $shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; //reinvert - } - if($shopping_user->same_as_billing === NULL){ - $shopping_user->same_as_billing = false; } - if(!$shopping_user->billing_country){ - $shopping_user->billing_country = Yard::instance('shopping')->getUserCountry(); - } - if(!$shopping_user->shipping_country){ - $shopping_user->shipping_country = Yard::instance('shopping')->getUserCountry(); + Util::setInstanceStatus(1, true); // link_check + if ($is_abo) { + $instance_status = Util::getInstanceStatus(); + if ($instance_status === 'link_paid') { + return $this->redirectToIsFinal($instance_status); + } } - if(old('selected_country') && old('selected_country') === 'change'){ - \Session::forget('_old_input.selected_country'); - $shopping_user->billing_state = old('billing_state'); - $shopping_user->shipping_state = old('shipping_state'); - }else{ - $shopping_user->billing_state = Yard::instance('shopping')->getShippingCountryId(); - $shopping_user->shipping_state = Yard::instance('shopping')->getShippingCountryId(); + if (Session::has('new_session')) { + $this->checkoutRepo->sessionDestroy(); + Session::forget('new_session'); } - $payment_methods = $this->getPaymentsMethods($is_from, $is_abo); + + if (!$this->checkoutRepo->getSessionPayments('shopping_user_id')) { + if ($shopping_data && $is_from !== 'shopping') { + $shopping_user = $this->checkoutRepo->shoppingUserAuthData($is_from, $is_for, $shopping_data); + $shopping_user->save(); + $this->checkoutRepo->putSessionPayments('shopping_user_id', $shopping_user->id); + } elseif ($is_from === 'shopping' && ($is_for !== 'ot-customer' && $is_for !== 'abo-ot-customer')) { + $shopping_user = $this->initializeShoppingUser($is_for, $is_from, $homeparty_id); + } elseif ($is_from === 'shopping' && ($is_for === 'ot-customer' || $is_for === 'abo-ot-customer')) { + $shopping_user = $this->checkoutRepo->makeCustomerShoppingUser($shopping_data); + $shopping_user->is_for = $is_for; + $shopping_user->is_from = $is_from; + $shopping_user->mode = 'prev'; + $shopping_user->language = \App::getLocale(); + } + } else { + $shopping_user = $this->getExistingShoppingUser(); + } + + $this->prepareShoppingUserData($shopping_user); + $payment_methods = $this->checkoutRepo->getPaymentsMethods($is_from, $is_abo); + $data = [ 'is_from' => $is_from, 'is_for' => $is_for, @@ -122,332 +100,394 @@ class CheckoutController extends Controller 'payment_methods' => $payment_methods['default'], 'payment_methods_active' => $payment_methods['active'], 'payment_data' => $payment_methods['data'], + 'instance_status' => $instance_status ?? false, ]; + return view('web.templates.checkout', $data); } - private function getPaymentsMethods($is_from, $is_abo = false){ - $payment_methods = []; - if($is_from !== 'shopping' && Util::getAuthUser()){ - $user = Util::getAuthUser(); - $payment_methods['default'] = $user->payment_methods; - $payment_methods['data'] = $user->account->payment_data; - }else{ - $payment_methods['default'] = PaymentMethod::getDefaultAsArray($is_abo)->toArray(); - $payment_methods['data'] = false; - } - if($is_abo){ - $payment_methods['active'] = \App\Models\PaymentMethod::where('active', true)->where('is_abo', true)->get()->pluck( 'id', 'short')->toArray(); - }else{ - $payment_methods['active'] = \App\Models\PaymentMethod::where('active', true)->get()->pluck( 'id', 'short')->toArray(); - } - return $payment_methods; - } - - private function isPaymentsMethodsActive($payment_method, $is_from, $is_abo = false){ - $payment_names = ['wlt#PPE' => 'PP', 'cc' => 'CC', 'sb#PNT' => 'SB', 'elv' => 'SEPA', 'vor' => 'VOR', 'fnc#MIV' => 'FNC']; - $payment_methods = $this->getPaymentsMethods($is_from, $is_abo); - if(isset($payment_names[$payment_method])){ - $payment_with = $payment_names[$payment_method]; - if(array_key_exists($payment_with, $payment_methods['active']) && in_array($payment_methods['active'][$payment_with], $payment_methods['default'])){ - return true; - } - } - abort(404); - } - - private function shoppingUserAuthData($is_from, $is_for, $data = []){ - - $user = Util::getAuthUser(); + /** + * Initialisiert einen neuen ShoppingUser + * + * @param string $is_for + * @param string $is_from + * @param int|null $homeparty_id + * @return ShoppingUser + */ + private function initializeShoppingUser($is_for, $is_from, $homeparty_id = null) + { $shopping_user = new ShoppingUser(); - $shopping_user->auth_user_id = $user->id; + $shopping_user->is_for = $is_for; + $shopping_user->is_from = $is_from; + $shopping_user->homeparty_id = $homeparty_id; $shopping_user->mode = 'prev'; $shopping_user->language = \App::getLocale(); - $shopping_user->billing_salutation = $user->account->salutation; - $shopping_user->billing_company = $user->account->company; - $shopping_user->billing_firstname = $user->account->first_name; - $shopping_user->billing_lastname = $user->account->last_name; - $shopping_user->billing_address = $user->account->address; - $shopping_user->billing_address_2 = $user->account->address_2; - $shopping_user->billing_zipcode = $user->account->zipcode; - $shopping_user->billing_city = $user->account->city; - $shopping_user->billing_country_id = $user->account->country_id; - $shopping_user->billing_phone = $user->account->phone; - $shopping_user->billing_email = $user->email; - $shopping_user->faker_mail = false; - $shopping_user->shipping_email = $user->email; - - $shopping_user->accepted_data_checkbox = 1; - $shopping_user->is_for = $is_for; - $shopping_user->is_from = $is_from; - $shopping_user->homeparty_id = isset($data['homeparty_id']) ? $data['homeparty_id'] : null; - $shopping_user->shopping_collect_order_id = isset($data['shopping_collect_order_id']) ? $data['shopping_collect_order_id'] : null; - - //Lieferadresse - if($is_from === 'user_order'){ - if(isset($data['shopping_user_id']) && strpos($data['is_for'], 'ot') !== false){ - $s_user = ShoppingUser::findOrFail($data['shopping_user_id']); - /* $shopping_user->billing_salutation = $s_user->billing_salutation; - $shopping_user->billing_company = $s_user->billing_company; - $shopping_user->billing_firstname = $s_user->billing_firstname; - $shopping_user->billing_lastname = $s_user->billing_lastname; - $shopping_user->billing_address = $s_user->billing_address; - $shopping_user->billing_address_2 = $s_user->billing_address_2; - $shopping_user->billing_zipcode = $s_user->billing_zipcode; - $shopping_user->billing_city = $s_user->billing_city; - $shopping_user->billing_country_id = $s_user->billing_country_id; - $shopping_user->billing_phone = $s_user->billing_phone; - $shopping_user->billing_email = $s_user->billing_email; - ;*/ - $shopping_user->faker_mail = $s_user->faker_mail; - if(!$s_user->faker_mail){ - $shopping_user->shipping_email = $s_user->billing_email; - } - $shopping_user->shopping_user_id = $data['shopping_user_id']; - $shopping_user->member_id = $s_user->member_id; - } - $shopping_user->same_as_billing = true; - $shopping_user->shipping_salutation = isset($data['shipping_salutation']) ? $data['shipping_salutation'] : ''; - $shopping_user->shipping_company = isset($data['shipping_company']) ? $data['shipping_company'] : ''; - $shopping_user->shipping_firstname = isset($data['shipping_firstname']) ? $data['shipping_firstname'] : ''; - $shopping_user->shipping_lastname = isset($data['shipping_lastname']) ? $data['shipping_lastname'] : ''; - $shopping_user->shipping_address = isset($data['shipping_address']) ? $data['shipping_address'] : ''; - $shopping_user->shipping_address_2 = isset($data['shipping_address_2']) ? $data['shipping_address_2'] : ''; - $shopping_user->shipping_zipcode = isset($data['shipping_zipcode']) ? $data['shipping_zipcode'] : ''; - $shopping_user->shipping_city = isset($data['shipping_city']) ? $data['shipping_city'] : ''; - $shopping_user->shipping_country_id = Yard::instance('shopping')->getShippingCountryCountryId(); - $shopping_user->shipping_phone = isset($data['shipping_phone']) ? $data['shipping_phone'] : ''; - - }else{ - $shopping_user->same_as_billing = $user->account->same_as_billing ? false : true; - $shopping_user->shipping_salutation = $user->account->shipping_salutation; - $shopping_user->shipping_company = $user->account->shipping_company; - $shopping_user->shipping_firstname = $user->account->shipping_firstname; - $shopping_user->shipping_lastname = $user->account->shipping_lastname; - $shopping_user->shipping_address = $user->account->shipping_address; - $shopping_user->shipping_address_2 = $user->account->shipping_address_2; - $shopping_user->shipping_zipcode = $user->account->shipping_zipcode; - $shopping_user->shipping_city = $user->account->shipping_city; - $shopping_user->shipping_country_id = $user->account->shipping_country_id; - $shopping_user->shipping_phone = $user->account->shipping_phone; - } - return $shopping_user; } - public function checkoutFinal(){ + /** + * Holt den existierenden ShoppingUser und bereitet ihn vor + * + * @return ShoppingUser + */ + private function getExistingShoppingUser() + { + $shopping_user = ShoppingUser::findOrFail($this->checkoutRepo->getSessionPayments('shopping_user_id')); + $shopping_user->billing_state = Shop::getCountryShippingCountryId($shopping_user->billing_country_id); + $shopping_user->shipping_state = Shop::getCountryShippingCountryId($shopping_user->shipping_country_id); + $shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; // reinvert + + return $shopping_user; + } + /** + * Bereitet die ShoppingUser-Daten vor + * + * @param ShoppingUser $shopping_user + * @return void + */ + private function prepareShoppingUserData(ShoppingUser $shopping_user) + { + if ($shopping_user->same_as_billing === NULL) { + $shopping_user->same_as_billing = false; + } + + if (!$shopping_user->billing_country_id) { + $shopping_user->billing_country_id = Yard::instance('shopping')->getUserCountryId(); + // Die Zeile unten entfernen, da die Relation automatisch geladen wird + // $shopping_user->billing_country = Yard::instance('shopping')->getUserCountry(); + } + + if (!$shopping_user->shipping_country_id) { + $shopping_user->shipping_country_id = Yard::instance('shopping')->getUserCountryId(); + // Die Zeile unten entfernen, da die Relation automatisch geladen wird + // $shopping_user->shipping_country = Yard::instance('shopping')->getUserCountry(); + } + if (old('selected_country') && old('selected_country') === 'change') { + Session::forget('_old_input.selected_country'); + $shopping_user->billing_state = old('billing_state'); + $shopping_user->shipping_state = old('shipping_state'); + } else { + $shopping_user->billing_state = Yard::instance('shopping')->getShippingCountryId(); + $shopping_user->shipping_state = Yard::instance('shopping')->getShippingCountryId(); + } + } + + /** + * Verarbeitet den Checkout-Prozess + * + * @return \Illuminate\Http\RedirectResponse + */ + public function checkoutFinal() + { $data = Request::all(); - if(isset($data['payment_method'])){ - $this->isPaymentsMethodsActive($data['payment_method'], $data['is_from'], $data['is_abo']); + + if (isset($data['payment_method'])) { + $this->checkoutRepo->isPaymentsMethodsActive($data['payment_method'], $data['is_from'], $data['is_abo']); } - - //change selected Country - if(isset($data['selected_country']) && $data['selected_country'] === 'change'){ - if(!Request::get('same_as_billing')){ - Yard::instance('shopping')->setShippingCountryWithPrice($data['billing_state'], $data['is_for']); - }else{ - Yard::instance('shopping')->setShippingCountryWithPrice($data['shipping_state'], $data['is_for']); - } - return back()->withInput(Request::all()); + + Util::setInstanceStatus(2, true); // link_check + + // Länderwechsel verarbeiten + if (isset($data['selected_country']) && $data['selected_country'] === 'change') { + return $this->handleCountryChange($data); } - $rules = array( - 'billing_salutation' => 'required', - 'billing_firstname'=>'required', - 'billing_lastname'=>'required', - 'billing_email'=>'required|email', - 'billing_address'=>'required', - 'billing_zipcode'=>'required', - 'billing_city' => 'required', - 'accepted_data_checkbox' => 'accepted', - ); - - if(Request::get('same_as_billing')){ - $rules = array_merge($rules, [ - 'shipping_firstname'=>'required', - 'shipping_lastname'=>'required', - 'shipping_address'=>'required', - 'shipping_zipcode'=>'required', - 'shipping_city' => 'required', - 'shipping_salutation' => 'required' - - ]); - } - $validator = Validator::make(Request::all(), $rules); + // Validierung + $validator = $this->validateCheckoutData(); if ($validator->fails()) { return back()->withErrors($validator)->withInput(Request::all()); } - $data = Request::all(); - //make User - $shopping_user = $this->makeShoppingUser($data); - - //make Order and Items - $shopping_order = $this->makeShoppingOrder($shopping_user, $data); - - //delete session - if(\Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){ - $user_shop_identifier = \Session::get('user_shop_identifier'); - Yard::instance('shopping')->deleteStoredCart($user_shop_identifier); - \App\Models\ShoppingInstance::where('identifier', $user_shop_identifier)->delete(); + + // Benutzer und Bestellung erstellen + $shopping_user = $this->checkoutRepo->makeShoppingUser($data); + $shopping_order = $this->checkoutRepo->makeShoppingOrder($shopping_user, $data); + + // CustomerPriority prüfen + if ($shopping_user->is_from === 'shopping') { + CustomerPriority::checkOne(ShoppingUser::find($shopping_user->id), true); } - - //CustomerPriority - if($shopping_user->is_from === 'shopping'){ - $ret = CustomerPriority::checkOne(ShoppingUser::find($shopping_user->id), true); - } - Util::setUserHistoryValue(['status'=>2, 'shopping_order_id'=>$shopping_order->id]); + + Util::setUserHistoryValue(['status' => 2, 'shopping_order_id' => $shopping_order->id]); - //check credit Card - if(Request::get('payment_method')){ - $ret = []; - //Rechnungskauf ohne PAYONE - if(Request::get('payment_method') === 'fnc#MIV'){ - - } - //need precheck the card - if(Request::get('payment_method') === 'cc'){ - $pay = new PayoneController(); - $pay->init($shopping_user, $shopping_order); - $ret['cc'] = $pay->checkCreditCard($data); - if($ret['cc']['status'] === 'ERROR' || $ret['cc']['status'] === 'INVALID'){ - /* PaymentTransaction::create([ - 'shopping_payment_id' => //is no shopping_payment_id at this moment, - 'request' => 'creditcardcheck, - 'errorcode' => $ret['cc']['errorcode'], - 'errormessage' => $ret['cc']['errormessage'], - 'customermessage' => $ret['cc']['customermessage'], - 'status' => $response['status'], - ]);*/ - \Session::flash('cc-error', 1); - \Session::flash('errormessage', $ret['cc']['errormessage']); - \Session::flash('customermessage', $ret['cc']['customermessage']); - return redirect(route('checkout.checkout_card'))->withInput(Request::all()); - } - if($ret['cc']['status'] === 'VALID'){ - /* - * array(4) { ["status"]=> string(5) "VALID" ["pseudocardpan"]=> string(19) "9410010000169020567" ["cardtype"]=> string(1) "V" ["truncatedcardpan"]=> string(16) "411111XXXXXX1111" } - * application through http post - * get this to the prepayment - * */ - } - } - - //need precheck the SEPA - if(Request::get('payment_method') === 'elv' && is_null(Request::get('mandate_identification'))){ - $pay = new PayoneController(); - $pay->init($shopping_user, $shopping_order); - $amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100; - $ret['elv'] = $pay->checkBankAccount($data, $amount, 'EUR', $shopping_user); - if($ret['elv']['status'] === 'ERROR' || $ret['elv']['status'] === 'INVALID'){ - /* PaymentTransaction::create([ - 'shopping_payment_id' => //is no shopping_payment_id at this moment, - 'request' => 'creditcardcheck, - 'errorcode' => $ret['cc']['errorcode'], - 'errormessage' => $ret['cc']['errormessage'], - 'customermessage' => $ret['cc']['customermessage'], - 'status' => $response['status'], - ]);*/ - \Session::flash('elv-error', 1); - \Session::flash('errormessage', $ret['elv']['errormessage']); - \Session::flash('customermessage', $ret['elv']['customermessage']); - return redirect(route('checkout.checkout_card'))->withInput(Request::all()); - } - // mandate_status active - if($ret['elv']['status'] === 'APPROVED' && $ret['elv']['mandate_status'] !== "active"){ - \Session::flash('elv-managemandate', 1); - \Session::flash('elv-mandate_identification', $ret['elv']['mandate_identification']); - \Session::flash('elv-mandate_text', $ret['elv']['mandate_text']); - \Session::flash('elv-creditor_identifier', $ret['elv']['creditor_identifier']); - return redirect(route('checkout.checkout_card'))->withInput(Request::all()); - - /* - * array(4) { ["status"]=> string(5) "VALID" ["pseudocardpan"]=> string(19) "9410010000169020567" ["cardtype"]=> string(1) "V" ["truncatedcardpan"]=> string(16) "411111XXXXXX1111" } - * application through http post - * get this to the prepayment - * */ - } - $ret['elv']['bankaccountholder'] = $data['elv_bankaccountholder']; - - } - if(Request::get('payment_method') === 'elv' && Request::get('mandate_identification')) { - $ret['elv']['mandate_identification'] = Request::get('mandate_identification'); - $ret['elv']['creditor_identifier'] = Request::get('creditor_identifier'); - $ret['elv']['iban'] = $data['elv_iban']; - $ret['elv']['bic'] = $data['elv_bic']; - $ret['elv']['bankaccountholder'] = $data['elv_bankaccountholder']; - //check abo and save the mandate - $this->storeUserPaymentsData($shopping_user, $ret); - } - //other - $pay = new PayoneController(); - $pay->init($shopping_user, $shopping_order); - $amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100; - $reference = $pay->setPrePayment(Request::get('payment_method'), $amount, 'EUR', $ret); - $this->putPayments('payment_reference', $reference); - $pay->setPersonalData(); - return $pay->ResponseData(); + // Zahlungsmethode verarbeiten + if (Request::get('payment_method')) { + return $this->processPaymentMethod($data, $shopping_user, $shopping_order); } return redirect()->back(); } + /** + * Verarbeitet den Länderwechsel + * + * @param array $data + * @return \Illuminate\Http\RedirectResponse + */ + private function handleCountryChange($data) + { + if (!Request::get('same_as_billing')) { + Yard::instance('shopping')->setShippingCountryWithPrice($data['billing_state'], $data['is_for']); + } else { + Yard::instance('shopping')->setShippingCountryWithPrice($data['shipping_state'], $data['is_for']); + } + + return back()->withInput(Request::all()); + } - public function transactionStatus($status, $reference){ + /** + * Validiert die Checkout-Daten + * + * @return \Illuminate\Validation\Validator + */ + private function validateCheckoutData() + { + $rules = [ + 'billing_salutation' => 'required', + 'billing_firstname' => 'required', + 'billing_lastname' => 'required', + 'billing_email' => 'required|email', + 'billing_address' => 'required', + 'billing_zipcode' => 'required', + 'billing_city' => 'required', + 'accepted_data_checkbox' => 'accepted', + ]; - $shopping_order_id = $this->getPayments('shopping_order_id'); + if (Request::get('same_as_billing')) { + $rules = array_merge($rules, [ + 'shipping_firstname' => 'required', + 'shipping_lastname' => 'required', + 'shipping_address' => 'required', + 'shipping_zipcode' => 'required', + 'shipping_city' => 'required', + 'shipping_salutation' => 'required' + ]); + } + + return Validator::make(Request::all(), $rules); + } - $ShoppingPayment = ShoppingPayment::where('shopping_order_id', $shopping_order_id)->where('reference', $reference)->first(); - if(!$ShoppingPayment){ - //TODO log this - Util::setUserHistoryValue(['status'=>21]); - \Session::flash('checkout-error', 'Der Zahlungsvorgang konnte nicht abgeschlossen werden, die Zahlung wurde nicht gefunden: '.$reference); + /** + * Verarbeitet die Zahlungsmethode + * + * @param array $data + * @param ShoppingUser $shopping_user + * @param ShoppingOrder $shopping_order + * @return mixed + */ + private function processPaymentMethod($data, $shopping_user, $shopping_order) + { + $result = []; + $payment_method = Request::get('payment_method'); + + // Kreditkarte prüfen + if ($payment_method === 'cc') { + $result = $this->checkCreditCard($data, $shopping_user, $shopping_order); + if (!isset($result['returnstatus']) || $result['returnstatus'] !== 'VALID') { + return $result; + } + } + + // SEPA prüfen + if ($payment_method === 'elv') { + $result = $this->checkSepaAccount($data, $shopping_user, $shopping_order); + if (!isset($result['returnstatus']) || $result['returnstatus'] !== 'VALID') { + return $result; + } + } + + // Zahlung vorbereiten + $pay = new PayoneController(); + $pay->init($shopping_user, $shopping_order); + $amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100; + $reference = $pay->setPrePayment($payment_method, $amount, 'EUR', $result); + $this->checkoutRepo->putSessionPayments('payment_reference', $reference); + $pay->setPersonalData(); + + return $pay->ResponseData(); + } + + /** + * Prüft die Kreditkartendaten + * + * @param array $data + * @param ShoppingUser $shopping_user + * @param ShoppingOrder $shopping_order + * @return bool|\Illuminate\Http\RedirectResponse + */ + private function checkCreditCard($data, $shopping_user, $shopping_order) + { + $pay = new PayoneController(); + $pay->init($shopping_user, $shopping_order); + $ret['cc'] = $pay->checkCreditCard($data); + + if ($ret['cc']['status'] === 'ERROR' || $ret['cc']['status'] === 'INVALID') { + Session::flash('cc-error', 1); + Session::flash('errormessage', $ret['cc']['errormessage']); + Session::flash('customermessage', $ret['cc']['customermessage']); + return redirect(route('checkout.checkout_card'))->withInput(Request::all()); + } + $ret['returnstatus'] = 'VALID'; + return $ret; + } + + /** + * Prüft die SEPA-Kontodaten + * + * @param array $data + * @param ShoppingUser $shopping_user + * @param ShoppingOrder $shopping_order + * @return bool|\Illuminate\Http\RedirectResponse + */ + private function checkSepaAccount($data, $shopping_user, $shopping_order) + { + if (is_null(Request::get('mandate_identification'))) { + $pay = new PayoneController(); + $pay->init($shopping_user, $shopping_order); + $amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100; + $ret['elv'] = $pay->checkBankAccount($data, $amount, 'EUR', $shopping_user); + + if ($ret['elv']['status'] === 'ERROR' || $ret['elv']['status'] === 'INVALID') { + Session::flash('elv-error', 1); + Session::flash('errormessage', $ret['elv']['errormessage']); + Session::flash('customermessage', $ret['elv']['customermessage']); + return redirect(route('checkout.checkout_card'))->withInput(Request::all()); + } + + if ($ret['elv']['status'] === 'APPROVED' && $ret['elv']['mandate_status'] !== "active") { + Session::flash('elv-managemandate', 1); + Session::flash('elv-mandate_identification', $ret['elv']['mandate_identification']); + Session::flash('elv-mandate_text', $ret['elv']['mandate_text']); + Session::flash('elv-creditor_identifier', $ret['elv']['creditor_identifier']); + return redirect(route('checkout.checkout_card'))->withInput(Request::all()); + } + + $ret['elv']['bankaccountholder'] = $data['elv_bankaccountholder']; + } else { + $ret['elv'] = [ + 'mandate_identification' => Request::get('mandate_identification'), + 'creditor_identifier' => Request::get('creditor_identifier'), + 'iban' => $data['elv_iban'], + 'bic' => $data['elv_bic'], + 'bankaccountholder' => $data['elv_bankaccountholder'] + ]; + + $this->storeUserPaymentsData($shopping_user, $ret); + } + $ret['returnstatus'] = 'VALID'; + return $ret; + } + + /** + * Leitet zur Abschlussseite weiter + * + * @return \Illuminate\View\View + */ + public function redirectToIsFinal() + { + $data = [ + 'user_shop' => Util::getUserShop(), + ]; + + return view('web.templates.checkout-is-final', $data); + } + + /** + * Verarbeitet den Transaktionsstatus + * + * @param string $status + * @param string $reference + * @return \Illuminate\View\View|\Illuminate\Http\RedirectResponse + */ + public function transactionStatus($status, $reference) + { + $shopping_order_id = $this->checkoutRepo->getSessionPayments('shopping_order_id'); + $ShoppingPayment = ShoppingPayment::where('shopping_order_id', $shopping_order_id) + ->where('reference', $reference) + ->first(); + + if (!$ShoppingPayment) { + Util::setUserHistoryValue(['status' => 21]); + Session::flash('checkout-error', 'Der Zahlungsvorgang konnte nicht abgeschlossen werden, die Zahlung wurde nicht gefunden: ' . $reference); return redirect(route('checkout.checkout_card')); } + $ShoppingPayment->status = $status; $ShoppingPayment->save(); - if($status === "success"){ - - Yard::instance('shopping')->destroy(); - $this->destroy(); - - $payt = $ShoppingPayment->payment_transactions->last(); - AboHelper::createNewAbo($ShoppingPayment); - $data = [ - 'user_shop' => Util::getUserShop(), - 'order_reference' => $reference, - 'pay_trans' => $payt, - ]; - return view('web.templates.checkout-final', $data); + if ($status === "success") { + return $this->handleSuccessfulTransaction($ShoppingPayment, $reference); } - if($status === "cancel"){ - Util::setUserHistoryValue(['status'=>22]); - \Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.'); - return redirect(route('checkout.checkout_card')); + if ($status === "cancel") { + Util::setUserHistoryValue(['status' => 22]); + Util::setInstanceStatus(5); // link_canceled + Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.'); + return redirect(route('checkout.checkout_card')); } - if($status === "error"){ - Util::setUserHistoryValue(['status'=>23]); - \Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.'); + + if ($status === "error") { + Util::setUserHistoryValue(['status' => 23]); + Util::setInstanceStatus(6); // link_failed + Session::flash('checkout-error', 'Der Zahlungsvorgang wurde abgebrochen, die Bestellung konnte nicht ausgeführt werden.'); return redirect(route('checkout.checkout_card')); - } } - public function transactionApproved($transactionId, $reference) { + /** + * Verarbeitet eine erfolgreiche Transaktion + * + * @param ShoppingPayment $ShoppingPayment + * @param string $reference + * @return \Illuminate\View\View + */ + private function handleSuccessfulTransaction($ShoppingPayment, $reference) + { + Yard::instance('shopping')->destroy(); + $this->checkoutRepo->sessionDestroy(); + Util::setInstanceStatus(3, true); // link_pending + // Abo erstellen, falls nötig + if ($ShoppingPayment->shopping_order->is_abo) { + AboHelper::createNewAbo($ShoppingPayment); + } + + $payt = $ShoppingPayment->payment_transactions->last(); + $data = [ + 'user_shop' => Util::getUserShop(), + 'order_reference' => $reference, + 'pay_trans' => $payt, + ]; + + return view('web.templates.checkout-final', $data); + } + + /** + * Verarbeitet eine genehmigte Transaktion + * + * @param int $transactionId + * @param string $reference + * @return \Illuminate\View\View + */ + public function transactionApproved($transactionId, $reference) + { $payt = PaymentTransaction::findOrFail($transactionId); - if($payt->shopping_payment->reference != $reference){ + if ($payt->shopping_payment->reference != $reference) { abort(404); } Yard::instance('shopping')->destroy(); - $this->destroy(); + $this->checkoutRepo->sessionDestroy(); + Util::setInstanceStatus(3, true); // link_pending - //Rechnung MIV - if($payt->status === 'FNCMIV'){ + // Abo erstellen, falls nötig + if ($payt->shopping_payment->shopping_order->is_abo) { + AboHelper::createNewAbo($payt->shopping_payment); + } + + // Rechnung MIV + if ($payt->status === 'FNCMIV') { $this->directPaymentStatus($payt); } @@ -456,14 +496,23 @@ class CheckoutController extends Controller 'order_reference' => $payt->shopping_payment->reference, 'pay_trans' => $payt, ]; + return view('web.templates.checkout-final', $data); } - private function storeUserPaymentsData($shopping_user, $ret){ - if($shopping_user->auth_user_id){ + /** + * Speichert die Zahlungsdaten des Benutzers + * + * @param ShoppingUser $shopping_user + * @param array $ret + * @return void + */ + private function storeUserPaymentsData($shopping_user, $ret) + { + if ($shopping_user->auth_user_id) { $user = User::find($shopping_user->auth_user_id); - if($user && $user->account){ - if(isset($ret['elv']) && is_array($ret['elv'])){ + if ($user && $user->account) { + if (isset($ret['elv']) && is_array($ret['elv'])) { $user->account->payment_data = $ret['elv']; $user->account->save(); } @@ -471,266 +520,33 @@ class CheckoutController extends Controller } } - private function makeShoppingUser($data){ - - $data['same_as_billing'] = isset($data['same_as_billing']) ? false : true; //reinvert - $data['accepted_data_checkbox'] = isset($data['accepted_data_checkbox']) ? true : false; - $shopping_user = false; - if($this->getPayments('shopping_user_id')){ - $shopping_user = ShoppingUser::find($this->getPayments('shopping_user_id')); - if($shopping_user){ - $shopping_user->fill($data); - $shopping_user->mode = null; - $shopping_user->save(); - } - } - if(!$shopping_user){ - $shopping_user = ShoppingUser::create($data); - } - $this->putPayments('shopping_user_id', $shopping_user->id); - - return $shopping_user; - } - - private function makeCustomerShoppingUser($shopping_data){ - // $shopping_user = ShoppingUser::findOrFail($shopping_data['shopping_user_id']); - $shopping_user = new ShoppingUser(); - $shopping_user->fill($shopping_data); - $shopping_user->faker_mail = false; - - $shopping_user->auth_user_id = null; - $shopping_user->homeparty_id = null; - $shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; //reinvert - // $shopping_user->id = null; - $shopping_user->accepted_data_checkbox = 1; - - return $shopping_user; - - } - private function makeShoppingOrder($shopping_user, $data){ - - $user_shop = Util::getUserShop(); - - if($shopping_user->is_from === 'homeparty'){ - //get data - $homeparty = Homeparty::find($shopping_user->homeparty_id); - //set Data! - $total = Yard::instance('shopping')->total(2, '.', ''); //ek_price - $data = [ - 'shopping_user_id' => $shopping_user->id, - 'auth_user_id' => $shopping_user->auth_user_id, - 'country_id' => Yard::instance('shopping')->getShippingCountryId(), - 'language' => \App::getLocale(), - 'user_shop_id' => $user_shop->id, - 'payment_for' => $shopping_user->getOrderPaymentFor(), - 'homeparty_id' => $shopping_user->homeparty_id, - 'total' => $total, - 'subtotal' => $homeparty->order['ek_price_net'], - 'shipping' => $homeparty->order['shipping_price'], - 'shipping_net' => $homeparty->order['shipping_price_net'], - 'subtotal_ws' => 0, - 'tax' => $total - $homeparty->order['ek_price_net'], - 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), - 'points' => $homeparty->order['points'] - $homeparty->order['bonus_points_diff'], - 'weight' => 0, - 'txaction' => 'prev', - 'mode' => Util::getUserShoppingMode(), - ]; - }elseif($shopping_user->is_from === 'collection'){ - //get data - $ShoppingCollectOrder = ShoppingCollectOrder::find($shopping_user->shopping_collect_order_id); - //set Data! - $total = Yard::instance('shopping')->total(2, '.', ''); //ek_price - $data = [ - 'shopping_user_id' => $shopping_user->id, - 'auth_user_id' => $shopping_user->auth_user_id, - 'country_id' => Yard::instance('shopping')->getShippingCountryId(), - 'language' => \App::getLocale(), - 'user_shop_id' => $user_shop->id, - 'payment_for' => $shopping_user->getOrderPaymentFor(), - 'total' => $total, - 'subtotal' => $ShoppingCollectOrder->price_total_net, - 'shipping' => 0, - 'shipping_net' => 0, - 'subtotal_ws' => $ShoppingCollectOrder->price_total_net, - 'tax' => $ShoppingCollectOrder->tax_total, - 'tax_split' => $ShoppingCollectOrder->tax_split, - 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), - 'points' => $ShoppingCollectOrder->points, - 'weight' => 0, - 'txaction' => 'prev', - 'mode' => Util::getUserShoppingMode(), - ]; - }else{ - $data = [ - 'shopping_user_id' => $shopping_user->id, - 'auth_user_id' => $shopping_user->auth_user_id, - 'country_id' => Yard::instance('shopping')->getShippingCountryId(), - 'language' => \App::getLocale(), - 'user_shop_id' => $user_shop->id, - 'payment_for' => $shopping_user->getOrderPaymentFor(), - 'total' => Yard::instance('shopping')->total(2, '.', ''), - 'subtotal' => Yard::instance('shopping')->subtotal(2, '.', ''), - 'shipping' => Yard::instance('shopping')->shipping(2, '.', ','), - 'shipping_net' => Yard::instance('shopping')->shippingNet(2, '.', ''), - 'subtotal_ws' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''), - 'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''), - 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), - 'points' => Yard::instance('shopping')->points(), - 'weight' => Yard::instance('shopping')->weight(), - 'is_abo' => isset($data['is_abo']) ? $data['is_abo'] : false, - 'abo_interval' => isset($data['abo_interval']) ? $data['abo_interval'] : null, - 'txaction' => 'prev', - 'mode' => Util::getUserShoppingMode(), - ]; - } - - $shopping_order= false; - if($this->getPayments('shopping_order_id')){ - $shopping_order = ShoppingOrder::find($this->getPayments('shopping_order_id')); - if($shopping_order){ - $shopping_order->fill($data); - $shopping_order->save(); - } - } - if(!$shopping_order){ - $shopping_order = ShoppingOrder::create($data); - if($shopping_user->is_from === 'collection' && $ShoppingCollectOrder){ - $ShoppingCollectOrder->shopping_order_id = $shopping_order->id; - $ShoppingCollectOrder->save(); - } - } - $this->putPayments('shopping_order_id', $shopping_order->id); - - $items = Yard::instance('shopping')->getContentByOrder(); - $shopping_order->shopping_order_items()->each(function($model) use ($items, $shopping_order, $shopping_user) { - foreach ($items as $item) { - if ($model->row_id === $item->rowId) { - $price_net = Yard::instance('shopping')->rowPriceNet($item, 2, '.', ''); - $tax = $item->price - $price_net; - $data = [ - 'shopping_order_id' => $shopping_order->id, - 'row_id' => $item->rowId, - 'product_id' => $item->id, - 'comp' => $item->options->comp, - 'qty' => $item->qty, - 'price' => $item->price, - 'price_net' => $price_net, - 'tax_rate' => $item->taxRate, - 'tax' => $tax, - 'price_vk_net' => $shopping_order->getPriceVkNetBy($item->id), - 'discount' => $item->options->no_commission ? 0 : $shopping_order->getUserDiscount(), - 'points' => $item->options->points, - 'slug' => $item->options->slug, - ]; - if($shopping_user->is_from === 'homeparty'){ - $data['homeparty_id'] = (int) $shopping_user->homeparty_id; - $data['product_id'] = null; - } - if($shopping_user->is_from === 'collection'){ - $data['shopping_collect_order_id'] = (int) $shopping_user->shopping_collect_order_id; - $data['product_id'] = null; - } - $model->fill($data)->save(); - return false; - } - } - return $model->delete(); - }); - foreach ($items as $item) { - if (!ShoppingOrderItem::where('shopping_order_id', $shopping_order->id)->where('row_id', $item->rowId)->count()){ - - $price_net = Yard::instance('shopping')->rowPriceNet($item, 2, '.', ''); - $tax = $item->price - $price_net; - - $data = [ - 'shopping_order_id' => $shopping_order->id, - 'row_id' => $item->rowId, - 'product_id' => $item->id, - 'comp' => $item->options->comp, - 'qty' => $item->qty, - 'price' => $item->price, - 'price_net' => $price_net, - 'tax_rate' => $item->taxRate, - 'tax' => $tax, - 'price_vk_net' => $shopping_order->getPriceVkNetBy($item->id), - 'discount' => $item->options->no_commission ? 0 : $shopping_order->getUserDiscount(), - 'points' => $item->options->points, - 'slug' => $item->options->slug - ]; - - if($shopping_user->is_from === 'homeparty'){ - $data['homeparty_id'] = (int) $shopping_user->homeparty_id; - $data['price_vk_net'] = 0; - $data['product_id'] = null; - } - if($shopping_user->is_from === 'collection'){ - $data['price_vk_net'] = 0; - $data['shopping_collect_order_id'] = (int) $shopping_user->shopping_collect_order_id; - $data['product_id'] = null; - } - $shopping_order_item = ShoppingOrderItem::create($data); - } - } - if($shopping_user->is_from === 'homeparty'){ - $shopping_order->makeHomepartyTaxSplit(); - }elseif($shopping_user->is_from === 'collection'){ - //is set on create / filll. - }else{ - $shopping_order->makeTaxSplit(); - } - return $shopping_order; - } - - private function putPayments($key, $value){ - $content = $this->getContent(); - $content->put($key, $value); - $this->session->put($this->instance, $content); - - } - - private function getPayments($key){ - $content = $this->getContent(); - if ($content->has($key)){ - return $content->get($key); - } - return false; - } - - private function getContent() + /** + * Verarbeitet den direkten Zahlungsstatus (Rechnung MIV) + * + * @param PaymentTransaction $payt + * @return void + */ + private function directPaymentStatus(PaymentTransaction $payt) { - if (is_null($this->session->get($this->instance))) { - return new Collection([]); - } - return $this->session->get($this->instance); - } - - public function destroy() - { - $this->session->remove($this->instance); - } - - //is for Rechnung MIV - private function directPaymentStatus(PaymentTransaction $payt){ - - if(isset($payt->transmitted_data['param'])){ + if (isset($payt->transmitted_data['param'])) { $shopping_order = ShoppingOrder::find($payt->transmitted_data['param']); $shopping_order->txaction = 'invoice_open'; $shopping_order->save(); + $shopping_payment = ShoppingPayment::where('reference', $payt->transmitted_data['reference'])->first(); - if($shopping_payment){ + if ($shopping_payment) { $shopping_payment->txaction = 'invoice_open'; $shopping_payment->save(); } - $send_link = Payment::paymentStatusPaidAction($shopping_order, false); + + $send_link = Payment::paymentStatusPaidAction($shopping_order, false, $shopping_payment); $data = [ - 'mode' => $payt->transmitted_data['mode'], + 'mode' => $payt->transmitted_data['mode'], 'txaction' => $payt->txaction, 'send_link' => $send_link, ]; + Payment::paymentStatusSendMail($shopping_order, $shopping_payment, $data); } - } - } \ No newline at end of file diff --git a/app/Http/Controllers/WizardController.php b/app/Http/Controllers/WizardController.php index 6b601ee..80f44c7 100755 --- a/app/Http/Controllers/WizardController.php +++ b/app/Http/Controllers/WizardController.php @@ -252,6 +252,9 @@ class WizardController extends Controller 'mobil' => 'required_without:phone', 'country_id' => 'required|integer|min:1', 'birthday' => 'required', + 'bank_owner' => 'required', + 'bank_iban' => 'required', + 'bank_bic' => 'required', ); if (!Request::get('same_as_billing')) { @@ -572,7 +575,7 @@ class WizardController extends Controller if($product->images->count()){ $image = $product->images->first()->slug; } - $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]); + $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]); if(\App\Services\UserService::getTaxFree()){ Yard::setTax($cartItem->rowId, 0); }else{ @@ -587,7 +590,7 @@ class WizardController extends Controller if($product_on_board->images->count()){ $image = $product_on_board->images->first()->slug; } - $cartItem = Yard::instance('shopping')->add($product_on_board->id, $product_on_board->getLang('name'), 1, $product_on_board->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product_on_board->slug, 'weight' => $product_on_board->weight, 'points' => $product_on_board->points, 'no_commission' => $product_on_board->no_commission]); + $cartItem = Yard::instance('shopping')->add($product_on_board->id, $product_on_board->getLang('name'), 1, $product_on_board->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), false, false, ['image' => $image, 'slug' => $product_on_board->slug, 'weight' => $product_on_board->weight, 'points' => $product_on_board->points, 'no_commission' => $product_on_board->no_commission, 'show_on' => $product_on_board->show_on]); if(\App\Services\UserService::getTaxFree()){ Yard::setTax($cartItem->rowId, 0); }else{ diff --git a/app/Http/Middleware/Checkout.php b/app/Http/Middleware/Checkout.php index f7eb56e..b263317 100755 --- a/app/Http/Middleware/Checkout.php +++ b/app/Http/Middleware/Checkout.php @@ -61,7 +61,7 @@ class Checkout Yard::instance('shopping')->setShippingCountryWithPrice($shopping_instance->country_id, $is_for); if($shopping_instance->payment !== 6){ - //delete shopping instance + //delete shopping instance is not save for restore, payment link ShoppingInstance::where('identifier', $request->route('identifier'))->delete(); } diff --git a/app/Mail/MailCheckout.php b/app/Mail/MailCheckout.php index 1ee1ef9..b13282a 100644 --- a/app/Mail/MailCheckout.php +++ b/app/Mail/MailCheckout.php @@ -17,18 +17,20 @@ class MailCheckout extends Mailable protected $shopping_payment; protected $send_link; protected $mode; + protected $payment_error; public $subject; public $data; - public function __construct($txaction, $shopping_order, $shopping_payment, $send_link, $mode) + public function __construct($txaction, $shopping_order, $shopping_payment, $send_link, $mode, $payment_error = false) { $this->txaction = $txaction; $this->shopping_order = $shopping_order; $this->shopping_payment = $shopping_payment; $this->send_link = $send_link; $this->mode = $mode; + $this->payment_error = $payment_error; if($this->txaction === 'paid'){ $this->subject = __('email.checkout_subject_paid')." "; @@ -77,6 +79,7 @@ class MailCheckout extends Mailable 'txaction' => $this->txaction, 'shopping_order' => $this->shopping_order, 'shopping_payment' => $this->shopping_payment, + 'payment_error' => $this->payment_error, 'copy3line' => __('email.checkout_copy3line'), 'greetings' => __('email.greetings'), 'sender' => __('email.sender'), diff --git a/app/Mail/MailCustomPaymet.php b/app/Mail/MailCustomPaymet.php index e9a8407..0affbe4 100644 --- a/app/Mail/MailCustomPaymet.php +++ b/app/Mail/MailCustomPaymet.php @@ -18,6 +18,8 @@ class MailCustomPaymet extends Mailable protected $mode; protected $name; protected $yard_shopping_items; + protected $is_abo; + protected $is_for; public $subject; @@ -31,9 +33,10 @@ class MailCustomPaymet extends Mailable $this->shopping_instance = $shopping_instance; $this->mode = $mode; $this->yard_shopping_items = $yard_shopping_items; - + $this->is_abo = isset($shopping_instance->shopping_data['is_abo']) ? $shopping_instance->shopping_data['is_abo'] : 0; + $this->is_for = isset($shopping_instance->shopping_data['is_for']) ? $shopping_instance->shopping_data['is_for'] : 0; $this->name = $shopping_user->member->account->first_name." ".$shopping_user->member->account->last_name." - "; - $this->subject = __('email.subject_custom_payout', ['name' => $this->name]); + $this->subject =$this->is_abo ? __('email.subject_custom_abo_payout', ['name' => $this->name]) : __('email.subject_custom_payout', ['name' => $this->name]); } @@ -43,10 +46,12 @@ class MailCustomPaymet extends Mailable return $this->view('emails.custom_payment')->with([ 'salutation' => $salutation, - 'copy1line' => __('email.your_custom_payout', ['name' => $this->name]), + 'copy1line' => $this->is_abo ? __('email.your_custom_abo_payout', ['name' => $this->name]) : __('email.your_custom_payout', ['name' => $this->name]), 'shopping_user' => $this->shopping_user, 'shopping_instance' => $this->shopping_instance, 'yard_shopping_items' => $this->yard_shopping_items, + 'is_abo' => $this->is_abo, + 'is_for' => $this->is_for, 'copy3line' => __('email.checkout_copy3line'), 'greetings' => __('email.greetings'), 'route' => $this->route, diff --git a/app/Models/Category.php b/app/Models/Category.php index a61fc67..7f62172 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -60,7 +60,7 @@ class Category extends Model 'parent_id', 'name', 'headline', 'pos', 'active', ]; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Models/DbipLookup.php b/app/Models/DbipLookup.php index dc769ff..aecada8 100644 --- a/app/Models/DbipLookup.php +++ b/app/Models/DbipLookup.php @@ -10,13 +10,20 @@ use Illuminate\Database\Eloquent\Model; /** * Class DbipLookup - * + * * @property string $addr_type * @property string $ip_start * @property string $ip_end * @property string $country - * * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup query() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup whereAddrType($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup whereCountry($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup whereIpEnd($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup whereIpStart($value) + * @mixin \Eloquent */ class DbipLookup extends Model { diff --git a/app/Models/DbipLookup2.php b/app/Models/DbipLookup2.php index 66da7f5..232be9d 100644 --- a/app/Models/DbipLookup2.php +++ b/app/Models/DbipLookup2.php @@ -10,13 +10,20 @@ use Illuminate\Database\Eloquent\Model; /** * Class DbipLookup - * + * * @property string $addr_type * @property string $ip_start * @property string $ip_end * @property string $country - * * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 query() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 whereAddrType($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 whereCountry($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 whereIpEnd($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup2 whereIpStart($value) + * @mixin \Eloquent */ class DbipLookup2 extends Model { diff --git a/app/Models/DbipLookup3.php b/app/Models/DbipLookup3.php index 930b559..acdb526 100644 --- a/app/Models/DbipLookup3.php +++ b/app/Models/DbipLookup3.php @@ -10,13 +10,20 @@ use Illuminate\Database\Eloquent\Model; /** * Class DbipLookup - * + * * @property string $addr_type * @property string $ip_start * @property string $ip_end * @property string $country - * * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 query() + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 whereAddrType($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 whereCountry($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 whereIpEnd($value) + * @method static \Illuminate\Database\Eloquent\Builder|DbipLookup3 whereIpStart($value) + * @mixin \Eloquent */ class DbipLookup3 extends Model { diff --git a/app/Models/DcCategory.php b/app/Models/DcCategory.php index 9bdcd9e..b922a1a 100644 --- a/app/Models/DcCategory.php +++ b/app/Models/DcCategory.php @@ -13,15 +13,28 @@ use Cviebrock\EloquentSluggable\Sluggable; /** * Class DcCategory - * + * * @property int $id * @property string $name * @property int $pos * @property string $slug * @property Carbon|null $created_at * @property Carbon|null $updated_at - * * @package App\Models + * @property bool $active + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory findSimilarSlugs(string $attribute, array $config, string $slug) + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory query() + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory wherePos($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcCategory withUniqueSlugConstraints(\Illuminate\Database\Eloquent\Model $model, string $attribute, array $config, string $slug) + * @mixin \Eloquent */ class DcCategory extends Model { @@ -41,7 +54,7 @@ class DcCategory extends Model 'active' ]; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Models/DcFile.php b/app/Models/DcFile.php index 81cf0dc..1a13af7 100644 --- a/app/Models/DcFile.php +++ b/app/Models/DcFile.php @@ -12,7 +12,7 @@ use Illuminate\Database\Eloquent\Model; /** * Class DcFile - * + * * @property int $id * @property string $filename * @property string $original_name @@ -22,10 +22,26 @@ use Illuminate\Database\Eloquent\Model; * @property int|null $active * @property Carbon|null $created_at * @property Carbon|null $updated_at - * * @property Collection|DcFileTag[] $dc_file_tags - * * @package App\Models + * @property-read int|null $dc_file_tags_count + * @property-read Collection $fileTag + * @property-read int|null $file_tag_count + * @property-read Collection $tags + * @property-read int|null $tags_count + * @method static \Illuminate\Database\Eloquent\Builder|DcFile newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DcFile newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DcFile query() + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereExt($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereFilename($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereMine($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereOriginalName($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereSize($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFile whereUpdatedAt($value) + * @mixin \Eloquent */ class DcFile extends Model { diff --git a/app/Models/DcFileTag.php b/app/Models/DcFileTag.php index 24d68e8..1986d6d 100644 --- a/app/Models/DcFileTag.php +++ b/app/Models/DcFileTag.php @@ -11,17 +11,24 @@ use Illuminate\Database\Eloquent\Model; /** * Class DcFileTag - * + * * @property int $id * @property int $file_id * @property int $tag_id * @property Carbon|null $created_at * @property Carbon|null $updated_at - * * @property DcFile $dc_file * @property DcTag $dc_tag - * * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag query() + * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereFileId($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereTagId($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcFileTag whereUpdatedAt($value) + * @mixin \Eloquent */ class DcFileTag extends Model { diff --git a/app/Models/DcTag.php b/app/Models/DcTag.php index 9cc6f0e..354ab94 100644 --- a/app/Models/DcTag.php +++ b/app/Models/DcTag.php @@ -14,7 +14,7 @@ use Cviebrock\EloquentSluggable\Sluggable; /** * Class DcTag - * + * * @property int $id * @property int|null $category_id * @property string $name @@ -22,10 +22,24 @@ use Cviebrock\EloquentSluggable\Sluggable; * @property string $slug * @property Carbon|null $created_at * @property Carbon|null $updated_at - * * @property Collection|DcFileTag[] $dc_file_tags - * * @package App\Models + * @property bool $active + * @property-read int|null $dc_file_tags_count + * @method static \Illuminate\Database\Eloquent\Builder|DcTag findSimilarSlugs(string $attribute, array $config, string $slug) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DcTag newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|DcTag query() + * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereCategoryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag wherePos($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|DcTag withUniqueSlugConstraints(\Illuminate\Database\Eloquent\Model $model, string $attribute, array $config, string $slug) + * @mixin \Eloquent */ class DcTag extends Model { @@ -47,7 +61,7 @@ class DcTag extends Model 'active' ]; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Models/Homeparty.php b/app/Models/Homeparty.php index 95dee2a..770d678 100644 --- a/app/Models/Homeparty.php +++ b/app/Models/Homeparty.php @@ -71,6 +71,8 @@ use Illuminate\Database\Eloquent\Collection; * @method static \Illuminate\Database\Eloquent\Builder|Homeparty whereOrder($value) * @method static \Illuminate\Database\Eloquent\Builder|Homeparty whereSettings($value) * @method static \Illuminate\Database\Eloquent\Builder|Homeparty whereStep($value) + * @property array|null $trans_description + * @method static \Illuminate\Database\Eloquent\Builder|Homeparty whereTransDescription($value) * @mixin \Eloquent */ class Homeparty extends Model diff --git a/app/Models/IqImage.php b/app/Models/IqImage.php index 8e3eca8..6bdf5ae 100644 --- a/app/Models/IqImage.php +++ b/app/Models/IqImage.php @@ -51,7 +51,7 @@ class IqImage extends Model 'filename', 'original_name', 'ext', 'mine', 'size' ]; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Models/IqSite.php b/app/Models/IqSite.php index 34eb80f..eb6e1be 100644 --- a/app/Models/IqSite.php +++ b/app/Models/IqSite.php @@ -75,7 +75,11 @@ class IqSite extends Model public function getProductModels(){ $ret = []; foreach($this->products as $product_id){ - $ret[] = Product::findOrFail($product_id); + $product = Product::findOrFail($product_id); + if($product->active){ + $ret[] = $product; + } + } return $ret; @@ -84,7 +88,10 @@ class IqSite extends Model public function getProductSetModels(){ $ret = []; foreach($this->set_products as $product_id){ - $ret[] = Product::findOrFail($product_id); + $product = Product::findOrFail($product_id); + if($product->active){ + $ret[] = $product; + } } return $ret; diff --git a/app/Models/PaymentMethod.php b/app/Models/PaymentMethod.php index d66bc69..5e1d6ef 100644 --- a/app/Models/PaymentMethod.php +++ b/app/Models/PaymentMethod.php @@ -36,6 +36,8 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereUpdatedAt($value) * @property array|null $show_on * @method static \Illuminate\Database\Eloquent\Builder|PaymentMethod whereShowOn($value) + * @property bool $is_abo + * @method static \Illuminate\Database\Eloquent\Builder|PaymentMethod whereIsAbo($value) * @mixin \Eloquent */ class PaymentMethod extends Model diff --git a/app/Models/Product.php b/app/Models/Product.php index 2fd7743..92dfc92 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -249,9 +249,8 @@ class Product extends Model 8 => 'Mitgliedschaft Berater', 9 => 'Onboarding Berater', 10 => 'zur internen Berechnung', - 12 => 'Abo-ShopBerater', - 13 => 'Abo-ShopBeraterKunden', - + 12 => 'Abo-BasisProdukt', + 13 => 'Abo-AddonProdukt', ]; public $actions = [ @@ -270,7 +269,18 @@ class Product extends Model ]; - public function sluggable() +/************* ✨ Codeium Command ⭐ *************/ + /** + * Configure the model for auto-generating a slug. + * + * This method returns an array defining the attributes used + * to generate the slug for the model. In this case, the 'name' + * attribute is used as the source for generating the slug. + * + * @return array Configuration for slug generation. + */ + +/****** e935bd41-f49b-4736-9603-2da86dc27f25 *******/ public function sluggable() : array { return [ 'slug' => [ @@ -393,23 +403,25 @@ class Product extends Model } /*price by user Factor*/ - private function calcPriceUserFactor($price){ + private function calcPriceUserFactor($price, $user=null){ if($this->no_commission){ return $price; } - if(\Auth::user() && \Auth::user()->user_level){ - $margin = ((\Auth::user()->user_level->margin -100)*-1) / 100; + $user = $user ? $user : \Auth::user(); + if($user && $user->user_level){ + $margin = (($user->user_level->margin -100)*-1) / 100; $price = $price * $margin; } return $price; } - private function calcPriceUserCommission($price){ + private function calcPriceUserCommission($price, $user){ if($this->no_commission){ return $price; } - if(\Auth::user() && \Auth::user()->user_level){ - $margin = \Auth::user()->user_level->margin; + $user = $user ? $user : \Auth::user(); + if($user && $user->user_level){ + $margin = $user->user_level->margin; $price = $price / 100 * $margin; } return $price; @@ -423,13 +435,13 @@ class Product extends Model return $price / $tax_rate; } //price calu with - public function getPriceWith(Bool $net = true, Bool $ufactor = true, $country = null, $commission=false){ + public function getPriceWith(Bool $net = true, Bool $ufactor = true, $country = null, $commission=false, $user = null){ $price = isset($this->attributes['price']) ? $this->attributes['price'] : null; $cprice = $country ? $this->getCPrice($country) : null; $price = $cprice ? $cprice : $price; $price = $net ? $this->calcPriceNet($price, $country) : $price; - $price = $ufactor ? $this->calcPriceUserFactor($price) : $price; - $price = $commission ? $this->calcPriceUserCommission($price) : $price; + $price = $ufactor ? $this->calcPriceUserFactor($price, $user) : $price; + $price = $commission ? $this->calcPriceUserCommission($price, $user) : $price; return round($price, 2); } diff --git a/app/Models/ProductImage.php b/app/Models/ProductImage.php index 85ef780..c16278b 100644 --- a/app/Models/ProductImage.php +++ b/app/Models/ProductImage.php @@ -51,7 +51,7 @@ class ProductImage extends Model 'product_id', 'filename', 'original_name', 'ext', 'mine', 'size' ]; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Models/Setting.php b/app/Models/Setting.php index 158ed96..6a290fc 100644 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -78,7 +78,7 @@ class Setting extends Model ]; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Models/ShoppingCollectOrder.php b/app/Models/ShoppingCollectOrder.php index bdc36ec..dc84e4c 100644 --- a/app/Models/ShoppingCollectOrder.php +++ b/app/Models/ShoppingCollectOrder.php @@ -121,7 +121,7 @@ class ShoppingCollectOrder extends Model $add_tax = round($add_tax, 2); $tax_split[$tax_rate] = isset($tax_split[$tax_rate]) ? round($tax_split[$tax_rate] += $add_tax, 2) : $add_tax; - foreach($tax_split as $key=>$value){ + foreach((array)$tax_split as $key=>$value){ $tax_split[$key] = number_format($value, 2); } $this->tax_split = $tax_split; @@ -141,13 +141,31 @@ class ShoppingCollectOrder extends Model public function addShopItem($shop_item_id, $shop_item) { - $shop_item->user_price_net = number_format($shop_item->user_price_net, 2); - $shop_item->user_price_total_net = number_format($shop_item->user_price_total_net, 2); - $shop_item->user_tax = number_format($shop_item->user_tax, 2); - $shop_item->user_tax_total = number_format($shop_item->user_tax_total, 2); + $numberFields = [ + 'user_price_net', + 'user_price_total_net', + 'user_tax', + 'user_tax_total' + ]; + + $intFields = [ + 'points_total', + 'points' + ]; + + foreach ($numberFields as $field) { + if (isset($shop_item->$field)) { + $shop_item->$field = number_format($shop_item->$field, 2); + } + } + + foreach ($intFields as $field) { + if (isset($shop_item->$field)) { + $shop_item->$field = intval($shop_item->$field); + } + } $this->shop_items[$shop_item_id] = $shop_item; - } public function addOrder($order) diff --git a/app/Models/ShoppingInstance.php b/app/Models/ShoppingInstance.php index 1919222..9a3fb22 100644 --- a/app/Models/ShoppingInstance.php +++ b/app/Models/ShoppingInstance.php @@ -35,6 +35,12 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingInstance whereShoppingData($value) * @property string|null $language * @method static \Illuminate\Database\Eloquent\Builder|ShoppingInstance whereLanguage($value) + * @property int|null $status + * @property float|null $amount + * @property int|null $shopping_user_id + * @method static \Illuminate\Database\Eloquent\Builder|ShoppingInstance whereAmount($value) + * @method static \Illuminate\Database\Eloquent\Builder|ShoppingInstance whereShoppingUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|ShoppingInstance whereStatus($value) * @mixin \Eloquent */ class ShoppingInstance extends Model @@ -50,14 +56,29 @@ class ShoppingInstance extends Model ]; + public $statuses = [ + 0 => 'link_sent', + 1 => 'link_openly', + 2 => 'link_check', + 3 => 'link_pending', + 4 => 'link_appointed', + 5 => 'link_failed', + 6 => 'link_canceled', + 10 => 'link_paid', + ]; + protected $table = 'shopping_instances'; - protected $casts = ['shopping_data' => 'array']; + protected $casts = ['shopping_data' => 'array', 'amount' => 'float']; protected $fillable = [ - 'identifier', 'user_shop_id', 'auth_user_id', 'payment', 'subdomain', 'language', 'country_id', 'shopping_data', 'back' + 'identifier', 'user_shop_id', 'auth_user_id', 'status', 'payment', 'subdomain', 'language', 'country_id', 'amount', 'shopping_user_id', 'shopping_data', 'back' ]; + public function getStatus(){ + return isset($this->statuses[$this->status]) ? $this->statuses[$this->status] : 'link_sent'; + } + public function getLocale(){ return $this->language ? $this->language : \App::getLocale(); } @@ -78,5 +99,11 @@ class ShoppingInstance extends Model return $this->belongsTo('App\User','auth_user_id'); } + public function getAmountFormatted(){ + return formatNumber($this->amount); + } + + + } diff --git a/app/Models/ShoppingOrder.php b/app/Models/ShoppingOrder.php index 1e20e31..861b777 100644 --- a/app/Models/ShoppingOrder.php +++ b/app/Models/ShoppingOrder.php @@ -97,6 +97,10 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereNetSplit($value) * @property string|null $language * @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereLanguage($value) + * @property bool|null $is_abo + * @property int|null $abo_interval + * @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereAboInterval($value) + * @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereIsAbo($value) * @mixin \Eloquent */ class ShoppingOrder extends Model @@ -281,6 +285,13 @@ class ShoppingOrder extends Model } + public function getUserAbo(){ + $UserAboOrder = UserAboOrder::where('shopping_order_id', $this->id)->first(); + if($UserAboOrder && $UserAboOrder->user_abo){ + return $UserAboOrder->user_abo; + } + return null; + } public function getLocale(){ return $this->language ? $this->language : \App::getLocale(); diff --git a/app/Models/ShoppingOrderItem.php b/app/Models/ShoppingOrderItem.php index 9173bd7..083ea19 100644 --- a/app/Models/ShoppingOrderItem.php +++ b/app/Models/ShoppingOrderItem.php @@ -83,6 +83,16 @@ class ShoppingOrderItem extends Model 'points', 'slug', ]; + protected $casts = [ + 'qty' => 'int', + 'price' => 'float', + 'price_net' => 'float', + 'tax_rate' => 'float', + 'tax' => 'float', + 'price_vk_net' => 'float', + 'discount' => 'float', + 'points' => 'int', + ]; public function shopping_order() { diff --git a/app/Models/ShoppingPayment.php b/app/Models/ShoppingPayment.php index 1abb82a..23139b8 100644 --- a/app/Models/ShoppingPayment.php +++ b/app/Models/ShoppingPayment.php @@ -40,23 +40,35 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereWallettype($value) * @property string|null $mode * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingPayment whereMode($value) + * @property array|null $carddata + * @property int|null $is_abo + * @property int|null $abo_interval + * @method static \Illuminate\Database\Eloquent\Builder|ShoppingPayment whereAboInterval($value) + * @method static \Illuminate\Database\Eloquent\Builder|ShoppingPayment whereCarddata($value) + * @method static \Illuminate\Database\Eloquent\Builder|ShoppingPayment whereIsAbo($value) * @mixin \Eloquent */ class ShoppingPayment extends Model { protected $table = 'shopping_payments'; + + protected $casts = [ + 'carddata' => 'array', + ]; protected $fillable = [ 'shopping_order_id', 'clearingtype', 'wallettype', 'onlinebanktransfertype', + 'carddata', 'reference', 'amount', 'currency', 'mode', 'is_abo', 'abo_interval', + 'identifier', ]; @@ -69,7 +81,7 @@ class ShoppingPayment extends Model { return $this->hasMany('App\Models\PaymentTransaction','shopping_payment_id'); } - + public function getPaymentType(){ if($this->clearingtype === 'wlt') { diff --git a/app/Models/ShoppingUser.php b/app/Models/ShoppingUser.php index 4124b05..a5fb39f 100644 --- a/app/Models/ShoppingUser.php +++ b/app/Models/ShoppingUser.php @@ -2,6 +2,7 @@ namespace App\Models; +use App\Services\ShoppingUserService; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; @@ -312,4 +313,8 @@ class ShoppingUser extends Model ]; } -} \ No newline at end of file + + public function getAllOrdersByMember(){ + return ShoppingUserService::getAllOrdersByMember($this); + } +} diff --git a/app/Models/SySetting.php b/app/Models/SySetting.php index bab55fa..3ff1f51 100644 --- a/app/Models/SySetting.php +++ b/app/Models/SySetting.php @@ -63,7 +63,7 @@ class SySetting extends Model 1 => 'default', ]; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Models/UserAbo.php b/app/Models/UserAbo.php index fa3b7b1..11b582f 100644 --- a/app/Models/UserAbo.php +++ b/app/Models/UserAbo.php @@ -8,20 +8,20 @@ namespace App\Models; use App\User; use Carbon\Carbon; +use App\Services\Util; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\SoftDeletes; /** * Class UserAbo - * + * * @property int $id * @property int $user_id * @property int $payone_userid * @property string $clearingtype * @property string|null $wallettype * @property int $amount - * @property string $currency * @property bool $active * @property int $status * @property int $abo_interval @@ -32,11 +32,51 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property Carbon|null $updated_at * @property string|null $deleted_at * @property Carbon|null $user_deleted_at - * * @property User $user * @property Collection|UserAboOrder[] $user_abo_orders - * * @package App\Models + * @property int|null $member_id + * @property int $shopping_user_id + * @property string|null $email + * @property string|null $is_for + * @property array|null $carddata + * @property \Illuminate\Support\Carbon|null $start_date + * @property \Illuminate\Support\Carbon|null $last_date + * @property \Illuminate\Support\Carbon|null $next_date + * @property-read User|null $member + * @property-read \App\Models\ShoppingUser $shopping_user + * @property-read Collection $user_abo_items + * @property-read int|null $user_abo_items_count + * @property-read int|null $user_abo_orders_count + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo query() + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereAboInterval($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereAmount($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCancelDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCarddata($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereClearingtype($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereEmail($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereIsFor($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereLastDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereMemberId($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereNextDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo wherePayoneUserid($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereShoppingUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereStartDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereUserDeletedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo whereWallettype($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|UserAbo withoutTrashed() + * @mixin \Eloquent */ class UserAbo extends Model { @@ -45,29 +85,33 @@ class UserAbo extends Model protected $casts = [ 'user_id' => 'int', + 'member_id' => 'int', 'shopping_user_id' => 'int', 'payone_userid' => 'int', - 'amount' => 'int', 'active' => 'bool', 'status' => 'int', 'abo_interval' => 'int', + 'amount' => 'int', 'start_date' => 'datetime', 'last_date' => 'datetime', 'next_date' => 'datetime', 'cancel_date' => 'datetime', - 'count' => 'int', - 'user_deleted_at' => 'datetime' + 'user_deleted_at' => 'datetime', + 'carddata' => 'array' + ]; protected $fillable = [ 'user_id', + 'member_id', 'shopping_user_id', 'is_for', + 'email', 'payone_userid', 'clearingtype', 'wallettype', + 'carddata', 'amount', - 'currency', 'active', 'status', 'abo_interval', @@ -75,13 +119,43 @@ class UserAbo extends Model 'last_date', 'next_date', 'cancel_date', - 'count', 'user_deleted_at' ]; + public static $aboDeliveryDays = [5, 10, 20, 25]; + + public static $statusTypes = [ + 0 => 'abo_new', + 1 => 'abo_new', + 2 => 'abo_okay', + 3 => 'abo_hold', + 4 => 'abo_cancel', + 5 => 'abo_finish', + 6 => 'abo_inactive', + 7 => 'abo_grace' + ]; + + public static $statusColors = [ + 0 => 'success', + 1 => 'success', + 2 => 'secondary', + 3 => 'warning', + 4 => 'danger', + 5 => 'info', + 6 => 'warning', + 7 => 'danger' + ]; + + + public function user() { - return $this->belongsTo(User::class); + return $this->belongsTo(User::class, 'user_id'); + } + + public function member() + { + return $this->belongsTo(User::class, 'member_id'); } public function shopping_user() @@ -89,12 +163,21 @@ class UserAbo extends Model return $this->belongsTo('App\Models\ShoppingUser','shopping_user_id'); } - public function user_abo_orders() { return $this->hasMany(UserAboOrder::class); } + public function user_abo_items() + { + return $this->hasMany(UserAboItem::class); + } + + public function getCountOrders(){ + //sind bezahlte Bestellungen + return $this->user_abo_orders->where('status', '>=', 2)->count(); + } + public function setStartDateAttribute( $value ) { $this->attributes['start_date'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL; } @@ -127,5 +210,29 @@ class UserAbo extends Model return $this->attributes['cancel_date'] ? Carbon::parse($this->attributes['cancel_date'])->format(\Util::formatDateDB()) : ''; } + public function getFormattedAmount() + { + return isset($this->attributes['amount']) ? Util::formatNumber($this->attributes['amount']/100) : ""; + } + public function getIsForFormated() + { + return $this->attributes['is_for'] === 'me' ? ''.__('tables.adviser').'' : ''.__('tables.customer').''; + } + + public function getStatusFormated(){ + return ''.$this->getStatusType().''; + } + + public function getStatusType(){ + return isset(self::$statusTypes[$this->status]) ? __('abo.'.self::$statusTypes[$this->status]) : ""; + } + + public function getStatusColor(){ + return isset(self::$statusColors[$this->status]) ? self::$statusColors[$this->status] : "default"; + } + + public function getPaymentType(){ + return $this->clearingtype === 'wlt' ? __('payment.paypal') : __('payment.credit_card'); + } } diff --git a/app/Models/UserAboItem.php b/app/Models/UserAboItem.php new file mode 100644 index 0000000..fa539cb --- /dev/null +++ b/app/Models/UserAboItem.php @@ -0,0 +1,90 @@ + 'int', + 'product_id' => 'int', + 'comp' => 'int', + 'qty' => 'int', + 'status' => 'int' + ]; + + protected $fillable = [ + 'user_abo_id', + 'product_id', + 'comp', + 'qty', + 'status' + ]; + + public function product() + { + return $this->belongsTo(Product::class); + } + + public function user_abo() + { + return $this->belongsTo(UserAbo::class); + } + + public function getPrice() + { + $ufactor = $this->user_abo->is_for === 'me' ? true : false; + $tax_free = $ufactor ? true : Yard::instance('shopping')->getUserTaxFree(); + $userCountry = Yard::instance('shopping')->getUserCountry(); + return $this->product->getPriceWith($tax_free, $ufactor, $userCountry); + } + + + public function getFormattedPrice(){ + /** der Preis wird für den User berechnet */ + return Util::formatNumber($this->getPrice()); + } + + + public function getFormattedTotalPrice(){ + /** der Preis wird für den User berechnet */ + return Util::formatNumber($this->getPrice() * $this->qty); + } +} diff --git a/app/Models/UserAboOrder.php b/app/Models/UserAboOrder.php index c6ad621..76a542d 100644 --- a/app/Models/UserAboOrder.php +++ b/app/Models/UserAboOrder.php @@ -12,18 +12,26 @@ use Illuminate\Database\Eloquent\Model; /** * Class UserAboOrder - * + * * @property int $id * @property int $user_abo_id * @property int $shopping_order_id * @property int $status * @property Carbon|null $created_at * @property Carbon|null $updated_at - * * @property ShoppingOrder $shopping_order * @property UserAbo $user_abo - * * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder query() + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereShoppingOrderId($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserAboOrder whereUserAboId($value) + * @mixin \Eloquent */ class UserAboOrder extends Model { @@ -42,6 +50,30 @@ class UserAboOrder extends Model 'status' ]; + public static $statusTypes = [ + 0 => 'abo_new', + 1 => 'abo_new', + 2 => 'abo_okay', + 3 => 'abo_hold', + 4 => 'abo_cancel', + 5 => 'abo_finish', + 6 => 'abo_inactive', + 7 => 'abo_grace' + ]; + + public static $statusColors = [ + 0 => 'success', + 1 => 'success', + 2 => 'secondary', + 3 => 'warning', + 4 => 'danger', + 5 => 'info', + 6 => 'warning', + 7 => 'danger' + ]; + + + public function shopping_order() { return $this->belongsTo(ShoppingOrder::class); @@ -51,4 +83,17 @@ class UserAboOrder extends Model { return $this->belongsTo(UserAbo::class); } + + public function getStatusFormated(){ + return ''.$this->getStatusType().''; + } + + public function getStatusType(){ + return isset(self::$statusTypes[$this->status]) ? __('abo.'.self::$statusTypes[$this->status]) : ""; + } + + public function getStatusColor(){ + return isset(self::$statusColors[$this->status]) ? self::$statusColors[$this->status] : "default"; + } + } diff --git a/app/Models/UserBusiness.php b/app/Models/UserBusiness.php index a7171ff..0ebede7 100644 --- a/app/Models/UserBusiness.php +++ b/app/Models/UserBusiness.php @@ -119,6 +119,10 @@ use Illuminate\Database\Eloquent\Casts\AsArrayObject; * @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereSalesVolumePointsTPSum($value) * @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereSalesVolumeTPPoints($value) * @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereVersion($value) + * @property string|null $user_birthday + * @property string|null $user_phone + * @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereUserBirthday($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserBusiness whereUserPhone($value) * @mixin \Eloquent */ class UserBusiness extends Model diff --git a/app/Models/UserCreditItem.php b/app/Models/UserCreditItem.php index 5599d62..e57d9d3 100644 --- a/app/Models/UserCreditItem.php +++ b/app/Models/UserCreditItem.php @@ -40,6 +40,10 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserBusinessId($value) * @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserCreditId($value) * @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereUserId($value) + * @property int|null $from_month + * @property int|null $from_year + * @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereFromMonth($value) + * @method static \Illuminate\Database\Eloquent\Builder|UserCreditItem whereFromYear($value) * @mixin \Eloquent */ class UserCreditItem extends Model diff --git a/app/Models/UserHistory.php b/app/Models/UserHistory.php index 771ad62..c9b4db5 100644 --- a/app/Models/UserHistory.php +++ b/app/Models/UserHistory.php @@ -42,6 +42,8 @@ use App\User; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserHistory whereIdentifier($value) * @property int|null $abo_options * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserHistory whereAboOptions($value) + * @property int|null $is_abo + * @method static \Illuminate\Database\Eloquent\Builder|UserHistory whereIsAbo($value) * @mixin \Eloquent */ class UserHistory extends Model diff --git a/app/Models/UserShop.php b/app/Models/UserShop.php index 7351c56..e1169d6 100644 --- a/app/Models/UserShop.php +++ b/app/Models/UserShop.php @@ -65,6 +65,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop withTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop withoutTrashed() * @method static \Illuminate\Database\Eloquent\Builder|UserShop withUniqueSlugConstraints(\Illuminate\Database\Eloquent\Model $model, string $attribute, array $config, string $slug) + * @property array|null $trans + * @method static \Illuminate\Database\Eloquent\Builder|UserShop whereTrans($value) * @mixin \Eloquent */ class UserShop extends Model @@ -87,7 +89,7 @@ class UserShop extends Model protected $dates = ['deleted_at']; use Sluggable; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Models/UserShopOnSite.php b/app/Models/UserShopOnSite.php index 43f0f22..0e147d5 100644 --- a/app/Models/UserShopOnSite.php +++ b/app/Models/UserShopOnSite.php @@ -46,7 +46,7 @@ class UserShopOnSite extends Model 'user_shop_id', 'filename', 'original_name', 'ext', 'mine', 'size' ]; - public function sluggable() + public function sluggable() : array { return [ 'slug' => [ diff --git a/app/Policies/AppServiceProvider.php b/app/Policies/AppServiceProvider.php deleted file mode 100755 index d1f2928..0000000 --- a/app/Policies/AppServiceProvider.php +++ /dev/null @@ -1,72 +0,0 @@ -can('view-any-' . $this->getModelClass()); - } - - public function view(User $user, Model $model) - { - if ($user->can('view-' . $this->getModelClass())) { - return true; - } - - if ($user->can('view-self-' . $this->getModelClass())) { - return $this->isOwner($user, $model); - } - - return false; - } - - public function create(User $user) - { - return $user->can('create-' . $this->getModelClass()); - } - - public function update(User $user, Model $model) - { - if ($user->can('update-' . $this->getModelClass())) { - return true; - } - - if ($user->can('update-self-' . $this->getModelClass())) { - return $this->isOwner($user, $model); - } - - return false; - } - - public function delete(User $user, Model $model) - { - if ($user->can('delete-' . $this->getModelClass())) { - return true; - } - - if ($user->can('delete-self-' . $this->getModelClass())) { - return $this->isOwner($user, $model); - } - - return false; - } - - private function isOwner(User $user, Model $model): bool - { - if (!empty($user) && method_exists($model, 'user')) { - return $user->getKey() === $model->getRelation('user')->getKey(); - } - - return false; - } -} \ No newline at end of file diff --git a/app/Repositories/AboRepository.php b/app/Repositories/AboRepository.php new file mode 100644 index 0000000..188e9cb --- /dev/null +++ b/app/Repositories/AboRepository.php @@ -0,0 +1,89 @@ +model = $model; + } + + + public function setModel(UserAbo $model){ + $this->model = $model; + } + + public function update($data) + { + if(isset($data['action'])){ + if($data['action'] === 'abo_update_settings'){ + if($this->validate($data)){ + $this->updateStatus($data); + $this->model->abo_interval = $data['abo_interval']; + $this->model->next_date = AboHelper::setNextDate(now(), $data['abo_interval']); + $this->model ->save(); + \Session()->flash('alert-success', 'Einstellungen gespeichert'); + return true; + } + return false; + } + } + return false; + } + + public function create($data){ + + } + + private function updateStatus($data){ + + $active = (isset($data['abo_is_active']) && $data['abo_is_active']) ? true : false; + //if status is active and active is false, set status to inactive + if($this->model->active && !$active){ + if($this->model->status = 2){ //okay + $this->model->status = 6; // + } + } + if(!$this->model->active && $active){ + if($this->model->status = 6){ //inactive + $this->model->status = 2; //okay + } + } + $this->model->active = $active; + return; + } + + private function validate($data){ + if($data['view'] !== 'admin'){ + if($this->model->is_for === 'me' && $this->model->user_id !== \Auth::user()->id){ + \Session()->flash('alert-error', 'Unauthorized action. User ID does not match.'); + return false; + } + if($this->model->is_for === 'ot' && $this->model->member_id !== \Auth::user()->id){ + \Session()->flash('alert-error', 'Unauthorized action. User ID does not match.'); + return false; + } + if($data['view'] === 'me' && $this->model->is_for !== 'me'){ + \Session()->flash('alert-error', 'Unauthorized action. Is not for me'); + return false; + } + if($data['view'] === 'ot' && $this->model->is_for !== 'ot'){ + \Session()->flash('alert-error', 'Unauthorized action. Is not your customer'); + return false; + } + } + if(!in_array($data['abo_interval'], \App\Models\UserAbo::$aboDeliveryDays)){ + //to check if user is not admin + \Session()->flash('alert-error', __('abo.error_abo_interval')); + return false; + } + return true; + } + +} \ No newline at end of file diff --git a/app/Repositories/CheckoutRepository.php b/app/Repositories/CheckoutRepository.php new file mode 100644 index 0000000..75e0288 --- /dev/null +++ b/app/Repositories/CheckoutRepository.php @@ -0,0 +1,376 @@ +session = $session; + $this->instance = sprintf('%s.%s', 'cart', 'payments'); + } + + public function makeShoppingOrder($shopping_user, $data){ + + $user_shop = Util::getUserShop(); + + if($shopping_user->is_from === 'homeparty'){ + //get data + $homeparty = Homeparty::find($shopping_user->homeparty_id); + //set Data! + $total = Yard::instance('shopping')->total(2, '.', ''); //ek_price + $data = [ + 'shopping_user_id' => $shopping_user->id, + 'auth_user_id' => $shopping_user->auth_user_id, + 'country_id' => Yard::instance('shopping')->getShippingCountryId(), + 'language' => \App::getLocale(), + 'user_shop_id' => $user_shop->id, + 'payment_for' => $shopping_user->getOrderPaymentFor(), + 'homeparty_id' => $shopping_user->homeparty_id, + 'total' => $total, + 'subtotal' => $homeparty->order['ek_price_net'], + 'shipping' => $homeparty->order['shipping_price'], + 'shipping_net' => $homeparty->order['shipping_price_net'], + 'subtotal_ws' => 0, + 'tax' => $total - $homeparty->order['ek_price_net'], + 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), + 'points' => $homeparty->order['points'] - $homeparty->order['bonus_points_diff'], + 'weight' => 0, + 'txaction' => 'prev', + 'mode' => Util::getUserShoppingMode(), + ]; + }elseif($shopping_user->is_from === 'collection'){ + //get data + $ShoppingCollectOrder = ShoppingCollectOrder::find($shopping_user->shopping_collect_order_id); + //set Data! + $total = Yard::instance('shopping')->total(2, '.', ''); //ek_price + $data = [ + 'shopping_user_id' => $shopping_user->id, + 'auth_user_id' => $shopping_user->auth_user_id, + 'country_id' => Yard::instance('shopping')->getShippingCountryId(), + 'language' => \App::getLocale(), + 'user_shop_id' => $user_shop->id, + 'payment_for' => $shopping_user->getOrderPaymentFor(), + 'total' => $total, + 'subtotal' => $ShoppingCollectOrder->price_total_net, + 'shipping' => 0, + 'shipping_net' => 0, + 'subtotal_ws' => $ShoppingCollectOrder->price_total_net, + 'tax' => $ShoppingCollectOrder->tax_total, + 'tax_split' => $ShoppingCollectOrder->tax_split, + 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), + 'points' => $ShoppingCollectOrder->points, + 'weight' => 0, + 'txaction' => 'prev', + 'mode' => Util::getUserShoppingMode(), + ]; + }else{ + $data = [ + 'shopping_user_id' => $shopping_user->id, + 'auth_user_id' => $shopping_user->auth_user_id, + 'country_id' => Yard::instance('shopping')->getShippingCountryId(), + 'language' => \App::getLocale(), + 'user_shop_id' => $user_shop->id, + 'payment_for' => $shopping_user->getOrderPaymentFor(), + 'total' => Yard::instance('shopping')->total(2, '.', ''), + 'subtotal' => Yard::instance('shopping')->subtotal(2, '.', ''), + 'shipping' => Yard::instance('shopping')->shipping(2, '.', ','), + 'shipping_net' => Yard::instance('shopping')->shippingNet(2, '.', ''), + 'subtotal_ws' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''), + 'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''), + 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), + 'points' => Yard::instance('shopping')->points(), + 'weight' => Yard::instance('shopping')->weight(), + 'is_abo' => isset($data['is_abo']) ? $data['is_abo'] : false, + 'abo_interval' => isset($data['abo_interval']) ? $data['abo_interval'] : null, + 'txaction' => 'prev', + 'mode' => Util::getUserShoppingMode(), + ]; + } + + $shopping_order= false; + if($this->getSessionPayments('shopping_order_id')){ + $shopping_order = ShoppingOrder::find($this->getSessionPayments('shopping_order_id')); + if($shopping_order){ + $shopping_order->fill($data); + $shopping_order->save(); + } + } + if(!$shopping_order){ + $shopping_order = ShoppingOrder::create($data); + if($shopping_user->is_from === 'collection' && $ShoppingCollectOrder){ + $ShoppingCollectOrder->shopping_order_id = $shopping_order->id; + $ShoppingCollectOrder->save(); + } + } + $this->putSessionPayments('shopping_order_id', $shopping_order->id); + + $items = Yard::instance('shopping')->getContentByOrder(); + $shopping_order->shopping_order_items()->each(function($model) use ($items, $shopping_order, $shopping_user) { + foreach ($items as $item) { + if ($model->row_id === $item->rowId) { + $price_net = Yard::instance('shopping')->rowPriceNet($item, 2, '.', ''); + $tax = $item->price - $price_net; + $data = [ + 'shopping_order_id' => $shopping_order->id, + 'row_id' => $item->rowId, + 'product_id' => $item->id, + 'comp' => $item->options->comp, + 'qty' => $item->qty, + 'price' => $item->price, + 'price_net' => $price_net, + 'tax_rate' => $item->taxRate, + 'tax' => $tax, + 'price_vk_net' => $shopping_order->getPriceVkNetBy($item->id), + 'discount' => $item->options->no_commission ? 0 : $shopping_order->getUserDiscount(), + 'points' => $item->options->points, + 'slug' => $item->options->slug, + ]; + if($shopping_user->is_from === 'homeparty'){ + $data['homeparty_id'] = (int) $shopping_user->homeparty_id; + $data['product_id'] = null; + } + if($shopping_user->is_from === 'collection'){ + $data['shopping_collect_order_id'] = (int) $shopping_user->shopping_collect_order_id; + $data['product_id'] = null; + } + $model->fill($data)->save(); + return false; + } + } + return $model->delete(); + }); + foreach ($items as $item) { + if (!ShoppingOrderItem::where('shopping_order_id', $shopping_order->id)->where('row_id', $item->rowId)->count()){ + + $price_net = Yard::instance('shopping')->rowPriceNet($item, 2, '.', ''); + $tax = $item->price - $price_net; + + $data = [ + 'shopping_order_id' => $shopping_order->id, + 'row_id' => $item->rowId, + 'product_id' => $item->id, + 'comp' => $item->options->comp, + 'qty' => $item->qty, + 'price' => $item->price, + 'price_net' => $price_net, + 'tax_rate' => $item->taxRate, + 'tax' => $tax, + 'price_vk_net' => $shopping_order->getPriceVkNetBy($item->id), + 'discount' => $item->options->no_commission ? 0 : $shopping_order->getUserDiscount(), + 'points' => $item->options->points, + 'slug' => $item->options->slug + ]; + + if($shopping_user->is_from === 'homeparty'){ + $data['homeparty_id'] = (int) $shopping_user->homeparty_id; + $data['price_vk_net'] = 0; + $data['product_id'] = null; + } + if($shopping_user->is_from === 'collection'){ + $data['price_vk_net'] = 0; + $data['shopping_collect_order_id'] = (int) $shopping_user->shopping_collect_order_id; + $data['product_id'] = null; + } + $shopping_order_item = ShoppingOrderItem::create($data); + } + } + if($shopping_user->is_from === 'homeparty'){ + $shopping_order->makeHomepartyTaxSplit(); + }elseif($shopping_user->is_from === 'collection'){ + //is set on create / filll. + }else{ + $shopping_order->makeTaxSplit(); + } + return $shopping_order; + } + public function makeShoppingUser($data){ + + $data['same_as_billing'] = isset($data['same_as_billing']) ? false : true; //reinvert + $data['accepted_data_checkbox'] = isset($data['accepted_data_checkbox']) ? true : false; + $shopping_user = false; + if($this->getSessionPayments('shopping_user_id')){ + $shopping_user = ShoppingUser::find($this->getSessionPayments('shopping_user_id')); + if($shopping_user){ + $shopping_user->fill($data); + $shopping_user->mode = null; + $shopping_user->save(); + } + } + if(!$shopping_user){ + $shopping_user = ShoppingUser::create($data); + } + $this->putSessionPayments('shopping_user_id', $shopping_user->id); + + return $shopping_user; + } + + public function getPaymentsMethods($is_from, $is_abo = false){ + $payment_methods = []; + if($is_from !== 'shopping' && Util::getAuthUser()){ + $user = Util::getAuthUser(); + $payment_methods['default'] = $user->payment_methods; + $payment_methods['data'] = $user->account->payment_data; + }else{ + $payment_methods['default'] = PaymentMethod::getDefaultAsArray($is_abo)->toArray(); + $payment_methods['data'] = false; + } + if($is_abo){ + $payment_methods['active'] = \App\Models\PaymentMethod::where('active', true)->where('is_abo', true)->get()->pluck( 'id', 'short')->toArray(); + }else{ + $payment_methods['active'] = \App\Models\PaymentMethod::where('active', true)->get()->pluck( 'id', 'short')->toArray(); + } + return $payment_methods; + } + + public function isPaymentsMethodsActive($payment_method, $is_from, $is_abo = false){ + $payment_names = ['wlt#PPE' => 'PP', 'cc' => 'CC', 'sb#PNT' => 'SB', 'elv' => 'SEPA', 'vor' => 'VOR', 'fnc#MIV' => 'FNC']; + $payment_methods = $this->getPaymentsMethods($is_from, $is_abo); + if(isset($payment_names[$payment_method])){ + $payment_with = $payment_names[$payment_method]; + if(array_key_exists($payment_with, $payment_methods['active']) && in_array($payment_methods['active'][$payment_with], $payment_methods['default'])){ + return true; + } + } + abort(404); + } + + public function makeCustomerShoppingUser($shopping_data){ + // $shopping_user = ShoppingUser::findOrFail($shopping_data['shopping_user_id']); + $shopping_user = new ShoppingUser(); + $shopping_user->fill($shopping_data); + $shopping_user->faker_mail = false; + $shopping_user->auth_user_id = null; + $shopping_user->homeparty_id = null; + $shopping_user->same_as_billing = $shopping_user->same_as_billing ? false : true; //reinvert + // $shopping_user->id = null; + $shopping_user->accepted_data_checkbox = 1; + return $shopping_user; + + } + + public function shoppingUserAuthData($is_from, $is_for, $data = []){ + + $user = Util::getAuthUser(); + $shopping_user = new ShoppingUser(); + $shopping_user->auth_user_id = $user->id; + $shopping_user->mode = 'prev'; + $shopping_user->language = \App::getLocale(); + + $shopping_user->billing_salutation = $user->account->salutation; + $shopping_user->billing_company = $user->account->company; + $shopping_user->billing_firstname = $user->account->first_name; + $shopping_user->billing_lastname = $user->account->last_name; + $shopping_user->billing_address = $user->account->address; + $shopping_user->billing_address_2 = $user->account->address_2; + $shopping_user->billing_zipcode = $user->account->zipcode; + $shopping_user->billing_city = $user->account->city; + $shopping_user->billing_country_id = $user->account->country_id; + $shopping_user->billing_phone = $user->account->phone; + $shopping_user->billing_email = $user->email; + $shopping_user->faker_mail = false; + $shopping_user->shipping_email = $user->email; + + $shopping_user->accepted_data_checkbox = 1; + $shopping_user->is_for = $is_for; + $shopping_user->is_from = $is_from; + $shopping_user->homeparty_id = isset($data['homeparty_id']) ? $data['homeparty_id'] : null; + $shopping_user->shopping_collect_order_id = isset($data['shopping_collect_order_id']) ? $data['shopping_collect_order_id'] : null; + + //Lieferadresse + if($is_from === 'user_order'){ + if(isset($data['shopping_user_id']) && strpos($data['is_for'], 'ot') !== false){ + $s_user = ShoppingUser::findOrFail($data['shopping_user_id']); + /* $shopping_user->billing_salutation = $s_user->billing_salutation; + $shopping_user->billing_company = $s_user->billing_company; + $shopping_user->billing_firstname = $s_user->billing_firstname; + $shopping_user->billing_lastname = $s_user->billing_lastname; + $shopping_user->billing_address = $s_user->billing_address; + $shopping_user->billing_address_2 = $s_user->billing_address_2; + $shopping_user->billing_zipcode = $s_user->billing_zipcode; + $shopping_user->billing_city = $s_user->billing_city; + $shopping_user->billing_country_id = $s_user->billing_country_id; + $shopping_user->billing_phone = $s_user->billing_phone; + $shopping_user->billing_email = $s_user->billing_email; + ;*/ + $shopping_user->faker_mail = $s_user->faker_mail; + if(!$s_user->faker_mail){ + $shopping_user->shipping_email = $s_user->billing_email; + } + $shopping_user->shopping_user_id = $data['shopping_user_id']; + $shopping_user->member_id = $s_user->member_id; + } + $shopping_user->same_as_billing = true; + $shopping_user->shipping_salutation = isset($data['shipping_salutation']) ? $data['shipping_salutation'] : ''; + $shopping_user->shipping_company = isset($data['shipping_company']) ? $data['shipping_company'] : ''; + $shopping_user->shipping_firstname = isset($data['shipping_firstname']) ? $data['shipping_firstname'] : ''; + $shopping_user->shipping_lastname = isset($data['shipping_lastname']) ? $data['shipping_lastname'] : ''; + $shopping_user->shipping_address = isset($data['shipping_address']) ? $data['shipping_address'] : ''; + $shopping_user->shipping_address_2 = isset($data['shipping_address_2']) ? $data['shipping_address_2'] : ''; + $shopping_user->shipping_zipcode = isset($data['shipping_zipcode']) ? $data['shipping_zipcode'] : ''; + $shopping_user->shipping_city = isset($data['shipping_city']) ? $data['shipping_city'] : ''; + $shopping_user->shipping_country_id = Yard::instance('shopping')->getShippingCountryCountryId(); + $shopping_user->shipping_phone = isset($data['shipping_phone']) ? $data['shipping_phone'] : ''; + + }else{ + $shopping_user->same_as_billing = $user->account->same_as_billing ? false : true; + $shopping_user->shipping_salutation = $user->account->shipping_salutation; + $shopping_user->shipping_company = $user->account->shipping_company; + $shopping_user->shipping_firstname = $user->account->shipping_firstname; + $shopping_user->shipping_lastname = $user->account->shipping_lastname; + $shopping_user->shipping_address = $user->account->shipping_address; + $shopping_user->shipping_address_2 = $user->account->shipping_address_2; + $shopping_user->shipping_zipcode = $user->account->shipping_zipcode; + $shopping_user->shipping_city = $user->account->shipping_city; + $shopping_user->shipping_country_id = $user->account->shipping_country_id; + $shopping_user->shipping_phone = $user->account->shipping_phone; + } + + return $shopping_user; + } + + public function putSessionPayments($key, $value){ + $content = $this->getContent(); + $content->put($key, $value); + $this->session->put($this->instance, $content); + + } + + public function getSessionPayments($key){ + + $content = $this->getContent(); + if ($content->has($key)){ + return $content->get($key); + } + return false; + } + + public function sessionDestroy() + { + $this->session->remove($this->instance); + } + + private function getContent() + { + if (is_null($this->session->get($this->instance))) { + return new Collection([]); + } + return $this->session->get($this->instance); + } +} \ No newline at end of file diff --git a/app/Repositories/DC/FileRepository.php b/app/Repositories/DC/FileRepository.php index 054f432..b274e71 100644 --- a/app/Repositories/DC/FileRepository.php +++ b/app/Repositories/DC/FileRepository.php @@ -2,24 +2,36 @@ namespace App\Repositories\DC; -use Imagick; -use Request; + use App\Models\DcFile; use App\Services\Util; use App\Models\DcFileTag; use App\Repositories\BaseRepository; use Intervention\Image\Facades\Image; - +use Imagick; class FileRepository extends BaseRepository { + private const ALLOWED_IMAGE_TYPES = [ + 'image/jpeg', + 'image/gif', + 'image/png' + ]; + + private const ALLOWED_PDF_TYPES = [ + 'application/pdf' + ]; - public function __construct() - { - } + private const THUMB_WIDTH = 542; + private const THUMB_HEIGHT = 360; + private const BIG_WIDTH = 1600; + private const BIG_HEIGHT = 900; - public function uploadFile( $form_data ) + public function uploadFile(array $form_data): DcFile { + if (!isset($form_data['file']) || !$form_data['file']->isValid()) { + throw new \InvalidArgumentException('Invalid file provided'); + } $file = $form_data['file']; $originalName = $file->getClientOriginalName(); $extension = $file->getClientOriginalExtension(); @@ -43,109 +55,163 @@ class FileRepository extends BaseRepository { return $dc_file; } - public function makeThumb($id){ + public function makeThumb(int $id): bool + { $file = DcFile::findOrFail($id); $this->makeThumbFromFile($file); + return true; } - public function makeThumbFromFile($file) + public function makeThumbFromFile(DcFile $file): bool { - $path = $file->getFile(true); - $filename = $file->filename; - $mine = \File::mimeType($path); - //make thumb - $allowedMimeTypes = ['image/jpeg','image/gif','image/png']; - if (in_array($mine, $allowedMimeTypes)) { - $img = Image::make($path); - $img->resize(542, 360, function ($c) { - $c->aspectRatio(); - $c->upsize(); - }); - \Storage::disk('public')->put('dc/thumb/'.basename($filename), (string) $img->encode()); - - $img = Image::make($path); - $img->resize(1600, 900, function ($c) { - $c->aspectRatio(); - $c->upsize(); - }); - \Storage::disk('public')->put('dc/big/'.basename($filename), (string) $img->encode()); - } - - $allowedMimeTypes = ['application/pdf']; - if (in_array($mine, $allowedMimeTypes)) { - $imagick = new \Imagick ($path.'[0]'); // 0 specifies the first page of the pdf - $imagick->setImageBackgroundColor('#ffffff'); - $imagick = $imagick->mergeImageLayers( Imagick::LAYERMETHOD_FLATTEN ); - $imagick->setImageFormat('jpg'); // set the format of the output image - $imagick->setImageCompression(\Imagick::COMPRESSION_JPEG); - $imagick->setImageCompressionQuality(60); - - $imagick->resizeImage(1600, 900, \Imagick::FILTER_LANCZOS, 1,1); - $filestore = \Storage::disk('public')->path('dc/big/').basename($filename).".jpg"; - $imagick->writeImage($filestore); - - $imagick->resizeImage(542, 360, \Imagick::FILTER_LANCZOS, 1,1); - $filestore = \Storage::disk('public')->path('dc/thumb/').basename($filename).".jpg"; - $imagick->writeImage($filestore); - - } - - return true; - } - - public function tagsUpdate($id, $tags){ - $file = DcFile::findOrFail($id); - $file_tags = DcFileTag::where('file_id', $file->id)->get(); - - //remove Tags - foreach ($file_tags as $file_tag) { - if(is_array($tags) && ($pos = array_search($file_tag->tag_id, $tags)) !== FALSE){ - unset($tags[$pos]); - }else{ - $file_tag->delete(); + try { + $path = $file->getFile(true); + if (!file_exists($path)) { + throw new \Exception('File not found'); } - } - //set taTagsgs - if(is_array($tags)){ - foreach ($tags as $key => $tag_id) { - DcFileTag::create([ - 'file_id' => $file->id, - 'tag_id' => $tag_id - ]); - } - } + + $filename = $file->filename; + $mime = \File::mimeType($path); + + if (in_array($mime, self::ALLOWED_IMAGE_TYPES)) { + $this->processImage($path, $filename); + } elseif (in_array($mime, self::ALLOWED_PDF_TYPES)) { + $this->processPdf($path, $filename); + } + + return true; + } catch (\Exception $e) { + \Log::error('Thumbnail creation failed: ' . $e->getMessage()); + return false; + } + } + + private function processImage(string $path, string $filename): void + { + // Thumbnail + $img = Image::make($path); + $img->resize(542, 360, function ($c) { + $c->aspectRatio(); + $c->upsize(); + }); + \Storage::disk('public')->put('dc/thumb/'.basename($filename), (string) $img->encode()); + + // Big image + $img = Image::make($path); + $img->resize(1600, 900, function ($c) { + $c->aspectRatio(); + $c->upsize(); + }); + \Storage::disk('public')->put('dc/big/'.basename($filename), (string) $img->encode()); + } + + private function processPdf(string $path, string $filename): void + { + try { + // PDF mit höherer Auflösung rendern + $imagick = new \Imagick(); + $imagick->setResolution(300, 300); + $imagick->readImage($path.'[0]'); + + // Grundlegende Bildoptimierungen + $imagick->setImageBackgroundColor('#ffffff'); + $imagick->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN); + $imagick->setImageFormat('jpg'); + $imagick->setImageCompression(\Imagick::COMPRESSION_JPEG); + $imagick->setImageCompressionQuality(80); + + // Große Version erstellen + $bigImage = clone $imagick; + $bigImage->resizeImage(self::BIG_WIDTH, self::BIG_HEIGHT, \Imagick::FILTER_LANCZOS, 1, true); + $bigImage->writeImage(\Storage::disk('public')->path('dc/big/').basename($filename).'.jpg'); + $bigImage->clear(); + + // Thumbnail erstellen + $imagick->resizeImage(self::THUMB_WIDTH, self::THUMB_HEIGHT, \Imagick::FILTER_LANCZOS, 1, true); + $imagick->writeImage(\Storage::disk('public')->path('dc/thumb/').basename($filename).'.jpg'); + + // Ressourcen freigeben + $imagick->clear(); + } catch (\ImagickException $e) { + \Log::error('PDF Verarbeitung fehlgeschlagen: ' . $e->getMessage()); + throw new \RuntimeException('PDF Verarbeitung fehlgeschlagen: ' . $e->getMessage()); + } finally { + if (isset($bigImage)) { + $bigImage->destroy(); + } + if (isset($imagick)) { + $imagick->destroy(); + } + } + } + + public function tagsUpdate($id, array $tags = []): bool + { + $file = DcFile::findOrFail($id); + + // Get existing tags + $existingTags = DcFileTag::where('file_id', $file->id) + ->pluck('tag_id') + ->toArray(); + + // Delete removed tags + $tagsToDelete = array_diff($existingTags, $tags); + if (!empty($tagsToDelete)) { + DcFileTag::where('file_id', $file->id) + ->whereIn('tag_id', $tagsToDelete) + ->delete(); + } + + // Add new tags + $tagsToAdd = array_diff($tags, $existingTags); + $newTags = []; + foreach ($tagsToAdd as $tagId) { + $newTags[] = [ + 'file_id' => $file->id, + 'tag_id' => $tagId + ]; + } + + if (!empty($newTags)) { + DcFileTag::insert($newTags); + } + return true; } - public function deleteThumb($id){ - $file = DcFile::findOrFail($id); - $path_thumb = $file->getThumb(true); - if (file_exists($path_thumb)) { - unlink($path_thumb); - } - $path_big = $file->getBig(true); - if (file_exists($path_big)) { - unlink($path_big); - } - return true; - } - - public function deleteFile($id){ - $file = DcFile::findOrFail($id); - $path_thumb = $file->getThumb(true); - if (file_exists($path_thumb)) { - unlink($path_thumb); - } - $path_big = $file->getBig(true); - if (file_exists($path_big)) { - unlink($path_big); - } - $path = $file->getFile(true); + private function deleteFileIfExists(string $path): void + { if (file_exists($path)) { unlink($path); } - $file->delete(); - return true; + } + + public function deleteThumb($id): bool + { + try { + $file = DcFile::findOrFail($id); + $this->deleteFileIfExists($file->getThumb(true)); + $this->deleteFileIfExists($file->getBig(true)); + return true; + } catch (\Exception $e) { + \Log::error('Thumbnail deletion failed: ' . $e->getMessage()); + return false; + } + } + + public function deleteFile(int $id): bool + { + try { + $file = DcFile::findOrFail($id); + $this->deleteFileIfExists($file->getThumb(true)); + $this->deleteFileIfExists($file->getBig(true)); + $this->deleteFileIfExists($file->getFile(true)); + $file->delete(); + return true; + } catch (\Exception $e) { + \Log::error('File deletion failed: ' . $e->getMessage()); + return false; + } } } \ No newline at end of file diff --git a/app/Repositories/FileRepository.php b/app/Repositories/FileRepository.php index d64f497..1880879 100644 --- a/app/Repositories/FileRepository.php +++ b/app/Repositories/FileRepository.php @@ -89,47 +89,5 @@ class FileRepository extends BaseRepository { ], 200); } - /* public function createFile(Request $request) - { - $locale = \App::getLocale(); - $data = [ - 'step' => 2, - 'locale' => $locale, - ]; - $rules = array( - 'network_name' => 'required|max:255', - 'input_file_now' => 'required|mimes:png,pdf,jpg,jpeg|max:30000' - ); - $validator = Validator::make(Request::all(), $rules); - - if ($validator->fails()) { - // get the error messages from the validator - $messages = $validator->messages(); - // redirect our user back to the form with the errors from the validator - return view('user.register_complete', $data)->withErrors($validator); - - } else { - $user = \Auth::user(); - if(!$user->account->network_name){ - $file = request()->file('input_file_now'); - //$ext = $file->guessClientExtension(); - //$file->storeAs('user/' . $user->id .'/verification'); - $data = $file->store('user/' . $user->id .'/verification'); - $account = $user->account; - $account->network_name = Input::get('network_name'); - $account->network_verification = basename($data); - $account->save(); - - $user->role_id = 2; //set as User by default! - $user->save(); - - - } - - return redirect('complete_register'); - //return view('user.register_complete', $data); - } - }*/ - } \ No newline at end of file diff --git a/app/Repositories/ProductRepository.php b/app/Repositories/ProductRepository.php index 69c39c1..7e577dc 100644 --- a/app/Repositories/ProductRepository.php +++ b/app/Repositories/ProductRepository.php @@ -34,12 +34,12 @@ class ProductRepository extends BaseRepository { $data['sponsor_buying_points'] = isset($data['sponsor_buying_points']) ? 1 : 0; $data['show_on'] = isset($data['show_on']) ? $data['show_on'] : null; - if($data['id'] === "new"){ $this->model = Product::create($data); } else{ $this->model = $this->getById($data['id']); + $this->model->slug = null; $this->model->fill($data); $this->model->save(); } diff --git a/app/Services/AboHelper.php b/app/Services/AboHelper.php index dfcca27..823bff7 100644 --- a/app/Services/AboHelper.php +++ b/app/Services/AboHelper.php @@ -1,48 +1,158 @@ 'paymend_paid', + 'appointed' => 'paymend_open', + 'failed' => 'paymend_failed', + 'extern' => 'extern_open', //offen + 'extern_paid' => 'extern_paid', + 'invoice_open' => 'invoice_open', + 'invoice_paid' => 'invoice_paid', + 'invoice_non' => 'invoice_no_payment', + 'NULL' => 'no_payment', + ]; + + public static function userHasAbo(User $user){ + $user = $user ? $user : \Auth::user(); + return UserAbo::where('user_id', $user->id)->where('is_for', 'me')->where('status', '>', 1)->first() === null ? false : true; + } + + public static function memberHasAbo(ShoppingUser $shopping_user){ + if(!$shopping_user){ + return false; + } + return UserAbo::where('email', $shopping_user->billing_email)->where('is_for', 'ot')->where('status', '>', 1)->first() === null ? false : true; + } + + public static function hasAboByEmail($email){ + return UserAbo::where('email', $email)->where('status', '>', 1)->first() === null ? false : true; + } + + public static function setAboStatus(ShoppingOrder $shopping_order, $status){ + $user_abo = $shopping_order->getUserAbo(); + if($user_abo && $user_abo->status < 2){ //status < 2 is not active + $user_abo->update(['status' => $status]); + } + UserAboOrder::where('user_abo_id', $user_abo->id)->where('shopping_order_id', $shopping_order->id)->update(['status' => $status]); + } + public static function setAboActive(ShoppingOrder $shopping_order, $status){ + self::setAboStatus($shopping_order, $status); + + //delete UserAbo is not active status = 1 + //is_for = me + UserAbo::where('user_id', $shopping_order->auth_user_id)->where('is_for', 'me')->where('status', 1)->delete(); + //is_for = ot + UserAbo::where('member_id', $shopping_order->member_id)->where('email', $shopping_order->shopping_user->billing_email)->where('is_for', 'ot')->where('status', 1)->delete(); + + } + + public static function aboHasBaseProduct($yard_products){ + foreach($yard_products as $product){ + if(is_array($product->options->show_on)){ + if(in_array('12', $product->options->show_on)){ + return true; + } + } + } + return false; + } + public static function getAboShowOn(Product $product){ + $show_on = $product->show_on; + if(in_array('12', $show_on)){ + return 'base'; + } + if(in_array('13', $show_on)){ + return 'upgrade'; + } + return false; + } + public static function getAboTypeBadge($abo_type){ + if($abo_type === 'base'){ + return ' '.__('abo.'.$abo_type).''; + } + if($abo_type === 'upgrade'){ + return ' '.__('abo.'.$abo_type).''; + } + return ''; + } + + public static function setNextDate($date, $abo_interval){ + $nextDate = Carbon::parse($date)->firstOfMonth(); + $nextDate->addDays($abo_interval-1); + return $nextDate->gt($date) ? $nextDate : $nextDate->addMonth(1); + } + public static function createNewAbo(ShoppingPayment $shopping_payment){ + //is Abo - create init Abo from PP or else + if($shopping_payment->shopping_order->is_abo && $shopping_payment->shopping_order->abo_interval > 0){ + $payment_transaction = $shopping_payment->payment_transactions->last(); - $payment_transaction = $shopping_payment->payment_transactions->last(); - $user_abo = UserAbo::create([ - 'user_id' => $shopping_payment->shopping_order->auth_user_id, - 'shopping_user_id' => $shopping_payment->shopping_order->shopping_user_id, - 'is_for' => $shopping_payment->shopping_order->shopping_user->is_for, - 'payone_userid' => $payment_transaction->userid, - 'clearingtype' => $shopping_payment->clearingtype, - 'wallettype' => $shopping_payment->wallettype, - 'amount' => $shopping_payment->amount, - 'currency' => $shopping_payment->currency, - 'status' => 1, - 'abo_interval' => $shopping_payment->abo_interval, - 'start_date' => now(), - 'last_date' => now(), - 'next_date' => now()->addWeeks($shopping_payment->abo_interval), - 'next_abo_date' => $shopping_payment->created_at->addMonths($shopping_payment->abo_interval), - 'count' => 1, - ]); - if($user_abo){ - UserAboOrder::create([ + $user_abo = UserAbo::create([ + 'user_id' => $shopping_payment->shopping_order->auth_user_id, + 'member_id' => $shopping_payment->shopping_order->member_id, + 'shopping_user_id' => $shopping_payment->shopping_order->shopping_user_id, + 'email' => $shopping_payment->shopping_order->shopping_user->billing_email, + 'is_for' => $shopping_payment->shopping_order->shopping_user->is_for, + 'payone_userid' => $payment_transaction->userid, + 'clearingtype' => $shopping_payment->clearingtype, + 'wallettype' => $shopping_payment->wallettype, + 'carddata' => $shopping_payment->carddata, + 'amount' => $shopping_payment->amount, + 'status' => 1, + 'abo_interval' => $shopping_payment->abo_interval, + 'start_date' => now(), + 'last_date' => now(), + 'next_date' => self::setNextDate(now(), $shopping_payment->abo_interval), + ]); + + if($user_abo){ + self::createAboItems($user_abo, $shopping_payment); + UserAboOrder::create([ + 'user_abo_id' => $user_abo->id, + 'shopping_order_id' => $shopping_payment->shopping_order_id, + 'status' => 1, + ]); + } + } + + } + + public static function createAboItems($user_abo, ShoppingPayment $shopping_payment){ + foreach($shopping_payment->shopping_order->shopping_order_items as $item){ + UserAboItem::create([ 'user_abo_id' => $user_abo->id, - 'shopping_order_id' => $shopping_payment->shopping_order_id, + 'product_id' => $item->product_id, + 'comp' => $item->comp ?? 0, + 'qty' => $item->qty, 'status' => 1, ]); } } + public static function getTransStatusFilterText(){ + $ret = []; + foreach(self::$txaction_filter_text as $key=>$val){ + $ret[$key] = trans('payment.'.$val); + } + return $ret; + } + } \ No newline at end of file diff --git a/app/Services/AboOrderCart.php b/app/Services/AboOrderCart.php new file mode 100644 index 0000000..b87ff88 --- /dev/null +++ b/app/Services/AboOrderCart.php @@ -0,0 +1,201 @@ +destroy(); + self::$customer_detail = self::makeCustomerDetail($user_abo); + if($user_abo->is_for === 'me'){ + self::$is_for = 'abo-me'; + if($user_abo->user && $user_abo->user->account->same_as_billing){ + $country_id = $user_abo->user->account->country_id; + }else{ + $country_id = $user_abo->user->account->shipping_country_id; + } + if($country_id && $shipping_country = ShippingCountry::whereCountryId($country_id)->first()){ + if($shipping_country->shipping && $shipping_country->shipping->active){ + UserService::initUserYard($user_abo->user, $shipping_country->id, 'abo-me'); + return true; + } + } + abort(403, 'Fehler: Versandland nicht gefunden'); + } + if($user_abo->is_for === 'ot'){ + self::$is_for = 'abo-ot-customer'; + UserService::initCustomerYard(self::$customer_detail, 'abo-ot-customer'); + return true; + + } + + return false; + + } + + public static function makeOrderYard($user_abo) + { + self::$user_abo = $user_abo; + if($user_abo->is_for === 'ot'){ + self::$is_for = 'abo-ot-customer'; + } + if($user_abo->is_for === 'me'){ + self::$is_for = 'abo-me'; + } + foreach($user_abo->user_abo_items as $abo_item){ + self::addProductToCart($abo_item); + } + Yard::instance('shopping')->reCalculateShippingPrice(); + + $user_abo->amount = Yard::instance('shopping')->totalWithShipping(2, '.', '')*100; + $user_abo->save(); + } + + private static function addProductToCart($item){ + + $product = Product::find($item->product_id); + $tax_free = Yard::instance('shopping')->getUserTaxFree(); + $user_country = Yard::instance('shopping')->getUserCountry(); + + if($product){ + if($item->comp){ + $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, 0, false, false, + ['image' => '', 'slug' => $product->slug, 'weight' => 0, 'points' => 0, + 'comp' => $item->comp, 'product_id' => $product->id]); + Yard::setTax($cartItem->rowId, 0); + return true; + } + if(self::$is_for === 'ot-customer' || self::$is_for === 'abo-ot-customer'){ + $cartItem = Yard::instance('shopping') + ->add($product->id, $product->getLang('name'), $item->qty, + round($product->getPriceWith($tax_free, false, $user_country, false, self::$user_abo->user), 1), false, false, + ['image' => '', 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]); + }else{ + $cartItem = Yard::instance('shopping') + ->add($product->id, $product->getLang('name'), $item->qty, + $product->getPriceWith($tax_free, true, $user_country, false, self::$user_abo->user), false, false, + ['image' => '', 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]); + } + if($tax_free){ + Yard::setTax($cartItem->rowId, 0); + }else{ + Yard::setTax($cartItem->rowId, $product->getTaxWith($user_country)); + } + } + } + + public static function checkNumOfCompProducts($user_abo){ + + if($user_abo->is_for === 'me'){ + $needNumComp = Yard::instance('shopping')->getNumComp(); + if($needNumComp > 0){ + $UserAboItems = UserAboItem::where('user_abo_id', $user_abo->id)->where('comp', '>', 0)->get(); + if(count($UserAboItems) === $needNumComp){ + return true; + } + + //need to add + if(count($UserAboItems) < $needNumComp){ + $product = Product::whereActive(true)->where('shipping_addon', true)->whereJsonContains('show_on', '12')->orderBy('pos', 'DESC')->first(); + for($i = count($UserAboItems); $i <= $needNumComp; $i++){ + $UserAboItem = UserAboItem::create([ + 'user_abo_id' => $user_abo->id, + 'product_id' => $product->id, + 'comp' => $i + 1, + 'qty' => 1, + 'status' => 1, + ]); + self::addProductToCart($UserAboItem); + } + } + //need to remove + if(count($UserAboItems) > $needNumComp){ + foreach($UserAboItems as $UserAboItem){ + if($UserAboItem->comp > $needNumComp){ + $UserAboItem->delete(); + } + } + foreach (Yard::instance('shopping')->content() as $row) { + if($row->options->comp > $needNumComp) { + Yard::instance('shopping')->remove($row->rowId); + } + } + } + } + } + } + + public static function getCustomerDetail(){ + return self::$customer_detail; + } + + /* Need this, can change the address */ + public static function makeCustomerDetail($user_abo){ + + if($user_abo->is_for === 'me'){ + //only on Abo! + $user = $user_abo->user; + $shopping_user = new ShoppingUser(); + $shopping_user->billing_salutation = $user->account->salutation; + $shopping_user->billing_company = $user->account->company; + $shopping_user->billing_firstname = $user->account->first_name; + $shopping_user->billing_lastname = $user->account->last_name; + $shopping_user->billing_address = $user->account->address; + $shopping_user->billing_address_2 = $user->account->address_2; + $shopping_user->billing_zipcode = $user->account->zipcode; + $shopping_user->billing_city = $user->account->city; + $shopping_user->billing_country_id = $user->account->country_id; + $shopping_user->billing_phone = $user->account->phone; + + if($user->account->same_as_billing){ + $shopping_user->shipping_salutation = $user->account->salutation; + $shopping_user->shipping_company = $user->account->company; + $shopping_user->shipping_firstname = $user->account->first_name; + $shopping_user->shipping_lastname = $user->account->last_name; + $shopping_user->shipping_address = $user->account->address; + $shopping_user->shipping_address_2 = $user->account->address_2; + $shopping_user->shipping_zipcode = $user->account->zipcode; + $shopping_user->shipping_city = $user->account->city; + $shopping_user->shipping_country_id = $user->account->country_id; + $shopping_user->shipping_phone = $user->account->phone; + }else{ + $shopping_user->shipping_salutation = $user->account->shipping_salutation; + $shopping_user->shipping_company = $user->account->shipping_company; + $shopping_user->shipping_firstname = $user->account->shipping_firstname; + $shopping_user->shipping_lastname = $user->account->shipping_lastname; + $shopping_user->shipping_address = $user->account->shipping_address; + $shopping_user->shipping_address_2 = $user->account->shipping_address_2; + $shopping_user->shipping_zipcode = $user->account->shipping_zipcode; + $shopping_user->shipping_city = $user->account->shipping_city; + $shopping_user->shipping_country_id = $user->account->shipping_country_id; + $shopping_user->shipping_phone = $user->account->shipping_phone; + } + + } + + if($user_abo->is_for === 'ot'){ + //look for the primary user of this abo + $shopping_user = $user_abo->shopping_user->replicate(); + } + return $shopping_user; + } + +} \ No newline at end of file diff --git a/app/Services/BusinessPlan/ExportBot.php b/app/Services/BusinessPlan/ExportBot.php index 0d6a936..c56b340 100644 --- a/app/Services/BusinessPlan/ExportBot.php +++ b/app/Services/BusinessPlan/ExportBot.php @@ -1,4 +1,5 @@ init_from = $init_from; } - public function initStructureUser(User $user, $order='list') //tree or list + public function initStructureUser(User $user, $order = 'list') //tree or list { $line = 0; $this->order = $order; $this->root_user = $user; - - if($this->order === 'tree'){ - $this->user_tree = $this->setUserValues($user, $line); - $this->user_tree->childs = $this->readChildUsers($this->user_tree, $line+1); - } - if($this->order === 'list'){ - $this->user_list = $this->setUserValues($user, $line); - $this->readChildUsers($this->user_list, $line+1); - } - + if ($this->order === 'tree') { + $this->user_tree = $this->setUserValues($user, $line); + $this->user_tree->childs = $this->readChildUsers($this->user_tree, $line + 1); + } + if ($this->order === 'list') { + $this->user_list = $this->setUserValues($user, $line); + $this->readChildUsers($this->user_list, $line + 1); + } } - private function readChildUsers($parent_user, $line){ + private function readChildUsers($parent_user, $line) + { $childUsers = []; $users = User::with('account')->select('users.*') @@ -55,24 +55,25 @@ class ExportBot ->where('users.active', "=", 1) ->get(); - if($users){ - foreach($users as $user){ + if ($users) { + foreach ($users as $user) { $user_values = $this->setUserValues($user, $line); - $childUsers[] = $user_values; - if($this->order === 'list'){ + $childUsers[] = $user_values; + if ($this->order === 'list') { $this->user_list->childs[] = $user_values; - $this->readChildUsers($user_values, $line+1); - } + $this->readChildUsers($user_values, $line + 1); + } } } return $childUsers; } - private function setUserValues(User $user, $line){ + private function setUserValues(User $user, $line) + { $sponsor_name = ""; - if($user->m_sponsor && $user->user_sponsor->account){ - $sponsor_name = $user->user_sponsor->account->m_first_name." ".$user->user_sponsor->account->m_last_name; + if ($user->m_sponsor && $user->user_sponsor->account) { + $sponsor_name = $user->user_sponsor->account->m_first_name . " " . $user->user_sponsor->account->m_last_name; } $obj = new stdClass(); $obj->line = $line; @@ -93,28 +94,28 @@ class ExportBot $obj->zipcode = $user->account->zipcode; $obj->city = $user->account->city; $obj->country_id = $user->account->country_id ? $user->account->country->getLocated() : ""; - $pre_phone = $user->account->pre_phone_id != "" ? $user->account->pre_phone->phone." " : ""; - $pre_mobil = $user->account->pre_mobil_id != "" ? $user->account->pre_mobil->phone." " : ""; - $obj->phone = $pre_phone.$user->account->phone; - $obj->mobil = $pre_mobil.$user->account->mobil; + $pre_phone = $user->account->pre_phone_id != "" ? $user->account->pre_phone->phone . " " : ""; + $pre_mobil = $user->account->pre_mobil_id != "" ? $user->account->pre_mobil->phone . " " : ""; + $obj->phone = $pre_phone . $user->account->phone; + $obj->mobil = $pre_mobil . $user->account->mobil; $obj->birthday = $user->account->birthday; + $obj->partner_since = $user->active_date ? $user->getActiveDateFormat(false) : ""; - if($this->order === 'tree'){ - $obj->childs = $this->readChildUsers($obj, $line+1); + if ($this->order === 'tree') { + $obj->childs = $this->readChildUsers($obj, $line + 1); } - if($this->order === 'list'){ + if ($this->order === 'list') { $obj->childs = []; } - + return $obj; } - - - public function getUser(){ + + + public function getUser() + { return $this->root_user; } - - } diff --git a/app/Services/BusinessPlan/SalesPointsVolumeHelper.php b/app/Services/BusinessPlan/SalesPointsVolumeHelper.php index 71d8e63..2c11ee7 100644 --- a/app/Services/BusinessPlan/SalesPointsVolumeHelper.php +++ b/app/Services/BusinessPlan/SalesPointsVolumeHelper.php @@ -15,7 +15,8 @@ class SalesPointsVolumeHelper line: nach reihenfolge sortiert, */ private static $business_users_line = []; - + private static $totalcommission = []; + private static $totalpoints = []; private static $cbot = null; @@ -36,7 +37,6 @@ class SalesPointsVolumeHelper $deep = 0; $ret = ""; foreach(self::$cbot->business_users as $business_user){ - $ret .= self::addTableItemStructur($business_user, $deep); } return $ret; @@ -68,7 +68,7 @@ class SalesPointsVolumeHelper
'.$pp.'
'.$item->first_name.' '.$item->last_name.' -
'.formatNumber($points, 0).' € +
'.formatNumber($points, 0).' '.formatNumber($margin, 1).' %
'.formatNumber($commission, 2).' € '.$item->user_level_name.' @@ -84,10 +84,16 @@ class SalesPointsVolumeHelper self::addTableItemLine($business_user, $deep); } foreach(self::$business_users_line as $deep => $items){ + self::$totalcommission[$deep] = 0; + self::$totalpoints[$deep] = 0; foreach($items as $item){ $ret .= self::setTableHTMLItemLine($item, $deep); } + if($deep > 0){ + $ret .= self::addTableHTMLTotalItemLine($deep, 'line'); + } } + $ret .= self::addTableHTMLTotalItemLine($deep, 'end'); return $ret; } @@ -100,6 +106,39 @@ class SalesPointsVolumeHelper } } } + private static function addTableHTMLTotalItemLine($deep, $type){ + $points = 0; + $commission = 0; + if($type == 'end'){ + $pp = '
'.__('team.PP').'
'; + $style = ' style="background-color:#d7d700;"'; + $text = __('order.total'); + foreach(self::$totalpoints as $key => $value){ + $points += $value; + $commission += self::$totalcommission[$key]; + } + + }else{ + $pp = '
'.$deep.'. '.__('team.PP').'
'; + $style = 'style="background-color:#e5e4e4"'; + $text = __('order.sum'); + $points = self::$totalpoints[$deep]; + $commission = self::$totalcommission[$deep]; + } + + + + $ret = ' +
'.$pp.'
+ '.$text.' +
'.formatNumber($points, 0).' +   +
'.formatNumber($commission, 2).' € +   + '; + + return $ret; + } private static function setTableHTMLItemLine($item, $deep){ @@ -111,6 +150,8 @@ class SalesPointsVolumeHelper $pp = '
'.$deep.'. '.__('team.PP').'
'; $margin = self::$cbot->getKeybyLine($deep, 'margin'); $commission = $points / 100 * $margin; + self::$totalcommission[$deep] += $commission; + self::$totalpoints[$deep] += $points; } // /* @@ -121,11 +162,12 @@ class SalesPointsVolumeHelper {{__('tables.commission')}} € {{ __('tables.level') }} */ + $ret = '
'.$pp.'
'.$item->first_name.' '.$item->last_name.' -
'.formatNumber($points, 0).' € +
'.formatNumber($points, 0).' '.formatNumber($margin, 1).' %
'.formatNumber($commission, 2).' € '.$item->user_level_name.' diff --git a/app/Services/CustomerPriority.php b/app/Services/CustomerPriority.php index be35c2e..ec82c57 100644 --- a/app/Services/CustomerPriority.php +++ b/app/Services/CustomerPriority.php @@ -135,8 +135,8 @@ class CustomerPriority $matches = []; $change = []; $ret = 'update'; + //email geändert - if(isset($data['billing_email']) && $shopping_user->billing_email != $data['billing_email']){ $found = ShoppingUser::where('auth_user_id', '=', NULL) ->where('number', '!=', NULL) //has number @@ -205,8 +205,10 @@ class CustomerPriority $shopping_user->member_id = $member_id; $shopping_user->number = self::nextNumber(); $shopping_user->save(); - $shopping_user->shopping_order->member_id = $member_id; - $shopping_user->shopping_order->save(); + if($shopping_user->shopping_order){ + $shopping_user->shopping_order->member_id = $member_id; + $shopping_user->shopping_order->save(); + } return true; } return false; diff --git a/app/Services/HTMLHelper.php b/app/Services/HTMLHelper.php index fa9d943..524079e 100644 --- a/app/Services/HTMLHelper.php +++ b/app/Services/HTMLHelper.php @@ -104,23 +104,22 @@ class HTMLHelper return $ret; } - public static function getAboIntervallWeeks($default = 1){ - $values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; + public static function getAboDeliveryOptions($default = 5){ + $values = \App\Models\UserAbo::$aboDeliveryDays; $ret = ""; foreach ($values as $value){ $attr = ($value == $default) ? 'selected="selected"' : ''; - $str = self::getAboWeeksLang($value); + $str = self::getAboStrLang($value); $ret .= '\n'; } return $ret; } - public static function getAboWeeksLang($num){ - if($num == 1){ - return __('order.every_week'); - } - return __('order.every_weeks', ['num' => $num]); + public static function getAboStrLang($num){ + return $num.'. '.__('abo.of_month'); } + + public static function getAttributesWithoutParents($id = false, $sameId = false, $all = true){ $values = Attribute::where('parent_id', null)->get(); $ret = ""; @@ -157,14 +156,14 @@ class HTMLHelper if($ids == null){ $ids = array(); } - $values = Product::where('active', 1)->get(); + $values = Product::all(); $ret = ""; if($all){ $ret .= '\n'; } foreach ($values as $value){ $attr = in_array($value->id, $ids) ? 'selected="selected"' : ''; - $ret .= '\n'; + $ret .= '\n'; } return $ret; } diff --git a/app/Services/OrderPaymentService.php b/app/Services/OrderPaymentService.php new file mode 100644 index 0000000..8216005 --- /dev/null +++ b/app/Services/OrderPaymentService.php @@ -0,0 +1,180 @@ +deleteStoredCart($identifier); + \App\Models\ShoppingInstance::where('identifier', $identifier)->delete(); + //delete session + /* if(\Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){ + $user_shop_identifier = \Session::get('user_shop_identifier'); + Yard::instance('shopping')->deleteStoredCart($identifier); + \App\Models\ShoppingInstance::where('identifier', $identifier)->delete(); + }*/ + } + + public static function updateInstanceStatus($identifier, $status, $lower = true){ + if(!ShoppingInstance::where('identifier', $identifier)->exists()){ + return false; + } + if($lower){ + ShoppingInstance::where('identifier', $identifier)->where('status', '<', $status) + ->update(['status' => $status]); + }else{ + ShoppingInstance::where('identifier', $identifier) + ->update(['status' => $status]); + } + } + + public static function getInstanceStatus($identifier){ + $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first(); + if(!$shopping_instance){ + return false; + } + return $shopping_instance->getStatus(); + } + + public static function getTypeBadge(ShoppingInstance $shoppingInstance){ + $isFor = $shoppingInstance->shopping_data['is_for'] ?? '-'; + if ($isFor === 'abo-ot-customer' ) { + return ' '.__('abo.abo').''; + } + if ($isFor === 'ot-customer' ) { + return ' '.__('order.order').''; + } + return ""; + } + + public static function getStatusBadge(ShoppingInstance $shoppingInstance){ + $status = $shoppingInstance->getStatus(); + $badgeClasses = [ + 'link_sent' => 'success', + 'link_openly' => 'warning', + 'link_paid' => 'secondary', + 'link_check' => 'warning', + 'link_pending' => 'warning', + 'link_appointed' => 'secondary', + 'link_failed' => 'danger', + 'link_canceled' => 'danger' + ]; + + if (isset($badgeClasses[$status])) { + return sprintf(' %s', + $badgeClasses[$status], + __('payment.' . $status) + ); + } + + return ''; + } + + public static function getStatusAlert($status){ + $badgeClasses = [ + 'link_sent' => 'success', + 'link_openly' => 'success', + 'link_check' => 'warning', + 'link_pending' => 'warning', + 'link_failed' => 'danger', + 'link_canceled' => 'danger', + 'link_appointed' => 'success', + 'link_paid' => 'success', + + ]; + + if (isset($badgeClasses[$status])) { + return sprintf('
%s
', + $badgeClasses[$status], + __('payment.alert_' . $status) + ); + } + + return ''; + } + + public static function getCustomPayment($identifier){ + + $shopping_instance = ShoppingInstance::where('identifier', $identifier)->first(); + if(!$shopping_instance){ + abort(403, __('msg.shopping_instance_not_found')); + } + $shopping_data = $shopping_instance->shopping_data; + $shopping_user = $shopping_data['shopping_user_id'] ? ShoppingUser::find($shopping_data['shopping_user_id']) : null; + if(!$shopping_user){ + abort(403, __('msg.shopping_user_not_found')); + } + $yard_shopping_items = self::getRestoredYardShoppingItems($shopping_instance); + + $data = [ + 'shopping_instance' => $shopping_instance, + 'shopping_user' => $shopping_user, + 'yard_shopping_items' => $yard_shopping_items, + 'identifier' => $identifier, + 'is_abo' => $shopping_instance->shopping_data['is_abo'] ?? false, + 'is_for' => $shopping_instance->shopping_data['is_for'] ?? false, + 'backlink' => false, + ]; + return $data; + } + + public static function getRestoredYardShoppingItems($shopping_instance){ + + Yard::instance('shopping')->destroy(); + Yard::instance('shopping')->restore($shopping_instance->identifier, [], false); + Yard::instance('shopping')->putYardExtra('user_shop_payment', $shopping_instance->payment); + + Yard::instance('shopping')->putYardExtra('shopping_data', $shopping_instance->shopping_data); + $is_for = isset($shopping_instance->shopping_data['is_for']) ? $shopping_instance->shopping_data['is_for'] : 'ot-member'; + Yard::instance('shopping')->setUserPriceInfos($shopping_instance->shopping_data['user_price_infos']); + Yard::instance('shopping')->setShippingCountryWithPrice($shopping_instance->country_id, $is_for); + + + $rows = Yard::instance('shopping')->getContentByOrder(); + $ret = []; + $ret['items'] = []; + $is_currency = Yard::instance('shopping')->isPriceCurrency(); + $tax_free = Yard::instance('shopping')->getUserTaxFree(); + + foreach($rows as $row){ + $product = \App\Models\Product::find($row->id); + $item = new \stdClass(); + $item->image = $row->options->has('image') ? $row->options->image : null; + $item->price_net = (float) Yard::instance('shopping')->rowPriceNet($row, 3, '.', ''); + $item->price_net_total = (float) Yard::instance('shopping')->rowSubtotalNet($row, 2, '.', ''); + $item->price_currency = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('rowPriceNetCurrency', $row, 3)." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; + $item->price_currency_total = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('rowSubtotalCurrency', $row, 3)." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; + $item->price = $row->price; + $item->price_total = ($row->qty * $row->price); + $item->qty = $row->qty; + $item->name = $product->name; + $item->contents = $product->contents; + $item->numbers = $product->numbers; + $item->abo_type = AboHelper::getAboShowOn($product); + $item->number = $product->number; + $item->contents = $product->contents; + $ret['items'][] = $item; + } + + $ret['tax_free'] = $tax_free; + $ret['total']['subtotal'] = Yard::instance('shopping')->subtotal(); + $ret['total']['subtotal_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('subtotal')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; + $ret['total']['shippingCountryName'] = Yard::instance('shopping')->getShippingCountryName(); + $ret['total']['shippingNet'] = Yard::instance('shopping')->shippingNet(); + $ret['total']['shippingNet currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('shippingNet')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; + $ret['total']['subtotalWithShipping'] = Yard::instance('shopping')->subtotalWithShipping(); + $ret['total']['subtotalWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('subtotalWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; + $ret['total']['taxWithShipping'] = Yard::instance('shopping')->taxWithShipping(); + $ret['total']['taxWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('taxWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; + $ret['total']['totalWithShipping'] = Yard::instance('shopping')->totalWithShipping(); + $ret['total']['totalWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('totalWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; + + return $ret; + } + +} \ No newline at end of file diff --git a/app/Services/Payment.php b/app/Services/Payment.php index c0d74ad..4d593ec 100644 --- a/app/Services/Payment.php +++ b/app/Services/Payment.php @@ -6,6 +6,7 @@ use App\User; use App\Models\UserLevel; use App\Mail\MailCheckout; use App\Services\UserUtil; +use App\Services\AboHelper; use App\Models\ProductBuying; use App\Models\ShoppingOrder; use App\Models\UserCreditItem; @@ -91,6 +92,7 @@ class Payment } public static function getShoppingOrderBadge(ShoppingOrder $shopping_order){ + if($shopping_order->mode === 'test'){ return ''.strtoupper($shopping_order->mode).' - '.self::getFormattedTxaction($shopping_order->txaction).''; } @@ -100,6 +102,14 @@ class Payment return ''.self::getFormattedTxaction($shopping_order->txaction).''; } + public static function getPaymentForBadge(ShoppingOrder $shopping_order){ + $abo = ''; + if($shopping_order->is_abo){ + $abo = ' '.__('abo.abo').''; + } + return ''.$shopping_order->getPaymentForType().''.$abo; + } + public static function getShoppingPaymentBadge(ShoppingPayment $shopping_payment){ if($shopping_payment->mode === 'test'){ return ''.strtoupper($shopping_payment->mode).' - '.self::getFormattedTxaction($shopping_payment->txaction).''; @@ -159,10 +169,10 @@ class Payment $paid = Status der Zahlung, Payone = true, MIVITA Rechnung = false damit kann später die rechnung auf bezahlt gesetzt werden. */ - public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid){ + public static function paymentStatusPaidAction(ShoppingOrder $shopping_order, $paid, $shopping_payment = null){ $send_link = false; $shopping_order->setUserHistoryValue(['status' => 8]); - Shop::userOrders(); + ShoppingUserService::snycOrdersByShoppingOrder($shopping_order); $shopping_order->paid = $paid; $shopping_order->save(); @@ -225,6 +235,7 @@ class Payment } } + if($shopping_order->homeparty){ $shopping_order->setUserHistoryValue(['status' => 9]); $shopping_order->homeparty->completed = 1; @@ -235,12 +246,24 @@ class Payment $shopping_order->setUserHistoryValue(['status' => 9]); ShopApiOrderCart::finishOrder($shopping_order->shopping_collect_order); } - - //make Invoice and - $invoice_repo = new InvoiceRepository($shopping_order); - if(!$shopping_order->isInvoice()){ - $invoice_repo->createAndSalesVolume(); + //the Order is Pay, so we can set the Status in the Abo + if($shopping_order->is_abo){ + if($shopping_payment){ + Util::setInstanceStatusByPayment($shopping_payment, 10); //link_paid + $shopping_payment->identifier = null; + $shopping_payment->save(); + } + AboHelper::setAboActive($shopping_order, 2); } + + //make Invoice is not exist and is live + if($shopping_order->mode === 'live'){ + $invoice_repo = new InvoiceRepository($shopping_order); + if(!$shopping_order->isInvoice()){ + $invoice_repo->createAndSalesVolume(); + } + } + return $send_link; } @@ -263,6 +286,7 @@ class Payment if(!$shopping_order->shopping_user->is_like && $shopping_order->shopping_user->member){ $bcc[] = $shopping_order->shopping_user->member->email; } - Mail::to($billing_email)->bcc($bcc)->locale($shopping_order->getLocale())->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $data['send_link'], $data['mode'])); + $data['payment_error'] = isset($data['payment_error']) ? $data['payment_error'] : false; + Mail::to($billing_email)->bcc($bcc)->locale($shopping_order->getLocale())->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $data['send_link'], $data['mode'], $data['payment_error'])); } } diff --git a/app/Services/PaymentHelper.php b/app/Services/PaymentHelper.php index f214795..bd6d6ad 100644 --- a/app/Services/PaymentHelper.php +++ b/app/Services/PaymentHelper.php @@ -17,7 +17,7 @@ class PaymentHelper public function setProduct($product){ Yard::instance('shopping')->destroy(); - Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->price, false, false, ['image' => "", 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission]); + Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->price, false, false, ['image' => "", 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points, 'no_commission' => $product->no_commission, 'show_on' => $product->show_on]); } public function initELVPayment($user){ diff --git a/app/Services/Shop.php b/app/Services/Shop.php index dd5668a..041e01c 100644 --- a/app/Services/Shop.php +++ b/app/Services/Shop.php @@ -1,15 +1,17 @@ where('txaction', 'paid')->OrWhere('txaction', 'appointed')->OrWhere('txaction', 'extern')->OrWhere('txaction', 'invoice_open')->OrWhere('txaction', 'invoice_paid'); - })->where('orders', '=', NULL)->get(); - foreach ($shopping_users as $shopping_user) { - if ($shopping_user->number) { - $orders = ShoppingUser::where('number', '=', $shopping_user->number)->max('orders'); - $orders = $orders + 1; - } else { - $orders = ShoppingUser::where('billing_email', '=', $shopping_user->billing_email)->max('orders'); - $orders = $orders + 1; - } - $shopping_user->orders = $orders; - $shopping_user->save(); - } + + public static function newUserOrder($number) + { + ShoppingUserService::snycOrdersByNumber($number); } - public static function newUserOrder($number){ - if($number > 0){ - $shopping_users = ShoppingUser::where('number', '=', $number)->get(); - $orders = 1; - foreach ($shopping_users as $shopping_user) { - if($shopping_user->shopping_order && ($shopping_user->shopping_order->txaction === 'paid' || - $shopping_user->shopping_order->txaction === 'appointed' || - $shopping_user->shopping_order->txaction === 'extern' || - $shopping_user->shopping_order->txaction === 'extern_paid' )){ - $shopping_user->orders = $orders++; - - }else{ - $shopping_user->orders = NULL; - } - $shopping_user->save(); - - } - } - } - - public static function getShippingCountryCountryId($shipping_country_id){ + public static function getShippingCountryCountryId($shipping_country_id) + { $shippingCountry = ShippingCountry::find($shipping_country_id); - if($shippingCountry && $shippingCountry->country){ + if ($shippingCountry && $shippingCountry->country) { return $shippingCountry->country->id; } return 1; //default DE } - public static function getCountryShippingCountryId($country_id){ + public static function getCountryShippingCountryId($country_id) + { $shippingCountry = ShippingCountry::whereCountryId($country_id)->first(); - if($shippingCountry){ + if ($shippingCountry) { return $shippingCountry->id; } return ShippingCountry::all()->first()->id; } - public static function getLangChange(){ + public static function getLangChange() + { $ret = []; $countries = Country::whereActive(true)->whereSwitch(true)->get(); $first_country = null; - foreach($countries as $country){ - $ShippingCountry = ShippingCountry::whereCountryId($country->id)->first(); - if($ShippingCountry && $ShippingCountry->shipping && $ShippingCountry->shipping->active){ - if(!$first_country){ + foreach ($countries as $country) { + $ShippingCountry = ShippingCountry::whereCountryId($country->id)->first(); + if ($ShippingCountry && $ShippingCountry->shipping && $ShippingCountry->shipping->active) { + if (!$first_country) { $first_country = $country; - } - $ret[strtolower($country->code)] = $country; - } + } + $ret[strtolower($country->code)] = $country; + } } Shop::getUserShopLang($first_country); return $ret; } - public static function getUserShopLang($country = null){ - if(\Session::has('user_shop_lang')){ - if($user_shop_lang = \Session::get('user_shop_lang')){ - return $user_shop_lang; + public static function getUserShopLang($country = null) + { + if (\Session::has('user_shop_lang')) { + if ($user_shop_lang = \Session::get('user_shop_lang')) { + return $user_shop_lang; } } - if($country){ + if ($country) { Shop::initUserShopLang($country); return strtolower($country->code); } return false; } - public static function initUserShopLang($country){ + public static function initUserShopLang($country) + { Yard::instance('shopping')->destroy(); \Session::put('user_shop_lang', strtolower($country->code)); //init Yard self::initUserShopYard($country); - } - public static function initUserShopYard($country){ + public static function initUserShopYard($country) + { //Lieferadresse im Drittland? self::$user_tax_free = $country->supply_country ? true : false; $ShippingCountry = ShippingCountry::whereCountryId($country->id)->first(); @@ -123,8 +99,9 @@ class Shop Yard::instance('shopping')->setUserPriceInfos(Shop::getShopYardInfo()); } - - public static function getShopYardInfo(){ + + public static function getShopYardInfo() + { return [ 'user_tax_free' => self::$user_tax_free, 'shipping_free' => self::$shipping_free, @@ -133,107 +110,68 @@ class Shop 'shipping_country_id' => self::$shipping_country->id, ]; } - - public static function getYardShoppingItems(){ - $rows = Yard::instance('shopping')->getContentByOrder(); - $ret = []; - $ret['items'] = []; - $is_currency = Yard::instance('shopping')->isPriceCurrency(); - $tax_free = Yard::instance('shopping')->getUserTaxFree(); - foreach($rows as $row){ - $product = \App\Models\Product::find($row->id); - $item = new \stdClass(); - $item->image = $row->options->has('image') ? $row->options->image : null; - $item->price_net = (float) Yard::instance('shopping')->rowPriceNet($row, 3, '.', ''); - $item->price_net_total = (float) Yard::instance('shopping')->rowSubtotalNet($row, 2, '.', ''); - $item->price_currency = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('rowPriceNetCurrency', $row, 3)." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; - $item->price_currency_total = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('rowSubtotalCurrency', $row, 3)." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; - $item->price = $row->price; - $item->price_total = ($row->qty * $row->price); - $item->qty = $row->qty; - $item->name = $product->name; - $item->contents = $product->contents; - $item->numbers = $product->numbers; - $ret['items'][] = $item; - } - - $ret['tax_free'] = $tax_free; - $ret['total']['subtotal'] = Yard::instance('shopping')->subtotal(); - $ret['total']['subtotal_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('subtotal')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; - $ret['total']['shippingCountryName'] = Yard::instance('shopping')->getShippingCountryName(); - $ret['total']['shippingNet'] = Yard::instance('shopping')->shippingNet(); - $ret['total']['shippingNet currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('shippingNet')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; - $ret['total']['subtotalWithShipping'] = Yard::instance('shopping')->subtotalWithShipping(); - $ret['total']['subtotalWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('subtotalWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; - $ret['total']['taxWithShipping'] = Yard::instance('shopping')->taxWithShipping(); - $ret['total']['taxWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('taxWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; - $ret['total']['totalWithShipping'] = Yard::instance('shopping')->totalWithShipping(); - $ret['total']['totalWithShipping_currency'] = $is_currency ? "~".Yard::instance('shopping')->getCurrencyByKey('totalWithShipping')." ".Yard::instance('shopping')->getPriceCurrencyUnit() : null; - - - - return $ret; - } - public static function checkShoppingUser($id, $user){ - if($id === null){ + public static 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){ + if ($shopping_user->member_id !== $user->id) { abort(403, 'Error: Falsche User ID'); } $shopping_user = ShoppingUser::findOrFail($id); - if($shopping_user->is_like){ + if ($shopping_user->is_like) { abort(403, 'Error: Kunde in Prüfung'); } return $shopping_user; } - public static function checkShoppingCountry($for, $id=null){ + public static function checkShoppingCountry($for, $id = null) + { $country_id = null; - if($for === 'me' || $for === 'abo-me'){ + if ($for === 'me' || $for === 'abo-me') { $user = User::find(\Auth::user()->id); - if($user->account->same_as_billing){ + if ($user->account->same_as_billing) { $country_id = $user->account->country_id; - }else{ + } else { $country_id = $user->account->shipping_country_id; } } - if(strpos($for, 'ot') !== false && $id){ + if (strpos($for, 'ot') !== false && $id) { $shopping_user = ShoppingUser::findOrFail($id); - if($shopping_user->same_as_billing){ + if ($shopping_user->same_as_billing) { $country_id = $shopping_user->billing_country->id; - }else{ + } else { $country_id = $shopping_user->shipping_country->id; } } - if($country_id){ - if($shipping_country = ShippingCountry::whereCountryId($country_id)->first()){ - if($shipping_country->shipping && $shipping_country->shipping->active){ + if ($country_id) { + if ($shipping_country = ShippingCountry::whereCountryId($country_id)->first()) { + if ($shipping_country->shipping && $shipping_country->shipping->active) { return $shipping_country->id; } - } } return false; } - public static function getDeliveryCountry($for, $id=null){ + public static function getDeliveryCountry($for, $id = null) + { $country_id = null; - if($for === 'me' || $for === 'abo-me'){ + if ($for === 'me' || $for === 'abo-me') { $user = User::find(\Auth::user()->id); - if($user->account->same_as_billing){ - return $user->account->country ? $user->account->country->getLocated() : ''; - }else{ + if ($user->account->same_as_billing) { + return $user->account->country ? $user->account->country->getLocated() : ''; + } else { return $user->account->shipping_country ? $user->account->shipping_country->getLocated() : ''; } } - if(strpos($for, 'ot') !== false && $id){ + if (strpos($for, 'ot') !== false && $id) { $shopping_user = ShoppingUser::findOrFail($id); - if($shopping_user->same_as_billing){ + if ($shopping_user->same_as_billing) { return $shopping_user->billing_country ? $shopping_user->billing_country->getLocated() : ''; - }else{ + } else { return $shopping_user->shipping_country ? $shopping_user->shipping_country->getLocated() : ''; } } @@ -241,16 +179,17 @@ class Shop } - public static function getShippingPriceByShippingCountryId($shipping_country_id, $shipping_weight){ + public static function getShippingPriceByShippingCountryId($shipping_country_id, $shipping_weight) + { $shippingCountry = ShippingCountry::find($shipping_country_id); - if(!$shippingCountry){ + if (!$shippingCountry) { abort(403, 'Fehler: Versandland nicht gefunden'); } - if(!isset($shippingCountry->shipping) && count($shippingCountry->shipping->shipping_prices) === 0){ + if (!isset($shippingCountry->shipping) && count($shippingCountry->shipping->shipping_prices) === 0) { abort(403, 'Fehler: Kein Preise für das Versandland angelegt'); } $shipping_price = $shippingCountry->shipping->shipping_prices->first(); - if(!$shipping_price){ + if (!$shipping_price) { abort(403, 'Fehler: Preis vom Versandland nicht gefunden'); } @@ -258,13 +197,13 @@ class Shop abort(403, 'Fehler: Kein Versandgewicht'); }*/ - if($shipping_weight == 0){ + if ($shipping_weight == 0) { $shipping_price->price = 0; $shipping_price->price_comp = 0; return $shipping_price; } - if($shipping_weight > 0){ + if ($shipping_weight > 0) { /* if($this->shipping_free && $this->total(2, '.', '') >= $this->shipping_free){ if($this->weightByFreeShipping() == 0){ @@ -293,13 +232,13 @@ class Shop //default }*/ - } - public static function shippingPriceByWeight($shipping_prices, $shipping_weight){ - foreach ($shipping_prices as $price){ - if($price->weight_from > 0 && $price->weight_to > 0){ - if($shipping_weight >= $price->weight_from && $shipping_weight <= $price->weight_to){ + public static function shippingPriceByWeight($shipping_prices, $shipping_weight) + { + foreach ($shipping_prices as $price) { + if ($price->weight_from > 0 && $price->weight_to > 0) { + if ($shipping_weight >= $price->weight_from && $shipping_weight <= $price->weight_to) { return $price; } } @@ -307,25 +246,56 @@ class Shop abort(403, 'Fehler: Preis nach Gewicht im Versandland nicht gefunden'); } - public static function isCompProducts($for){ - /* + public static function isCompProducts($for) + { + /* $for = me, ot-member, ot-customer, abo-ot-member, abo-ot-customer, abo-me */ - if($for === 'me'){ + if ($for === 'me') { return (bool) Setting::getContentBySlug('is_comp_me_order'); } - if($for === 'abo-me'){ + if ($for === 'abo-me') { return (bool) Setting::getContentBySlug('is_comp_me_abo'); } return false; } - public static function getIPDatabaseInfo(){ + public static function getCompProducts($for) + { + if (Shop::isCompProducts($for)) { + $show_on = '0'; + switch ($for) { + case 'me': + $show_on = '2'; + break; + case 'abo-me': + $show_on = '12'; + break; + case 'ot-member': + $show_on = '3'; + break; + case 'ot-customer': + $show_on = '3'; + break; + case 'abo-ot-member': + $show_on = '13'; + break; + case 'abo-ot-customer': + $show_on = '13'; + break; + } + return Product::whereActive(true)->where('shipping_addon', true)->whereJsonContains('show_on', $show_on)->orderBy('pos', 'DESC')->get(); + } + return []; + } + + public static function getIPDatabaseInfo() + { //first check the DBs for the IP - /* testing + /* testing foreach(self::testIps() as $ip_address){ $country = MyDBIP::lookup($ip_address); @@ -355,12 +325,12 @@ class Shop dd("done"); */ - /* live */ + /* live */ $ip_address = \Request::ip(); - // $ip_address = '86.189.47.78'; //testing + // $ip_address = '86.189.47.78'; //testing $country = MyDBIP::lookup($ip_address); - if($country !== false){ + if ($country !== false) { return strtolower($country); } //not found search in IPinfo @@ -368,10 +338,10 @@ class Shop $client = new IPinfo($access_token); $details = $client->getDetails($ip_address); - if(isset($details->error) && $details->error !== null){ + if (isset($details->error) && $details->error !== null) { return 'error'; } - if(isset($details->country) && $details->country !== null){ + if (isset($details->country) && $details->country !== null) { MyDBIP::insert($ip_address, $details->country); return strtolower($details->country); } @@ -379,82 +349,83 @@ class Shop } - private static function testIps(){ + private static function testIps() + { return [ - '58.217.40.197' - ,'207.117.144.54' - ,'65.169.228.128' - ,'6.84.3.236' - ,'214.56.36.93' - ,'9.43.145.245' - ,'231.199.26.76' - ,'86.189.47.78' - ,'3.122.58.75' - ,'251.133.143.149' - ,'6.142.181.83' - ,'2.55.191.86' - ,'90.189.58.233' - ,'57.3.139.111' - ,'41.130.99.194' - ,'1.59.123.14' - ,'9.119.131.109' - ,'54.240.231.9' - ,'117.19.131.144' - ,'221.217.39.211' - ,'7.43.125.76' - ,'224.86.233.79' - ,'32.151.38.98' - ,'4.134.40.92' - ,'4.70.188.58' - ,'24.7.152.228' - ,'58.122.179.1' - ,'5.123.9.44' - ,'3.175.206.5' - ,'8.142.119.47' - ,'40.248.58.203' - ,'7.84.254.187' - ,'215.215.239.71' - ,'124.40.66.196' - ,'215.87.143.102' - ,'143.39.97.13' - ,'202.56.79.198' - ,'143.60.125.142' - ,'73.233.153.126' - ,'121.144.28.245' - ,'53.232.193.122' - ,'104.222.102.209' - ,'216.55.215.13' - ,'84.106.145.239' - ,'200.131.52.20' - ,'132.252.158.0' - ,'220.11.129.27' - ,'8.153.0.186' - ,'119.206.117.107' - ,'222.93.42.133' - ,'105.104.224.98' - ,'252.156.181.78' - ,'7.139.235.187' - ,'111.140.127.91' - ,'1.186.17.84' - ,'85.59.39.221' - ,'231.152.252.43' - ,'125.214.216.123' - ,'69.31.65.238' - ,'126.12.105.55' - ,'211.39.4.118' - ,'73.102.88.79' - ,'210.229.38.137' - ,'5.3.230.214' - ,'208.92.91.242' - ,'4.105.177.199' - ,'38.10.48.92' - ,'133.33.44.13' - ,'202.189.24.255' - ,'5.101.244.234' - ,'2.52.110.194' - ,'1.130.73.146' - ,'84.237.232.120' - ,'25.163.83.194' + '58.217.40.197', + '207.117.144.54', + '65.169.228.128', + '6.84.3.236', + '214.56.36.93', + '9.43.145.245', + '231.199.26.76', + '86.189.47.78', + '3.122.58.75', + '251.133.143.149', + '6.142.181.83', + '2.55.191.86', + '90.189.58.233', + '57.3.139.111', + '41.130.99.194', + '1.59.123.14', + '9.119.131.109', + '54.240.231.9', + '117.19.131.144', + '221.217.39.211', + '7.43.125.76', + '224.86.233.79', + '32.151.38.98', + '4.134.40.92', + '4.70.188.58', + '24.7.152.228', + '58.122.179.1', + '5.123.9.44', + '3.175.206.5', + '8.142.119.47', + '40.248.58.203', + '7.84.254.187', + '215.215.239.71', + '124.40.66.196', + '215.87.143.102', + '143.39.97.13', + '202.56.79.198', + '143.60.125.142', + '73.233.153.126', + '121.144.28.245', + '53.232.193.122', + '104.222.102.209', + '216.55.215.13', + '84.106.145.239', + '200.131.52.20', + '132.252.158.0', + '220.11.129.27', + '8.153.0.186', + '119.206.117.107', + '222.93.42.133', + '105.104.224.98', + '252.156.181.78', + '7.139.235.187', + '111.140.127.91', + '1.186.17.84', + '85.59.39.221', + '231.152.252.43', + '125.214.216.123', + '69.31.65.238', + '126.12.105.55', + '211.39.4.118', + '73.102.88.79', + '210.229.38.137', + '5.3.230.214', + '208.92.91.242', + '4.105.177.199', + '38.10.48.92', + '133.33.44.13', + '202.189.24.255', + '5.101.244.234', + '2.52.110.194', + '1.130.73.146', + '84.237.232.120', + '25.163.83.194' ]; } -} \ No newline at end of file +} diff --git a/app/Services/ShoppingUserService.php b/app/Services/ShoppingUserService.php new file mode 100644 index 0000000..4fedb29 --- /dev/null +++ b/app/Services/ShoppingUserService.php @@ -0,0 +1,198 @@ +billing_email)->where('member_id', '=', $shopping_user->member_id)->get(); + return $users->flatMap(function($user) { + return $user->shopping_orders; + })->sortByDesc('created_at'); + } + + public static function syncOrdersByEmail($user) + { + $maxAttempts = 3; + $attempt = 1; + + while ($attempt <= $maxAttempts) { + try { + DB::beginTransaction(); + + $shopping_user = ShoppingUser::where('member_id', $user->id) + ->first(); + + if (!$shopping_user) { + DB::commit(); + return; + } + + $shopping_users = ShoppingUser::where('billing_email', '=', $shopping_user->billing_email) + ->whereHas('shopping_order', function($q) { + $q->where('txaction', 'paid') + ->orWhere('txaction', 'appointed') + ->orWhere('txaction', 'extern') + ->orWhere('txaction', 'invoice_open') + ->orWhere('txaction', 'invoice_paid'); + }) + ->lockForUpdate() + ->get(); + + $order_count = $shopping_users->count(); + + foreach($shopping_users as $user) { + $user->orders = $order_count; + $user->save(); + } + + DB::commit(); + return; // Erfolgreicher Fall + + } catch (QueryException $e) { + DB::rollBack(); + + // Wenn es ein Deadlock ist, versuchen wir es erneut + if ($e->getCode() == 40001 && $attempt < $maxAttempts) { + $sleepTime = pow(2, $attempt) * 100000; // Exponentielles Backoff in Mikrosekunden + usleep($sleepTime); + $attempt++; + continue; + } + + throw $e; // Andere Fehler oder zu viele Versuche + } + } + } + + /*public static function syncOrdersByEmail($user){ + ShoppingUser::where('member_id', $user->id) + ->whereNotNull('billing_email') + ->where('billing_email', '!=', '') + ->select('billing_email') + ->groupBy('billing_email') + ->get() + ->each(function($shopping_user) { + self::snycOrdersByShoppingUser($shopping_user); + }); + }*/ + /** + * Synchronisiert die Bestellungen eines ShoppingOrders mit den Bestellungen des zugehörigen ShoppingUsers + * + * @param ShoppingOrder $shopping_order Der zu synchronisierende ShoppingOrder + */ + public static function snycOrdersByShoppingOrder(ShoppingOrder $shopping_order) { + $shopping_user = $shopping_order->shopping_user ? $shopping_order->shopping_user : null; + if($shopping_user){ + self::snycOrdersByShoppingUser($shopping_user); + } + } + + /** + * Synchronisiert die Bestellungen eines ShoppingUsers mit den Bestellungen des zugehörigen Benutzers + * + * @param ShoppingUser $shopping_user Der zu synchronisierende ShoppingUser + */ + public static function snycOrdersByShoppingUser(ShoppingUser $shopping_user) { + + // Aktualisiere alle Benutzer mit einer einzigen Datenbankabfrage + ShoppingUser::where('billing_email', $shopping_user->billing_email) + ->update([ + 'orders' => ShoppingUser::where('billing_email', $shopping_user->billing_email) + ->whereHas('shopping_order', function($q) { + $q->whereIn('txaction', ['paid', 'appointed', 'extern', 'invoice_open', 'invoice_paid']); + }) + ->count() + ]); + + } + + public static function snycOrdersByNumber($number){ + if($number <= 0) { + return; + } + // Aktualisiere alle Benutzer mit einer einzigen Datenbankabfrage + + ShoppingUser::where('number', '=', $number) + ->update([ + 'orders' => ShoppingUser::where('number', '=', $number) + ->whereHas('shopping_order', function($q) { + $q->whereIn('txaction', ['paid', 'appointed', 'extern', 'invoice_open', 'invoice_paid']); + }) + ->count() + ]); + // Setze orders auf NULL für alle anderen + ShoppingUser::where('number', '=', $number) + ->whereDoesntHave('shopping_order', function($q) { + $q->whereIn('txaction', ['paid', 'appointed', 'extern', 'extern_paid']); + }) + ->update(['orders' => null]); + } + + /** + * Synchronisiert die Nummern aller ShoppingUser eines Benutzers anhand der E-Mails + * + * @param User $user Der Benutzer, dessen ShoppingUser synchronisiert werden sollen + */ + public static function syncNumbersByEmail($user) { + // Hole alle ShoppingUser mit E-Mail gruppiert + $emailGroups = ShoppingUser::where('member_id', $user->id) + ->whereNotNull('billing_email') + ->where('billing_email', '!=', '') + ->get() + ->groupBy('billing_email'); + + foreach($emailGroups as $email => $users) { + // Suche ob es bereits eine Nummer für diese E-Mail gibt + $existingNumber = ($users->whereNotNull('number')->first()) ? $users->whereNotNull('number')->first()->number : null; + + if($existingNumber) { + // Wenn eine Nummer existiert, nutze diese für alle User mit der E-Mail + ShoppingUser::where('member_id', $user->id) + ->where('billing_email', $email) + ->whereNull('number') + ->update(['number' => $existingNumber]); + } else { + // Wenn keine Nummer existiert, generiere eine neue + $maxNumber = ShoppingUser::max('number') ?: 1000; + $newNumber = $maxNumber + 1; + + ShoppingUser::where('member_id', $user->id) + ->where('billing_email', $email) + ->update(['number' => $newNumber]); + } + } + } + + /** + * Setzt alle Faker-E-Mails für einen Benutzer auf 1 + * + * @param User $user Der Benutzer, dessen Faker-E-Mails gesetzt werden sollen + */ + public static function setFakerMail($user){ + // Aktualisiere alle Faker-E-Mails für den Benutzer in einem einzigen Update + // Schneller da nur ein einzelner SQL Query ausgeführt wird + ShoppingUser::where('member_id', $user->id) + ->where('faker_mail', '!=', 1) + ->where('billing_email', 'LIKE', '%faker@mivita.care') + ->update(['faker_mail' => 1]); + + // Setze alle anderen auf NULL zurück + ShoppingUser::where('member_id', $user->id) + ->where('billing_email', 'NOT LIKE', '%faker@mivita.care') + ->update(['faker_mail' => null]); + } +} \ No newline at end of file diff --git a/app/Services/Slim.php b/app/Services/Slim.php index 79b0faf..10b281b 100644 --- a/app/Services/Slim.php +++ b/app/Services/Slim.php @@ -43,9 +43,7 @@ class Slim { if (empty($value)) {return null;} // If magic quotes enabled - if (get_magic_quotes_gpc()) { - $value = stripslashes($value); - } + // Magic quotes were removed in PHP 5.4, no need to check in PHP 8.2 // The data is posted as a JSON String so to be used it needs to be deserialized first $data = json_decode($value); diff --git a/app/Services/SyS/ShoppingOrders.php b/app/Services/SyS/ShoppingOrders.php index cd67847..dd1ee65 100644 --- a/app/Services/SyS/ShoppingOrders.php +++ b/app/Services/SyS/ShoppingOrders.php @@ -5,6 +5,7 @@ use Request; use App\Services\Shop; use App\Models\UserShop; use App\Models\ShoppingUser; +use App\Services\ShoppingUserService; use App\Http\Controllers\Api\KasController; use App\Http\Controllers\Api\KasSLLController; @@ -55,7 +56,7 @@ class ShoppingOrders } if($data['action'] === 'next_run'){ - Shop::userOrders(); + ShoppingUserService::snycOrdersByShoppingUser($shopping_user); \Session()->flash('alert-save', true); } return back(); diff --git a/app/Services/Util.php b/app/Services/Util.php index a4f4084..563b880 100644 --- a/app/Services/Util.php +++ b/app/Services/Util.php @@ -85,7 +85,15 @@ class Util return number_format($value, $dec, self::_decimal_separator(), self::_thousands_separator()); } - + public static function cleanIntegerFromString($value) { + // Entferne alle nicht-numerischen Zeichen außer Minus + $cleanStr = preg_replace("/[^0-9-]/", "", $value); + + // Konvertiere zu Integer und entferne führende Nullen + $number = (int)$cleanStr; + + return $number; + } public static function cleanNumberFormat($num = 0, $dec = 2, $fullzero = false){ if($fullzero && $num == 0){ @@ -140,6 +148,35 @@ class Util } return false; } + + public static function getInstanceStatus(){ + $identifier = self::getUserShopIdentifier(); + if($identifier && \Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){ + return OrderPaymentService::getInstanceStatus($identifier); + } + return false; + } + + public static function setInstanceStatus($status, $lower = true){ + $identifier = self::getUserShopIdentifier(); + if($identifier && \Session::has('user_shop_payment') && \Session::get('user_shop_payment') === 6){ + OrderPaymentService::updateInstanceStatus($identifier, $status, $lower); + } + } + + public static function setInstanceStatusByPayment($shopping_payment, $status, $lower = true){ + if($shopping_payment->identifier){ + OrderPaymentService::updateInstanceStatus($shopping_payment->identifier, $status, $lower); + } + } + + public static function getShoppingInstance(){ + if(\Session::has('shopping_instance')){ + return \Session::get('shopping_instance'); + } + return false; + } + public static function getUserHistory(){ $auth_user = self::getAuthUser(); $user_shop_identifier = self::getUserShopIdentifier(); @@ -171,7 +208,7 @@ class Util return 'test'; } } - return 'live'; + return config('app.mode'); } public static function addRoute($p = []){ $b = []; diff --git a/app/User.php b/app/User.php index b9bac03..f48ecb7 100755 --- a/app/User.php +++ b/app/User.php @@ -136,12 +136,15 @@ class User extends Authenticatable */ protected $fillable = [ - 'email', 'password', 'token', + 'email', + 'password', + 'token', ]; protected $casts = [ 'settings' => 'array', - 'payment_methods' => 'array' + 'payment_methods' => 'array', + ]; /** @@ -150,41 +153,51 @@ class User extends Authenticatable * @var array */ protected $hidden = [ - 'password', 'remember_token', 'token', + 'password', + 'remember_token', + 'token', ]; private $userSalesVolume = false; - public function account(){ + public function account() + { return $this->belongsTo('App\Models\UserAccount', 'account_id'); } - public function user_level(){ + public function user_level() + { return $this->belongsTo('App\Models\UserLevel', 'm_level'); } - public function user_sponsor(){ + public function user_sponsor() + { return $this->belongsTo('App\User', 'm_sponsor'); } - public function user_pre_sponsor(){ + public function user_pre_sponsor() + { return $this->belongsTo('App\User', 'pre_sponsor'); } - public function payment_order_product(){ + public function payment_order_product() + { return $this->belongsTo('App\Models\Product', 'payment_order_id'); } - public function files(){ + public function files() + { return $this->hasMany('App\Models\File', 'user_id', ''); } - public function shopping_orders(){ + public function shopping_orders() + { return $this->hasMany('App\Models\ShoppingOrder', 'auth_user_id', ''); } - public function user_histories(){ + public function user_histories() + { return $this->hasMany('App\Models\UserHistory', 'user_id', ''); } @@ -208,33 +221,35 @@ class User extends Authenticatable return $this->hasMany('App\Models\ShoppingUser', 'member_id', 'id'); } - public function getLocale(){ + public function getLocale() + { return $this->lang ? $this->lang : \App::getLocale(); } - - public function getMUserSponsor(){ - if($this->user_sponsor && $this->user_sponsor->account){ - return $this->user_sponsor->account->first_name." ".$this->user_sponsor->account->last_name." | ".$this->user_sponsor->email; + public function getMUserSponsor() + { + if ($this->user_sponsor && $this->user_sponsor->account) { + return $this->user_sponsor->account->first_name . " " . $this->user_sponsor->account->last_name . " | " . $this->user_sponsor->email; } } - public function getFullName($email=true){ + public function getFullName($email = true) + { $ret = ""; - if($this->account){ - $ret = $this->account->first_name." ".$this->account->last_name; - + if ($this->account) { + $ret = $this->account->first_name . " " . $this->account->last_name; } - if($email && $this->id > 1){ - $ret .= " | ".$this->email; + if ($email && $this->id > 1) { + $ret .= " | " . $this->email; } return $ret; } /** * @return bool */ - public function isPasswort(){ - if($this->password == env('APP_KEY')){ + public function isPasswort() + { + if ($this->password == env('APP_KEY')) { return false; } return true; @@ -246,7 +261,7 @@ class User extends Authenticatable */ public function isVIP() { - if($this->admin >= 1){ + if ($this->admin >= 1) { return true; } return false; @@ -258,7 +273,7 @@ class User extends Authenticatable */ public function isAdmin() { - if($this->admin >= 2){ + if ($this->admin >= 2) { return true; } return false; @@ -269,7 +284,7 @@ class User extends Authenticatable */ public function isSuperAdmin() { - if($this->admin >= 3){ + if ($this->admin >= 3) { return true; } return false; @@ -280,7 +295,7 @@ class User extends Authenticatable */ public function isSySAdmin() { - if($this->admin >= 4){ + if ($this->admin >= 4) { return true; } return false; @@ -289,7 +304,7 @@ class User extends Authenticatable public function isUserHasApi() { - if($this->id === 3){ + if ($this->id === 3) { return true; } return false; @@ -300,7 +315,7 @@ class User extends Authenticatable */ public function isApiUser() { - if($this->admin >= 5){ + if ($this->admin >= 5) { return true; } return false; @@ -320,68 +335,81 @@ class User extends Authenticatable */ public function showSideNav() { - if($this->active == 1 && $this->blocked == 0 && $this->wizard >= 10){ + if ($this->active == 1 && $this->blocked == 0 && $this->wizard >= 10) { return true; } return false; } - public function isAboOption(){ - return false; + public function isAboOption() + { + return false; // Abo Option deaktiviert ($this->abo_options && $this->account && $this->account->payment_data) ? true : false; } - public function isActive(){ + public function isActive() + { return ($this->active == 1 && $this->blocked == 0) ? true : false; } - public function isActiveAccount(){ + public function isActiveAccount() + { return $this->payment_account ? Carbon::parse($this->payment_account)->gt(Carbon::now()) : false; } - public function isActiveShop(){ + public function isActiveShop() + { return $this->payment_shop ? Carbon::parse($this->payment_shop)->gt(Carbon::now()) : false; } - public function isRenewalAccount(){ + public function isRenewalAccount() + { if ($this->payment_account) { - return Carbon::parse($this->payment_account)->modify('-'.(config('mivita.renewal_days')+1).' days')->lt(Carbon::now()); + return Carbon::parse($this->payment_account)->modify('-' . (config('mivita.renewal_days') + 1) . ' days')->lt(Carbon::now()); } return false; } - public function nextRenewalAccount(){ - return $this->payment_account ? Carbon::parse($this->payment_account)->modify('-'.config('mivita.renewal_days').' days')->format(\Util::formatDateTimeDB()) : false ; + public function nextRenewalAccount() + { + return $this->payment_account ? Carbon::parse($this->payment_account)->modify('-' . config('mivita.renewal_days') . ' days')->format(\Util::formatDateTimeDB()) : false; } - public function daysActiveAccount(){ + public function daysActiveAccount() + { return Carbon::now()->diffInDays(Carbon::parse($this->payment_account), false); } - public function modifyActiveAccount($add = "1 year"){ + public function modifyActiveAccount($add = "1 year") + { return Carbon::parse($this->payment_account)->modify($add)->format(\Util::formatDateTimeDB()); } - public function daysHumansActiveAccount(){ + public function daysHumansActiveAccount() + { return Carbon::now()->diffForHumans(Carbon::parse($this->payment_account)); } - public function daysActiveShop(){ + public function daysActiveShop() + { return Carbon::now()->diffInDays(Carbon::parse($this->payment_shop), false); } - public function modifyActiveShop($add = "1 year"){ + public function modifyActiveShop($add = "1 year") + { return Carbon::parse($this->payment_shop)->modify($add)->format(\Util::formatDateTimeDB()); } - public function daysHumansActiveShop(){ + public function daysHumansActiveShop() + { return Carbon::now()->diffForHumans(Carbon::parse($this->payment_shop)); } - public function isAcountAboPayDate(){ - if($this->isAboOption()){ - $pay_days = Carbon::parse($this->payment_account)->modify('- '.config('mivita.abo_booking_days').' days'); + public function isAcountAboPayDate() + { + if ($this->isAboOption()) { + $pay_days = Carbon::parse($this->payment_account)->modify('- ' . config('mivita.abo_booking_days') . ' days'); $diff_days = Carbon::now()->diffInDays($pay_days, false); - if($diff_days <= 0){ + if ($diff_days <= 0) { return true; } } @@ -391,54 +419,76 @@ class User extends Authenticatable /** * @return string */ - public function getConfirmationDateFormat(){ - if(!$this->attributes['confirmation_date']){ return ""; } + public function getConfirmationDateFormat() + { + if (!$this->attributes['confirmation_date']) { + return ""; + } return Carbon::parse($this->attributes['confirmation_date'])->format(\Util::formatDateTimeDB()); } /** * @return string */ - public function getActiveDateFormat(){ - if(!$this->attributes['active_date']){ return ""; } + public function getActiveDateFormat($time = true) + { + if (!$this->attributes['active_date']) { + return ""; + } + if (!$time) { + return Carbon::parse($this->attributes['active_date'])->format(\Util::formatDateDB()); + } return Carbon::parse($this->attributes['active_date'])->format(\Util::formatDateTimeDB()); } /** * @return string */ - public function getAgreementFormat(){ - if(!$this->attributes['agreement']){ return ""; } + public function getAgreementFormat() + { + if (!$this->attributes['agreement']) { + return ""; + } return Carbon::parse($this->attributes['agreement'])->format(\Util::formatDateTimeDB()); } - public function getPaymentAccountDateFormat($time = true){ - if(!$this->attributes['payment_account']){ return ""; } - if(!$time){ + public function getPaymentAccountDateFormat($time = true) + { + 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()); } - public function getPaymentShopDateFormat($time = true){ - if(!$this->attributes['payment_shop']){ return ""; } - if(!$time){ + public function getPaymentShopDateFormat($time = true) + { + if (!$this->attributes['payment_shop']) { + return ""; + } + if (!$time) { return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateDB()); } return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateTimeDB()); } - public function getReleaseAccountFormat($time = true){ - if(!$this->attributes['release_account']){ return ""; } - if(!$time){ + public function getReleaseAccountFormat($time = true) + { + if (!$this->attributes['release_account']) { + return ""; + } + if (!$time) { return Carbon::parse($this->attributes['release_account'])->format(\Util::formatDateDB()); } return Carbon::parse($this->attributes['release_account'])->format(\Util::formatDateTimeDB()); } - public function setSetting(array $revisions, bool $save = true){ - if(!$this->settings){ + public function setSetting(array $revisions, bool $save = true) + { + if (!$this->settings) { $this->settings = []; } $this->settings = array_merge($this->settings, $revisions); @@ -448,16 +498,18 @@ class User extends Authenticatable return $this; } - public function getSetting($key, $default = null){ + public function getSetting($key, $default = null) + { return isset($this->settings[$key]) ? $this->settings[$key] : $default; } - public function getPaymentMethodsShort(){ + 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." | "; + if ($this->payment_methods !== null) { + foreach ($this->payment_methods as $payment_method) { + if ($find = PaymentMethod::find($payment_method)) { + $ret .= $find->short . " | "; } } $ret = rtrim($ret, " | "); @@ -467,19 +519,20 @@ class User extends Authenticatable /** * @return string */ - public function getLandByCountry(){ - if($this->account && $this->account->country_id){ + public function getLandByCountry() + { + if ($this->account && $this->account->country_id) { $code = $this->account->country->code; - if($code == "FR"){ + if ($code == "FR") { return 'fr'; } - if($code == "CH"){ + if ($code == "CH") { return 'de'; } - if($code == "NL"){ + if ($code == "NL") { return 'nl'; } - if($code == "DE"){ + if ($code == "DE") { return 'de'; } } @@ -504,10 +557,10 @@ class User extends Authenticatable { //NOTE check ist, cant change month year ! - if($this->userSalesVolume === false){ + if ($this->userSalesVolume === false) { $this->userSalesVolume = $this->getUserSalesVolume($month, $year, 'first'); } - if($this->userSalesVolume){ + if ($this->userSalesVolume) { switch ($key) { case 'sales_volume_KP_points': return $this->userSalesVolume->month_KP_points; @@ -529,7 +582,7 @@ class User extends Authenticatable case 'sales_volume_total': return $this->userSalesVolume->month_total_net; break; - + case 'sales_volume_total_shop': return $this->userSalesVolume->month_shop_total_net; break; @@ -540,7 +593,7 @@ class User extends Authenticatable } } return 0; - } + } public function getUserSalesVolume($month, $year, $record = 'get') { diff --git a/app/helpers.php b/app/helpers.php index 1248787..04f49d7 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -1,5 +1,7 @@ array ( + 'aliases' => + array ( + 'PDF' => 'Barryvdh\\DomPDF\\Facade\\Pdf', + 'Pdf' => 'Barryvdh\\DomPDF\\Facade\\Pdf', + ), 'providers' => array ( 0 => 'Barryvdh\\DomPDF\\ServiceProvider', ), - 'aliases' => - array ( - 'Pdf' => 'Barryvdh\\DomPDF\\Facade\\Pdf', - 'PDF' => 'Barryvdh\\DomPDF\\Facade\\Pdf', - ), ), 'barryvdh/laravel-ide-helper' => array ( @@ -70,14 +70,14 @@ ), 'intervention/image' => array ( - 'providers' => - array ( - 0 => 'Intervention\\Image\\ImageServiceProvider', - ), 'aliases' => array ( 'Image' => 'Intervention\\Image\\Facades\\Image', ), + 'providers' => + array ( + 0 => 'Intervention\\Image\\ImageServiceProvider', + ), ), 'jenssegers/date' => array ( @@ -100,13 +100,20 @@ ), 'laracasts/flash' => array ( + 'aliases' => + array ( + 'Flash' => 'Laracasts\\Flash\\Flash', + ), 'providers' => array ( 0 => 'Laracasts\\Flash\\FlashServiceProvider', ), - 'aliases' => + ), + 'laravel/legacy-factories' => + array ( + 'providers' => array ( - 'Flash' => 'Laracasts\\Flash\\Flash', + 0 => 'Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider', ), ), 'laravel/passport' => @@ -151,14 +158,14 @@ ), 'maatwebsite/excel' => array ( - 'providers' => - array ( - 0 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - ), 'aliases' => array ( 'Excel' => 'Maatwebsite\\Excel\\Facades\\Excel', ), + 'providers' => + array ( + 0 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + ), ), 'nesbot/carbon' => array ( diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php index 2a982b8..abb1664 100755 --- a/bootstrap/cache/services.php +++ b/bootstrap/cache/services.php @@ -36,29 +36,30 @@ 32 => 'JoeDixon\\Translation\\TranslationServiceProvider', 33 => 'JoeDixon\\Translation\\TranslationBindingsServiceProvider', 34 => 'Laracasts\\Flash\\FlashServiceProvider', - 35 => 'Laravel\\Passport\\PassportServiceProvider', - 36 => 'Laravel\\Sail\\SailServiceProvider', - 37 => 'Laravel\\Tinker\\TinkerServiceProvider', - 38 => 'Laravel\\Ui\\UiServiceProvider', - 39 => 'Collective\\Html\\HtmlServiceProvider', - 40 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 41 => 'Carbon\\Laravel\\ServiceProvider', - 42 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', - 43 => 'Reliese\\Coders\\CodersServiceProvider', - 44 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 45 => 'Reliese\\Coders\\CodersServiceProvider', - 46 => 'Laravel\\Tinker\\TinkerServiceProvider', - 47 => 'App\\Providers\\AppServiceProvider', - 48 => 'App\\Providers\\AuthServiceProvider', - 49 => 'App\\Providers\\EventServiceProvider', - 50 => 'App\\Providers\\RouteServiceProvider', - 51 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', - 52 => 'Jenssegers\\Date\\DateServiceProvider', - 53 => 'Collective\\Html\\HtmlServiceProvider', - 54 => 'Intervention\\Image\\ImageServiceProvider', - 55 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 56 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 57 => 'App\\Providers\\YardServiceProvider', + 35 => 'Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider', + 36 => 'Laravel\\Passport\\PassportServiceProvider', + 37 => 'Laravel\\Sail\\SailServiceProvider', + 38 => 'Laravel\\Tinker\\TinkerServiceProvider', + 39 => 'Laravel\\Ui\\UiServiceProvider', + 40 => 'Collective\\Html\\HtmlServiceProvider', + 41 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 42 => 'Carbon\\Laravel\\ServiceProvider', + 43 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 44 => 'Reliese\\Coders\\CodersServiceProvider', + 45 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 46 => 'Reliese\\Coders\\CodersServiceProvider', + 47 => 'Intervention\\Image\\ImageServiceProvider', + 48 => 'Laravel\\Tinker\\TinkerServiceProvider', + 49 => 'App\\Providers\\AppServiceProvider', + 50 => 'App\\Providers\\AuthServiceProvider', + 51 => 'App\\Providers\\EventServiceProvider', + 52 => 'App\\Providers\\RouteServiceProvider', + 53 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', + 54 => 'Jenssegers\\Date\\DateServiceProvider', + 55 => 'Collective\\Html\\HtmlServiceProvider', + 56 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 57 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 58 => 'App\\Providers\\YardServiceProvider', ), 'eager' => array ( @@ -83,23 +84,24 @@ 18 => 'Jenssegers\\Date\\DateServiceProvider', 19 => 'JoeDixon\\Translation\\TranslationServiceProvider', 20 => 'Laracasts\\Flash\\FlashServiceProvider', - 21 => 'Laravel\\Passport\\PassportServiceProvider', - 22 => 'Laravel\\Ui\\UiServiceProvider', - 23 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 24 => 'Carbon\\Laravel\\ServiceProvider', - 25 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', - 26 => 'Reliese\\Coders\\CodersServiceProvider', - 27 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 28 => 'Reliese\\Coders\\CodersServiceProvider', - 29 => 'App\\Providers\\AppServiceProvider', - 30 => 'App\\Providers\\AuthServiceProvider', - 31 => 'App\\Providers\\EventServiceProvider', - 32 => 'App\\Providers\\RouteServiceProvider', - 33 => 'Jenssegers\\Date\\DateServiceProvider', - 34 => 'Intervention\\Image\\ImageServiceProvider', - 35 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 36 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 37 => 'App\\Providers\\YardServiceProvider', + 21 => 'Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider', + 22 => 'Laravel\\Passport\\PassportServiceProvider', + 23 => 'Laravel\\Ui\\UiServiceProvider', + 24 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 25 => 'Carbon\\Laravel\\ServiceProvider', + 26 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 27 => 'Reliese\\Coders\\CodersServiceProvider', + 28 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 29 => 'Reliese\\Coders\\CodersServiceProvider', + 30 => 'Intervention\\Image\\ImageServiceProvider', + 31 => 'App\\Providers\\AppServiceProvider', + 32 => 'App\\Providers\\AuthServiceProvider', + 33 => 'App\\Providers\\EventServiceProvider', + 34 => 'App\\Providers\\RouteServiceProvider', + 35 => 'Jenssegers\\Date\\DateServiceProvider', + 36 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 37 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 38 => 'App\\Providers\\YardServiceProvider', ), 'deferred' => array ( diff --git a/composer.json b/composer.json index 759e3ba..2ff425a 100755 --- a/composer.json +++ b/composer.json @@ -6,17 +6,17 @@ "type": "project", "require": { "php": "^7.4|^8.0", - "cocur/slugify": "4.4.0", "askedio/laravel5-profanity-filter": "*", "barryvdh/laravel-dompdf": "*", + "cocur/slugify": "4.4.0", "cviebrock/eloquent-sluggable": "*", "doctrine/dbal": "*", "fideloper/proxy": "^4.4", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", - "intervention/image": "*", + "intervention/image": "^2.7", "jenssegers/date": "*", - "joedixon/laravel-translation": "^1.1", + "joedixon/laravel-translation": "^2.2", "laracasts/flash": "*", "laravel/framework": "^8.12", "laravel/helpers": "*", diff --git a/composer.lock b/composer.lock index c690594..895156e 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ad50933786d7ea4e9c73f2aed681e366", + "content-hash": "210e30f91e8a31b7e86100c180ec0e49", "packages": [ { "name": "askedio/laravel5-profanity-filter", @@ -58,31 +58,31 @@ }, { "name": "asm89/stack-cors", - "version": "v2.1.1", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/asm89/stack-cors.git", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a" + "reference": "50f57105bad3d97a43ec4a485eb57daf347eafea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", + "url": "https://api.github.com/repos/asm89/stack-cors/zipball/50f57105bad3d97a43ec4a485eb57daf347eafea", + "reference": "50f57105bad3d97a43ec4a485eb57daf347eafea", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "symfony/http-foundation": "^4|^5|^6", - "symfony/http-kernel": "^4|^5|^6" + "php": "^7.3|^8.0", + "symfony/http-foundation": "^5.3|^6|^7", + "symfony/http-kernel": "^5.3|^6|^7" }, "require-dev": { - "phpunit/phpunit": "^7|^9", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -108,48 +108,48 @@ ], "support": { "issues": "https://github.com/asm89/stack-cors/issues", - "source": "https://github.com/asm89/stack-cors/tree/v2.1.1" + "source": "https://github.com/asm89/stack-cors/tree/v2.2.0" }, - "time": "2022-01-18T09:12:03+00:00" + "time": "2023-11-14T13:51:46+00:00" }, { "name": "barryvdh/laravel-dompdf", - "version": "v2.0.1", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-dompdf.git", - "reference": "9843d2be423670fb434f4c978b3c0f4dd92c87a6" + "reference": "c96f90c97666cebec154ca1ffb67afed372114d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/9843d2be423670fb434f4c978b3c0f4dd92c87a6", - "reference": "9843d2be423670fb434f4c978b3c0f4dd92c87a6", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/c96f90c97666cebec154ca1ffb67afed372114d8", + "reference": "c96f90c97666cebec154ca1ffb67afed372114d8", "shasum": "" }, "require": { - "dompdf/dompdf": "^2.0.1", - "illuminate/support": "^6|^7|^8|^9|^10", + "dompdf/dompdf": "^2.0.7", + "illuminate/support": "^6|^7|^8|^9|^10|^11", "php": "^7.2 || ^8.0" }, "require-dev": { - "nunomaduro/larastan": "^1|^2", - "orchestra/testbench": "^4|^5|^6|^7|^8", - "phpro/grumphp": "^1", + "larastan/larastan": "^1.0|^2.7.0", + "orchestra/testbench": "^4|^5|^6|^7|^8|^9", + "phpro/grumphp": "^1 || ^2.5", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - }, "laravel": { + "aliases": { + "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf", + "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf" + }, "providers": [ "Barryvdh\\DomPDF\\ServiceProvider" - ], - "aliases": { - "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf", - "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf" - } + ] + }, + "branch-alias": { + "dev-master": "2.0-dev" } }, "autoload": { @@ -175,7 +175,7 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-dompdf/issues", - "source": "https://github.com/barryvdh/laravel-dompdf/tree/v2.0.1" + "source": "https://github.com/barryvdh/laravel-dompdf/tree/v2.2.0" }, "funding": [ { @@ -187,30 +187,29 @@ "type": "github" } ], - "time": "2023-01-12T15:12:49+00:00" + "time": "2024-04-25T13:16:04+00:00" }, { "name": "brick/math", - "version": "0.9.3", + "version": "0.12.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" + "reference": "f510c0a40911935b77b86859eb5223d58d660df1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", + "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1", + "reference": "f510c0a40911935b77b86859eb5223d58d660df1", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", - "vimeo/psalm": "4.9.2" + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "5.16.0" }, "type": "library", "autoload": { @@ -230,24 +229,94 @@ "arithmetic", "bigdecimal", "bignum", + "bignumber", "brick", - "math" + "decimal", + "integer", + "math", + "mathematics", + "rational" ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.9.3" + "source": "https://github.com/brick/math/tree/0.12.1" }, "funding": [ { "url": "https://github.com/BenMorel", "type": "github" + } + ], + "time": "2023-11-29T23:19:16+00:00" + }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/brick/math", + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", "type": "tidelift" } ], - "time": "2021-08-15T20:50:18+00:00" + "time": "2023-12-11T17:09:12+00:00" }, { "name": "cocur/slugify", @@ -324,25 +393,104 @@ "time": "2023-08-05T09:42:11+00:00" }, { - "name": "composer/semver", - "version": "3.4.0", + "name": "composer/pcre", + "version": "3.3.2", "source": { "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.3", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", "extra": { @@ -386,7 +534,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.3" }, "funding": [ { @@ -402,7 +550,7 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-09-19T14:15:21+00:00" }, { "name": "cviebrock/eloquent-sluggable", @@ -544,6 +692,81 @@ }, "time": "2023-06-19T06:10:36+00:00" }, + { + "name": "dflydev/dot-access-data", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Dflydev\\DotAccessData\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3" + }, + "time": "2024-07-08T12:26:09+00:00" + }, { "name": "doctrine/cache", "version": "2.2.0", @@ -639,38 +862,38 @@ }, { "name": "doctrine/dbal", - "version": "3.3.8", + "version": "3.9.4", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "f873a820227bc352d023791775a01f078a30dfe1" + "reference": "ec16c82f20be1a7224e65ac67144a29199f87959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/f873a820227bc352d023791775a01f078a30dfe1", - "reference": "f873a820227bc352d023791775a01f078a30dfe1", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/ec16c82f20be1a7224e65ac67144a29199f87959", + "reference": "ec16c82f20be1a7224e65ac67144a29199f87959", "shasum": "" }, "require": { "composer-runtime-api": "^2", "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3|^1", - "doctrine/event-manager": "^1.0", - "php": "^7.3 || ^8.0", + "doctrine/event-manager": "^1|^2", + "php": "^7.4 || ^8.0", "psr/cache": "^1|^2|^3", "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "9.0.0", - "jetbrains/phpstorm-stubs": "2022.1", - "phpstan/phpstan": "1.8.2", - "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "9.5.21", - "psalm/plugin-phpunit": "0.17.0", - "squizlabs/php_codesniffer": "3.7.1", - "symfony/cache": "^5.2|^6.0", - "symfony/console": "^2.7|^3.0|^4.0|^5.0|^6.0", - "vimeo/psalm": "4.24.0" + "doctrine/coding-standard": "12.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2023.1", + "phpstan/phpstan": "2.1.1", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "9.6.22", + "slevomat/coding-standard": "8.13.1", + "squizlabs/php_codesniffer": "3.10.2", + "symfony/cache": "^5.4|^6.0|^7.0", + "symfony/console": "^4.4|^5.4|^6.0|^7.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -730,7 +953,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.3.8" + "source": "https://github.com/doctrine/dbal/tree/3.9.4" }, "funding": [ { @@ -746,33 +969,31 @@ "type": "tidelift" } ], - "time": "2022-08-05T15:35:35+00:00" + "time": "2025-01-16T08:28:55+00:00" }, { "name": "doctrine/deprecations", - "version": "v1.1.1", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "1.4.10 || 2.0.3", + "phpstan/phpstan-phpunit": "^1.0 || ^2", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" + "psr/log": "^1 || ^2 || ^3" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -780,7 +1001,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "Doctrine\\Deprecations\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -791,36 +1012,35 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" + "source": "https://github.com/doctrine/deprecations/tree/1.1.4" }, - "time": "2023-06-03T09:27:29+00:00" + "time": "2024-12-07T21:18:45+00:00" }, { "name": "doctrine/event-manager", - "version": "1.2.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520" + "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/95aa4cb529f1e96576f3fda9f5705ada4056a520", - "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/b680156fa328f1dfd874fd48c7026c41570b9c6e", + "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e", "shasum": "" }, "require": { - "doctrine/deprecations": "^0.5.3 || ^1", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "conflict": { "doctrine/common": "<2.9" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.8", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.24" + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.8.8", + "phpunit/phpunit": "^10.5", + "vimeo/psalm": "^5.24" }, "type": "library", "autoload": { @@ -869,7 +1089,7 @@ ], "support": { "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.2.0" + "source": "https://github.com/doctrine/event-manager/tree/2.0.1" }, "funding": [ { @@ -885,20 +1105,20 @@ "type": "tidelift" } ], - "time": "2022-10-12T20:51:15+00:00" + "time": "2024-05-22T20:47:39+00:00" }, { "name": "doctrine/inflector", - "version": "2.0.8", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", "shasum": "" }, "require": { @@ -960,7 +1180,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.8" + "source": "https://github.com/doctrine/inflector/tree/2.0.10" }, "funding": [ { @@ -976,7 +1196,7 @@ "type": "tidelift" } ], - "time": "2023-06-16T13:40:37+00:00" + "time": "2024-02-18T20:23:39+00:00" }, { "name": "doctrine/lexer", @@ -1056,16 +1276,16 @@ }, { "name": "dompdf/dompdf", - "version": "v2.0.3", + "version": "v2.0.8", "source": { "type": "git", "url": "https://github.com/dompdf/dompdf.git", - "reference": "e8d2d5e37e8b0b30f0732a011295ab80680d7e85" + "reference": "c20247574601700e1f7c8dab39310fca1964dc52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/e8d2d5e37e8b0b30f0732a011295ab80680d7e85", - "reference": "e8d2d5e37e8b0b30f0732a011295ab80680d7e85", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/c20247574601700e1f7c8dab39310fca1964dc52", + "reference": "c20247574601700e1f7c8dab39310fca1964dc52", "shasum": "" }, "require": { @@ -1073,7 +1293,7 @@ "ext-mbstring": "*", "masterminds/html5": "^2.0", "phenx/php-font-lib": ">=0.5.4 <1.0.0", - "phenx/php-svg-lib": ">=0.3.3 <1.0.0", + "phenx/php-svg-lib": ">=0.5.2 <1.0.0", "php": "^7.1 || ^8.0" }, "require-dev": { @@ -1112,22 +1332,22 @@ "homepage": "https://github.com/dompdf/dompdf", "support": { "issues": "https://github.com/dompdf/dompdf/issues", - "source": "https://github.com/dompdf/dompdf/tree/v2.0.3" + "source": "https://github.com/dompdf/dompdf/tree/v2.0.8" }, - "time": "2023-02-07T12:51:48+00:00" + "time": "2024-04-29T13:06:17+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.3", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" + "reference": "8c784d071debd117328803d86b2097615b457500" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", - "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/8c784d071debd117328803d86b2097615b457500", + "reference": "8c784d071debd117328803d86b2097615b457500", "shasum": "" }, "require": { @@ -1140,10 +1360,14 @@ "require-dev": { "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.0", - "phpstan/phpstan-webmozart-assert": "^1.0", "phpunit/phpunit": "^7.0|^8.0|^9.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, "autoload": { "psr-4": { "Cron\\": "src/Cron/" @@ -1167,7 +1391,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.4.0" }, "funding": [ { @@ -1175,7 +1399,7 @@ "type": "github" } ], - "time": "2023-08-10T19:36:49+00:00" + "time": "2024-10-09T13:47:03+00:00" }, { "name": "egulias/email-validator", @@ -1247,20 +1471,20 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.16.0", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8" + "reference": "cb56001e54359df7ae76dc522d08845dc741621b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8", - "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b", "shasum": "" }, "require": { - "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { "cerdic/css-tidy": "^1.7 || ^2.0", @@ -1302,9 +1526,9 @@ ], "support": { "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0" + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" }, - "time": "2022-09-18T07:06:19+00:00" + "time": "2024-11-01T03:51:45+00:00" }, { "name": "fideloper/proxy", @@ -1366,26 +1590,26 @@ }, { "name": "firebase/php-jwt", - "version": "v6.4.0", + "version": "v6.11.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224" + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/4dd1e007f22a927ac77da5a3fbb067b42d3bc224", - "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712", "shasum": "" }, "require": { - "php": "^7.1||^8.0" + "php": "^8.0" }, "require-dev": { - "guzzlehttp/guzzle": "^6.5||^7.4", - "phpspec/prophecy-phpunit": "^1.1", - "phpunit/phpunit": "^7.5||^9.5", - "psr/cache": "^1.0||^2.0", + "guzzlehttp/guzzle": "^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0" }, @@ -1423,9 +1647,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.4.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.11.0" }, - "time": "2023-02-09T21:01:23+00:00" + "time": "2025-01-23T05:11:06+00:00" }, { "name": "fruitcake/laravel-cors", @@ -1509,24 +1733,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.1", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.1" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "autoload": { @@ -1555,7 +1779,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -1567,26 +1791,26 @@ "type": "tidelift" } ], - "time": "2023-02-25T20:23:15+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.8.0", + "version": "7.9.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1595,11 +1819,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1677,7 +1901,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.0" + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" }, "funding": [ { @@ -1693,28 +1917,28 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:20:53+00:00" + "time": "2024-07-24T11:22:20+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.1", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -1760,7 +1984,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.1" + "source": "https://github.com/guzzle/promises/tree/2.0.4" }, "funding": [ { @@ -1776,20 +2000,20 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2024-10-17T10:06:22+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.1", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", "shasum": "" }, "require": { @@ -1803,9 +2027,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -1876,7 +2100,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.1" + "source": "https://github.com/guzzle/psr7/tree/2.7.0" }, "funding": [ { @@ -1892,7 +2116,7 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:13:57+00:00" + "time": "2024-07-18T11:15:46+00:00" }, { "name": "intervention/image", @@ -1924,16 +2148,16 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - }, "laravel": { - "providers": [ - "Intervention\\Image\\ImageServiceProvider" - ], "aliases": { "Image": "Intervention\\Image\\Facades\\Image" - } + }, + "providers": [ + "Intervention\\Image\\ImageServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "2.4-dev" } }, "autoload": { @@ -2001,16 +2225,16 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - }, "laravel": { - "providers": [ - "Jenssegers\\Date\\DateServiceProvider" - ], "aliases": { "Date": "Jenssegers\\Date\\Date" - } + }, + "providers": [ + "Jenssegers\\Date\\DateServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "3.1-dev" } }, "autoload": { @@ -2057,22 +2281,27 @@ }, { "name": "joedixon/laravel-translation", - "version": "v1.1.2", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/joedixon/laravel-translation.git", - "reference": "4a467398bae73cd16522d523b557e96f3455b9d2" + "reference": "feba4d1e3d12722ca60c05d9180f39b7de227e4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joedixon/laravel-translation/zipball/4a467398bae73cd16522d523b557e96f3455b9d2", - "reference": "4a467398bae73cd16522d523b557e96f3455b9d2", + "url": "https://api.github.com/repos/joedixon/laravel-translation/zipball/feba4d1e3d12722ca60c05d9180f39b7de227e4e", + "reference": "feba4d1e3d12722ca60c05d9180f39b7de227e4e", "shasum": "" }, + "require": { + "illuminate/support": "^8.0||^9.0||^10.0", + "laravel/legacy-factories": "^1.3", + "php": "^8.0" + }, "require-dev": { "mockery/mockery": "^1.0.0", - "orchestra/testbench": "^4.0", - "phpunit/phpunit": "^8.0" + "orchestra/testbench": "^6.0|^8.0", + "phpunit/phpunit": "^9.0|^10.0" }, "type": "library", "extra": { @@ -2101,41 +2330,41 @@ "description": "A tool for managing all of your Laravel translations", "support": { "issues": "https://github.com/joedixon/laravel-translation/issues", - "source": "https://github.com/joedixon/laravel-translation/tree/master" + "source": "https://github.com/joedixon/laravel-translation/tree/v2.2.0" }, - "time": "2020-04-13T20:06:24+00:00" + "time": "2023-04-26T09:40:52+00:00" }, { "name": "laracasts/flash", - "version": "3.2.2", + "version": "3.2.4", "source": { "type": "git", "url": "https://github.com/laracasts/flash.git", - "reference": "6330bc3c027d3c03188b41c58133016f8226b8fb" + "reference": "0ea47bfbf12a33113247c367798a34e519020f8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laracasts/flash/zipball/6330bc3c027d3c03188b41c58133016f8226b8fb", - "reference": "6330bc3c027d3c03188b41c58133016f8226b8fb", + "url": "https://api.github.com/repos/laracasts/flash/zipball/0ea47bfbf12a33113247c367798a34e519020f8d", + "reference": "0ea47bfbf12a33113247c367798a34e519020f8d", "shasum": "" }, "require": { - "illuminate/support": "~5.0|^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/support": "~5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", "php": ">=5.4.0" }, "require-dev": { "mockery/mockery": "dev-master", - "phpunit/phpunit": "^6.1|^9.5.10" + "phpunit/phpunit": "^6.1|^9.5.10|^10.5" }, "type": "library", "extra": { "laravel": { - "providers": [ - "Laracasts\\Flash\\FlashServiceProvider" - ], "aliases": { "Flash": "Laracasts\\Flash\\Flash" - } + }, + "providers": [ + "Laracasts\\Flash\\FlashServiceProvider" + ] } }, "autoload": { @@ -2158,22 +2387,22 @@ ], "description": "Easy flash notifications", "support": { - "source": "https://github.com/laracasts/flash/tree/3.2.2" + "source": "https://github.com/laracasts/flash/tree/3.2.4" }, - "time": "2023-01-30T20:31:40+00:00" + "time": "2025-02-06T14:43:27+00:00" }, { "name": "laravel/framework", - "version": "v8.83.27", + "version": "v8.83.29", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49" + "reference": "d841a226a50c715431952a10260ba4fac9e91cc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", - "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", + "url": "https://api.github.com/repos/laravel/framework/zipball/d841a226a50c715431952a10260ba4fac9e91cc4", + "reference": "d841a226a50c715431952a10260ba4fac9e91cc4", "shasum": "" }, "require": { @@ -2333,28 +2562,29 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-12-08T15:28:55+00:00" + "time": "2024-11-20T15:55:41+00:00" }, { "name": "laravel/helpers", - "version": "v1.6.0", + "version": "v1.7.2", "source": { "type": "git", "url": "https://github.com/laravel/helpers.git", - "reference": "4dd0f9436d3911611622a6ced8329a1710576f60" + "reference": "672d79d5b5f65dc821e57783fa11f22c4d762d70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/helpers/zipball/4dd0f9436d3911611622a6ced8329a1710576f60", - "reference": "4dd0f9436d3911611622a6ced8329a1710576f60", + "url": "https://api.github.com/repos/laravel/helpers/zipball/672d79d5b5f65dc821e57783fa11f22c4d762d70", + "reference": "672d79d5b5f65dc821e57783fa11f22c4d762d70", "shasum": "" }, "require": { - "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0", - "php": "^7.1.3|^8.0" + "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "php": "^7.2.0|^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.0|^8.0|^9.0" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^7.0|^8.0|^9.0|^10.0" }, "type": "library", "extra": { @@ -2387,9 +2617,65 @@ "laravel" ], "support": { - "source": "https://github.com/laravel/helpers/tree/v1.6.0" + "source": "https://github.com/laravel/helpers/tree/v1.7.2" }, - "time": "2023-01-09T14:48:11+00:00" + "time": "2025-01-24T15:41:25+00:00" + }, + { + "name": "laravel/legacy-factories", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/legacy-factories.git", + "reference": "cd0f8c77d116bac121e9779fcff1f71801aaac50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/legacy-factories/zipball/cd0f8c77d116bac121e9779fcff1f71801aaac50", + "reference": "cd0f8c77d116bac121e9779fcff1f71801aaac50", + "shasum": "" + }, + "require": { + "illuminate/macroable": "^8.0|^9.0|^10.0|^11.0|^12.0", + "php": "^7.3|^8.0", + "symfony/finder": "^3.4|^4.0|^5.0|^6.0|^7.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Illuminate\\Database\\Eloquent\\LegacyFactoryServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Illuminate\\Database\\Eloquent\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The legacy version of the Laravel Eloquent factories.", + "homepage": "http://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2025-01-24T15:41:36+00:00" }, { "name": "laravel/passport", @@ -2431,13 +2717,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "10.x-dev" - }, "laravel": { "providers": [ "Laravel\\Passport\\PassportServiceProvider" ] + }, + "branch-alias": { + "dev-master": "10.x-dev" } }, "autoload": { @@ -2470,26 +2756,27 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.1", + "version": "v1.3.7", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902" + "reference": "4f48ade902b94323ca3be7646db16209ec76be3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/e5a3057a5591e1cfe8183034b0203921abe2c902", - "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/4f48ade902b94323ca3be7646db16209ec76be3d", + "reference": "4f48ade902b94323ca3be7646db16209ec76be3d", "shasum": "" }, "require": { "php": "^7.3|^8.0" }, "require-dev": { - "nesbot/carbon": "^2.61", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "nesbot/carbon": "^2.61|^3.0", "pestphp/pest": "^1.21.3", "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11" + "symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0" }, "type": "library", "extra": { @@ -2526,43 +2813,40 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-07-14T13:56:28+00:00" + "time": "2024-11-14T18:34:49+00:00" }, { "name": "laravel/tinker", - "version": "v2.8.2", + "version": "v2.10.1", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3" + "reference": "22177cc71807d38f2810c6204d8f7183d88a57d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/b936d415b252b499e8c3b1f795cd4fc20f57e1f3", - "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3", + "url": "https://api.github.com/repos/laravel/tinker/zipball/22177cc71807d38f2810c6204d8f7183d88a57d3", + "reference": "22177cc71807d38f2810c6204d8f7183d88a57d3", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", "php": "^7.2.5|^8.0", - "psy/psysh": "^0.10.4|^0.11.1", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, "require-dev": { "mockery/mockery": "~1.3.3|^1.4.2", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^8.5.8|^9.3.3" + "phpunit/phpunit": "^8.5.8|^9.3.3|^10.0" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0)." }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" @@ -2593,9 +2877,9 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.8.2" + "source": "https://github.com/laravel/tinker/tree/v2.10.1" }, - "time": "2023-08-15T14:27:00+00:00" + "time": "2025-01-27T14:24:01+00:00" }, { "name": "laravel/ui", @@ -2623,13 +2907,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - }, "laravel": { "providers": [ "Laravel\\Ui\\UiServiceProvider" ] + }, + "branch-alias": { + "dev-master": "3.x-dev" } }, "autoload": { @@ -2732,69 +3016,56 @@ "time": "2023-04-25T02:46:11+00:00" }, { - "name": "lcobucci/jwt", - "version": "3.4.6", + "name": "lcobucci/clock", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "3ef8657a78278dfeae7707d51747251db4176240" + "url": "https://github.com/lcobucci/clock.git", + "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/3ef8657a78278dfeae7707d51747251db4176240", - "reference": "3ef8657a78278dfeae7707d51747251db4176240", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/039ef98c6b57b101d10bd11d8fdfda12cbd996dc", + "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc", "shasum": "" }, "require": { - "ext-mbstring": "*", - "ext-openssl": "*", - "php": "^5.6 || ^7.0" + "php": "~8.1.0 || ~8.2.0", + "psr/clock": "^1.0" + }, + "provide": { + "psr/clock-implementation": "1.0" }, "require-dev": { - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "^5.7 || ^7.3", - "squizlabs/php_codesniffer": "~2.3" - }, - "suggest": { - "lcobucci/clock": "*" + "infection/infection": "^0.26", + "lcobucci/coding-standard": "^9.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-deprecation-rules": "^1.1.1", + "phpstan/phpstan-phpunit": "^1.3.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.27" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, "autoload": { - "files": [ - "compat/class-aliases.php", - "compat/json-exception-polyfill.php", - "compat/lcobucci-clock-polyfill.php" - ], "psr-4": { - "Lcobucci\\JWT\\": "src" + "Lcobucci\\Clock\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "Developer" + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com" } ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], + "description": "Yet another clock abstraction", "support": { - "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/3.4.6" + "issues": "https://github.com/lcobucci/clock/issues", + "source": "https://github.com/lcobucci/clock/tree/3.0.0" }, "funding": [ { @@ -2806,46 +3077,133 @@ "type": "patreon" } ], - "time": "2021-09-28T19:18:28+00:00" + "time": "2022-12-19T15:00:24+00:00" }, { - "name": "league/commonmark", - "version": "1.6.7", + "name": "lcobucci/jwt", + "version": "4.3.0", "source": { "type": "git", - "url": "https://github.com/thephpleague/commonmark.git", - "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b" + "url": "https://github.com/lcobucci/jwt.git", + "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/2b8185c13bc9578367a5bf901881d1c1b5bbd09b", - "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4", + "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4", + "shasum": "" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-sodium": "*", + "lcobucci/clock": "^2.0 || ^3.0", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "infection/infection": "^0.21", + "lcobucci/coding-standard": "^6.0", + "mikey179/vfsstream": "^1.6.7", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/php-invoker": "^3.1", + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "support": { + "issues": "https://github.com/lcobucci/jwt/issues", + "source": "https://github.com/lcobucci/jwt/tree/4.3.0" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2023-01-02T13:28:00+00:00" + }, + { + "name": "league/commonmark", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d990688c91cedfb69753ffc2512727ec646df2ad", + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "scrutinizer/ocular": "1.7.*" + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "cebe/markdown": "~1.0", - "commonmark/commonmark.js": "0.29.2", - "erusev/parsedown": "~1.0", + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.31.1", + "commonmark/commonmark.js": "0.31.1", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", "ext-json": "*", "github/gfm": "0.29.0", - "michelf/php-markdown": "~1.4", - "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12.90", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", - "scrutinizer/ocular": "^1.5", - "symfony/finder": "^4.2" + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0 | ^7.0", + "symfony/process": "^5.4 | ^6.0 | ^7.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" }, - "bin": [ - "bin/commonmark" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.7-dev" + } + }, "autoload": { "psr-4": { "League\\CommonMark\\": "src" @@ -2863,7 +3221,7 @@ "role": "Lead Developer" } ], - "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", "homepage": "https://commonmark.thephpleague.com", "keywords": [ "commonmark", @@ -2877,6 +3235,7 @@ ], "support": { "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", "issues": "https://github.com/thephpleague/commonmark/issues", "rss": "https://github.com/thephpleague/commonmark/releases.atom", "source": "https://github.com/thephpleague/commonmark" @@ -2899,7 +3258,89 @@ "type": "tidelift" } ], - "time": "2022-01-13T17:18:13+00:00" + "time": "2024-12-29T14:10:59+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" }, { "name": "league/event", @@ -3051,26 +3492,26 @@ }, { "name": "league/mime-type-detection", - "version": "1.12.0", + "version": "1.16.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "c7f2872fb273bf493811473dafc88d60ae829f48" + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/c7f2872fb273bf493811473dafc88d60ae829f48", - "reference": "c7f2872fb273bf493811473dafc88d60ae829f48", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" }, "type": "library", "autoload": { @@ -3091,7 +3532,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.12.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" }, "funding": [ { @@ -3103,41 +3544,41 @@ "type": "tidelift" } ], - "time": "2023-08-03T07:14:11+00:00" + "time": "2024-09-21T08:32:55+00:00" }, { "name": "league/oauth2-server", - "version": "8.4.2", + "version": "8.5.5", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3" + "reference": "cc8778350f905667e796b3c2364a9d3bd7a73518" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/007dc5f6c0151a73b133fec36c9686cc956209d3", - "reference": "007dc5f6c0151a73b133fec36c9686cc956209d3", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/cc8778350f905667e796b3c2364a9d3bd7a73518", + "reference": "cc8778350f905667e796b3c2364a9d3bd7a73518", "shasum": "" }, "require": { - "defuse/php-encryption": "^2.2.1", - "ext-json": "*", + "defuse/php-encryption": "^2.3", "ext-openssl": "*", - "lcobucci/jwt": "^3.4.6 || ^4.0.4", + "lcobucci/clock": "^2.2 || ^3.0", + "lcobucci/jwt": "^4.3 || ^5.0", "league/event": "^2.2", - "league/uri": "^6.4", - "php": "^7.2 || ^8.0", - "psr/http-message": "^1.0.1" + "league/uri": "^6.7 || ^7.0", + "php": "^8.0", + "psr/http-message": "^1.0.1 || ^2.0" }, "replace": { "league/oauth2server": "*", "lncd/oauth2": "*" }, "require-dev": { - "laminas/laminas-diactoros": "^2.4.1", + "laminas/laminas-diactoros": "^3.0.0", "phpstan/phpstan": "^0.12.57", "phpstan/phpstan-phpunit": "^0.12.16", - "phpunit/phpunit": "^8.5.13", + "phpunit/phpunit": "^9.6.6", "roave/security-advisories": "dev-master" }, "type": "library", @@ -3183,7 +3624,7 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth2-server/issues", - "source": "https://github.com/thephpleague/oauth2-server/tree/8.4.2" + "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.5" }, "funding": [ { @@ -3191,54 +3632,48 @@ "type": "github" } ], - "time": "2023-08-02T22:54:39+00:00" + "time": "2024-12-20T23:06:10+00:00" }, { "name": "league/uri", - "version": "6.5.0", + "version": "7.5.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "c68ca445abb04817d740ddd6d0b3551826ef0c5a" + "reference": "81fb5145d2644324614cc532b28efd0215bda430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/c68ca445abb04817d740ddd6d0b3551826ef0c5a", - "reference": "c68ca445abb04817d740ddd6d0b3551826ef0c5a", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", + "reference": "81fb5145d2644324614cc532b28efd0215bda430", "shasum": "" }, "require": { - "ext-json": "*", - "league/uri-interfaces": "^2.3", - "php": "^7.3 || ^8.0", - "psr/http-message": "^1.0" + "league/uri-interfaces": "^7.5", + "php": "^8.1" }, "conflict": { "league/uri-schemes": "^1.0" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19 || ^3.0", - "phpstan/phpstan": "^0.12.90", - "phpstan/phpstan-phpunit": "^0.12.22", - "phpstan/phpstan-strict-rules": "^0.12.11", - "phpunit/phpunit": "^8.0 || ^9.0", - "psr/http-factory": "^1.0" - }, "suggest": { - "ext-fileinfo": "Needed to create Data URI from a filepath", - "ext-intl": "Needed to improve host validation", - "league/uri-components": "Needed to easily manipulate URI objects", - "psr/http-factory": "Needed to use the URI factory" + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "src" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -3253,7 +3688,7 @@ } ], "description": "URI manipulation library", - "homepage": "http://uri.thephpleague.com", + "homepage": "https://uri.thephpleague.com", "keywords": [ "data-uri", "file-uri", @@ -3278,8 +3713,8 @@ "support": { "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", - "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.5.0" + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.5.1" }, "funding": [ { @@ -3287,46 +3722,44 @@ "type": "github" } ], - "time": "2021-08-27T09:54:07+00:00" + "time": "2024-12-08T08:40:02+00:00" }, { "name": "league/uri-interfaces", - "version": "2.3.0", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", - "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.19", - "phpstan/phpstan": "^0.12.90", - "phpstan/phpstan-phpunit": "^0.12.19", - "phpstan/phpstan-strict-rules": "^0.12.9", - "phpunit/phpunit": "^8.5.15 || ^9.5" + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" }, "suggest": { - "ext-intl": "to use the IDNA feature", - "symfony/intl": "to use the IDNA feature via Symfony Polyfill" + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { "psr-4": { - "League\\Uri\\": "src/" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -3340,17 +3773,32 @@ "homepage": "https://nyamsprod.com" } ], - "description": "Common interface for URI representation", - "homepage": "http://github.com/thephpleague/uri-interfaces", + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", "rfc3986", "rfc3987", + "rfc6570", "uri", - "url" + "url", + "ws" ], "support": { - "issues": "https://github.com/thephpleague/uri-interfaces/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0" }, "funding": [ { @@ -3358,43 +3806,44 @@ "type": "github" } ], - "time": "2021-06-28T04:27:21+00:00" + "time": "2024-12-08T08:18:47+00:00" }, { "name": "maatwebsite/excel", - "version": "3.1.48", + "version": "3.1.63", "source": { "type": "git", "url": "https://github.com/SpartnerNL/Laravel-Excel.git", - "reference": "6d0fe2a1d195960c7af7bf0de760582da02a34b9" + "reference": "fccd234da23b39ab03e1a1f6fe9178fb96ec1be1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d0fe2a1d195960c7af7bf0de760582da02a34b9", - "reference": "6d0fe2a1d195960c7af7bf0de760582da02a34b9", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/fccd234da23b39ab03e1a1f6fe9178fb96ec1be1", + "reference": "fccd234da23b39ab03e1a1f6fe9178fb96ec1be1", "shasum": "" }, "require": { "composer/semver": "^3.3", "ext-json": "*", - "illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0", - "php": "^7.0|^8.0", - "phpoffice/phpspreadsheet": "^1.18", - "psr/simple-cache": "^1.0|^2.0|^3.0" + "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0", + "php": "^7.0||^8.0", + "phpoffice/phpspreadsheet": "^1.29.9", + "psr/simple-cache": "^1.0||^2.0||^3.0" }, "require-dev": { - "orchestra/testbench": "^6.0|^7.0|^8.0", + "laravel/scout": "^7.0||^8.0||^9.0||^10.0", + "orchestra/testbench": "^6.0||^7.0||^8.0||^9.0||^10.0", "predis/predis": "^1.1" }, "type": "library", "extra": { "laravel": { - "providers": [ - "Maatwebsite\\Excel\\ExcelServiceProvider" - ], "aliases": { "Excel": "Maatwebsite\\Excel\\Facades\\Excel" - } + }, + "providers": [ + "Maatwebsite\\Excel\\ExcelServiceProvider" + ] } }, "autoload": { @@ -3426,7 +3875,7 @@ ], "support": { "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", - "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.48" + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.63" }, "funding": [ { @@ -3438,33 +3887,39 @@ "type": "github" } ], - "time": "2023-02-22T21:01:38+00:00" + "time": "2025-02-19T14:24:57+00:00" }, { "name": "maennchen/zipstream-php", - "version": "2.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/maennchen/ZipStream-PHP.git", - "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" + "reference": "6187e9cc4493da94b9b63eb2315821552015fca9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", - "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/6187e9cc4493da94b9b63eb2315821552015fca9", + "reference": "6187e9cc4493da94b9b63eb2315821552015fca9", "shasum": "" }, "require": { - "myclabs/php-enum": "^1.5", - "php": ">= 7.1", - "psr/http-message": "^1.0", - "symfony/polyfill-mbstring": "^1.0" + "ext-mbstring": "*", + "ext-zlib": "*", + "php-64bit": "^8.1" }, "require-dev": { "ext-zip": "*", - "guzzlehttp/guzzle": ">= 6.3", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": ">= 7.5" + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": "^5.0" + }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" }, "type": "library", "autoload": { @@ -3501,19 +3956,15 @@ ], "support": { "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.1.0" + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.1" }, "funding": [ { "url": "https://github.com/maennchen", "type": "github" - }, - { - "url": "https://opencollective.com/zipstream", - "type": "open_collective" } ], - "time": "2020-05-30T13:11:16+00:00" + "time": "2024-10-10T12:33:01+00:00" }, { "name": "markbaker/complex", @@ -3624,16 +4075,16 @@ }, { "name": "masterminds/html5", - "version": "2.8.1", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf" + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf", - "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", "shasum": "" }, "require": { @@ -3641,7 +4092,7 @@ "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" }, "type": "library", "extra": { @@ -3685,22 +4136,22 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.8.1" + "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" }, - "time": "2023-05-10T11:58:31+00:00" + "time": "2024-03-31T07:05:07+00:00" }, { "name": "monolog/monolog", - "version": "2.9.1", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1" + "reference": "5cf826f2991858b54d5c3809bee745560a1042a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5cf826f2991858b54d5c3809bee745560a1042a7", + "reference": "5cf826f2991858b54d5c3809bee745560a1042a7", "shasum": "" }, "require": { @@ -3721,8 +4172,8 @@ "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.38 || ^9.6.19", "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", "ruflin/elastica": "^7", @@ -3777,7 +4228,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.1" + "source": "https://github.com/Seldaek/monolog/tree/2.10.0" }, "funding": [ { @@ -3789,86 +4240,24 @@ "type": "tidelift" } ], - "time": "2023-02-06T13:44:46+00:00" - }, - { - "name": "myclabs/php-enum", - "version": "1.8.4", - "source": { - "type": "git", - "url": "https://github.com/myclabs/php-enum.git", - "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", - "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^4.6.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "MyCLabs\\Enum\\": "src/" - }, - "classmap": [ - "stubs/Stringable.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP Enum contributors", - "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" - } - ], - "description": "PHP Enum implementation", - "homepage": "http://github.com/myclabs/php-enum", - "keywords": [ - "enum" - ], - "support": { - "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.4" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", - "type": "tidelift" - } - ], - "time": "2022-08-04T09:53:51+00:00" + "time": "2024-11-12T12:43:37+00:00" }, { "name": "nesbot/carbon", - "version": "2.70.0", + "version": "2.73.0", "source": { "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "d3298b38ea8612e5f77d38d1a99438e42f70341d" + "url": "https://github.com/CarbonPHP/carbon.git", + "reference": "9228ce90e1035ff2f0db84b40ec2e023ed802075" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3298b38ea8612e5f77d38d1a99438e42f70341d", - "reference": "d3298b38ea8612e5f77d38d1a99438e42f70341d", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/9228ce90e1035ff2f0db84b40ec2e023ed802075", + "reference": "9228ce90e1035ff2f0db84b40ec2e023ed802075", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", "psr/clock": "^1.0", @@ -3880,11 +4269,11 @@ "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", - "ondrejmirtes/better-reflection": "*", + "ondrejmirtes/better-reflection": "<6", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12.99 || ^1.7.14", @@ -3897,10 +4286,6 @@ ], "type": "library", "extra": { - "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -3910,6 +4295,10 @@ "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" } }, "autoload": { @@ -3958,29 +4347,179 @@ "type": "tidelift" } ], - "time": "2023-09-07T16:43:50+00:00" + "time": "2025-01-08T20:10:23+00:00" }, { - "name": "nikic/php-parser", - "version": "v4.17.1", + "name": "nette/schema", + "version": "v1.3.2", "source": { "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "url": "https://github.com/nette/schema.git", + "reference": "da801d52f0354f70a638673c4a0f04e16529431d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nette/schema/zipball/da801d52f0354f70a638673c4a0f04e16529431d", + "reference": "da801d52f0354f70a638673c4a0f04e16529431d", "shasum": "" }, "require": { + "nette/utils": "^4.0", + "php": "8.1 - 8.4" + }, + "require-dev": { + "nette/tester": "^2.5.2", + "phpstan/phpstan-nette": "^1.0", + "tracy/tracy": "^2.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.3.2" + }, + "time": "2024-10-06T23:10:23+00:00" + }, + { + "name": "nette/utils", + "version": "v4.0.5", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", + "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", + "shasum": "" + }, + "require": { + "php": "8.0 - 8.4" + }, + "conflict": { + "nette/finder": "<3", + "nette/schema": "<1.2.2" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "dev-master", + "nette/tester": "^2.5", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.9" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v4.0.5" + }, + "time": "2024-08-07T15:39:19+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.4.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -3988,7 +4527,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -4012,22 +4551,22 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "nyholm/psr7", - "version": "1.8.0", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/Nyholm/psr7.git", - "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be" + "reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/3cb4d163b58589e47b35103e8e5e6a6a475b47be", - "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/a71f2b11690f4b24d099d6b16690a90ae14fc6f3", + "reference": "a71f2b11690f4b24d099d6b16690a90ae14fc6f3", "shasum": "" }, "require": { @@ -4080,7 +4619,7 @@ ], "support": { "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.8.0" + "source": "https://github.com/Nyholm/psr7/tree/1.8.2" }, "funding": [ { @@ -4092,7 +4631,7 @@ "type": "github" } ], - "time": "2023-05-02T11:26:24+00:00" + "time": "2024-09-09T07:06:30+00:00" }, { "name": "opis/closure", @@ -4161,24 +4700,24 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.6.3", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "58c3f47f650c94ec05a151692652a868995d2938" + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", - "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", "shasum": "" }, "require": { - "php": "^7|^8" + "php": "^8" }, "require-dev": { - "phpunit/phpunit": "^6|^7|^8|^9", - "vimeo/psalm": "^1|^2|^3|^4" + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4|^5" }, "type": "library", "autoload": { @@ -4224,7 +4763,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2022-06-14T06:56:20+00:00" + "time": "2024-05-08T12:36:18+00:00" }, { "name": "paragonie/random_compat", @@ -4278,23 +4817,23 @@ }, { "name": "phenx/php-font-lib", - "version": "0.5.4", + "version": "0.5.6", "source": { "type": "git", "url": "https://github.com/dompdf/php-font-lib.git", - "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4" + "reference": "a1681e9793040740a405ac5b189275059e2a9863" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/dd448ad1ce34c63d09baccd05415e361300c35b4", - "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4", + "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/a1681e9793040740a405ac5b189275059e2a9863", + "reference": "a1681e9793040740a405ac5b189275059e2a9863", "shasum": "" }, "require": { "ext-mbstring": "*" }, "require-dev": { - "symfony/phpunit-bridge": "^3 || ^4 || ^5" + "symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6" }, "type": "library", "autoload": { @@ -4304,7 +4843,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-3.0" + "LGPL-2.1-or-later" ], "authors": [ { @@ -4316,22 +4855,22 @@ "homepage": "https://github.com/PhenX/php-font-lib", "support": { "issues": "https://github.com/dompdf/php-font-lib/issues", - "source": "https://github.com/dompdf/php-font-lib/tree/0.5.4" + "source": "https://github.com/dompdf/php-font-lib/tree/0.5.6" }, - "time": "2021-12-17T19:44:54+00:00" + "time": "2024-01-29T14:45:26+00:00" }, { "name": "phenx/php-svg-lib", - "version": "0.5.0", + "version": "0.5.4", "source": { "type": "git", "url": "https://github.com/dompdf/php-svg-lib.git", - "reference": "76876c6cf3080bcb6f249d7d59705108166a6685" + "reference": "46b25da81613a9cf43c83b2a8c2c1bdab27df691" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/76876c6cf3080bcb6f249d7d59705108166a6685", - "reference": "76876c6cf3080bcb6f249d7d59705108166a6685", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/46b25da81613a9cf43c83b2a8c2c1bdab27df691", + "reference": "46b25da81613a9cf43c83b2a8c2c1bdab27df691", "shasum": "" }, "require": { @@ -4350,7 +4889,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-3.0" + "LGPL-3.0-or-later" ], "authors": [ { @@ -4362,25 +4901,26 @@ "homepage": "https://github.com/PhenX/php-svg-lib", "support": { "issues": "https://github.com/dompdf/php-svg-lib/issues", - "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.0" + "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.4" }, - "time": "2022-09-06T12:16:56+00:00" + "time": "2024-04-08T12:52:34+00:00" }, { "name": "phpoffice/phpspreadsheet", - "version": "1.25.2", + "version": "1.29.10", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "a317a09e7def49852400a4b3eca4a4b0790ceeb5" + "reference": "c80041b1628c4f18030407134fe88303661d4e4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/a317a09e7def49852400a4b3eca4a4b0790ceeb5", - "reference": "a317a09e7def49852400a4b3eca4a4b0790ceeb5", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c80041b1628c4f18030407134fe88303661d4e4e", + "reference": "c80041b1628c4f18030407134fe88303661d4e4e", "shasum": "" }, "require": { + "composer/pcre": "^1||^2||^3", "ext-ctype": "*", "ext-dom": "*", "ext-fileinfo": "*", @@ -4395,26 +4935,26 @@ "ext-zip": "*", "ext-zlib": "*", "ezyang/htmlpurifier": "^4.15", - "maennchen/zipstream-php": "^2.1", + "maennchen/zipstream-php": "^2.1 || ^3.0", "markbaker/complex": "^3.0", "markbaker/matrix": "^3.0", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", - "dompdf/dompdf": "^1.0 || ^2.0", + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^1.0 || ^2.0 || ^3.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "10.2.4", - "mpdf/mpdf": "8.1.1", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", "phpunit/phpunit": "^8.5 || ^9.0", "squizlabs/php_codesniffer": "^3.7", - "tecnickcom/tcpdf": "6.5" + "tecnickcom/tcpdf": "^6.5" }, "suggest": { "dompdf/dompdf": "Option for rendering PDF with PDF Writer", @@ -4467,22 +5007,22 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.25.2" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.10" }, - "time": "2022-09-25T17:21:01+00:00" + "time": "2025-02-08T02:56:14+00:00" }, { "name": "phpoption/phpoption", - "version": "1.9.1", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -4490,13 +5030,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -4532,7 +5072,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -4544,24 +5084,24 @@ "type": "tidelift" } ], - "time": "2023-02-25T19:38:58+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "phpseclib/phpseclib", - "version": "3.0.21", + "version": "3.0.43", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1" + "reference": "709ec107af3cb2f385b9617be72af8cf62441d02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4580645d3fc05c189024eb3b834c6c1e4f0f30a1", - "reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02", + "reference": "709ec107af3cb2f385b9617be72af8cf62441d02", "shasum": "" }, "require": { - "paragonie/constant_time_encoding": "^1|^2", + "paragonie/constant_time_encoding": "^1|^2|^3", "paragonie/random_compat": "^1.4|^2.0|^9.99.99", "php": ">=5.6.1" }, @@ -4638,7 +5178,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.21" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43" }, "funding": [ { @@ -4654,24 +5194,24 @@ "type": "tidelift" } ], - "time": "2023-07-09T15:24:48+00:00" + "time": "2024-12-14T21:12:59+00:00" }, { "name": "psr/cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { @@ -4691,7 +5231,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for caching libraries", @@ -4701,9 +5241,9 @@ "psr-6" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2021-02-03T23:26:27+00:00" }, { "name": "psr/clock", @@ -4755,20 +5295,20 @@ }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -4797,9 +5337,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/event-dispatcher", @@ -4853,16 +5393,16 @@ }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { @@ -4899,26 +5439,26 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -4942,7 +5482,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -4954,22 +5494,22 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -4978,7 +5518,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -4993,7 +5533,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -5007,36 +5547,36 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -5057,9 +5597,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/2.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:41:46+00:00" }, { "name": "psr/simple-cache", @@ -5114,25 +5654,25 @@ }, { "name": "psy/psysh", - "version": "v0.11.20", + "version": "v0.12.7", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "0fa27040553d1d280a67a4393194df5228afea5b" + "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/0fa27040553d1d280a67a4393194df5228afea5b", - "reference": "0fa27040553d1d280a67a4393194df5228afea5b", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", + "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", "shasum": "" }, "require": { "ext-json": "*", "ext-tokenizer": "*", - "nikic/php-parser": "^4.0 || ^3.1", - "php": "^8.0 || ^7.0.8", - "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" }, "conflict": { "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" @@ -5143,16 +5683,19 @@ "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, "bin": [ "bin/psysh" ], "type": "library", "extra": { + "bamarni-bin": { + "bin-links": false, + "forward-command": false + }, "branch-alias": { - "dev-main": "0.11.x-dev" + "dev-main": "0.12.x-dev" } }, "autoload": { @@ -5184,9 +5727,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.20" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.7" }, - "time": "2023-07-31T14:32:22+00:00" + "time": "2024-12-10T01:58:33+00:00" }, { "name": "ralouphie/getallheaders", @@ -5234,42 +5777,52 @@ }, { "name": "ramsey/collection", - "version": "1.2.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", "shasum": "" }, "require": { - "php": "^7.3 || ^8", - "symfony/polyfill-php81": "^1.23" + "php": "^8.1" }, "require-dev": { - "captainhook/captainhook": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "ergebnis/composer-normalize": "^2.6", - "fakerphp/faker": "^1.5", - "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.8", - "mockery/mockery": "^1.3", + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^0.12.32", - "phpstan/phpstan-mockery": "^0.12.5", - "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5 || ^9", - "psy/psysh": "^0.10.4", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.4" + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" }, "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, "autoload": { "psr-4": { "Ramsey\\Collection\\": "src/" @@ -5297,7 +5850,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.2.2" + "source": "https://github.com/ramsey/collection/tree/2.0.0" }, "funding": [ { @@ -5309,29 +5862,27 @@ "type": "tidelift" } ], - "time": "2021-10-10T03:01:02+00:00" + "time": "2022-12-31T21:50:55+00:00" }, { "name": "ramsey/uuid", - "version": "4.2.3", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8 || ^0.9", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", - "php": "^7.2 || ^8.0", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -5343,24 +5894,23 @@ "doctrine/annotations": "^1.8", "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", - "moontoast/math": "^1.1", "paragonie/random-lib": "^2", "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-mockery": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", "phpunit/phpunit": "^8.5 || ^9", - "slevomat/coding-standard": "^7.0", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -5368,9 +5918,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "4.x-dev" - }, "captainhook": { "force-install": true } @@ -5395,7 +5942,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.2.3" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -5407,20 +5954,20 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:10:38+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "reliese/laravel", - "version": "v1.2.3", + "version": "v1.3.5", "source": { "type": "git", "url": "https://github.com/reliese/laravel.git", - "reference": "3e0d2e5054c6c4f815d72f22915b35e3ffe82858" + "reference": "2fc69cbd416ae762ae9791b5b58adcb66b7c5b6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reliese/laravel/zipball/3e0d2e5054c6c4f815d72f22915b35e3ffe82858", - "reference": "3e0d2e5054c6c4f815d72f22915b35e3ffe82858", + "url": "https://api.github.com/repos/reliese/laravel/zipball/2fc69cbd416ae762ae9791b5b58adcb66b7c5b6c", + "reference": "2fc69cbd416ae762ae9791b5b58adcb66b7c5b6c", "shasum": "" }, "require": { @@ -5470,7 +6017,7 @@ "issues": "https://github.com/reliese/laravel/issues", "source": "https://github.com/reliese/laravel" }, - "time": "2023-08-17T07:50:33+00:00" + "time": "2024-09-26T13:33:01+00:00" }, { "name": "rguedes/pdfmerger", @@ -5524,30 +6071,34 @@ }, { "name": "sabberworm/php-css-parser", - "version": "8.4.0", + "version": "v8.7.0", "source": { "type": "git", - "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", - "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30" + "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git", + "reference": "f414ff953002a9b18e3a116f5e462c56f21237cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30", - "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30", + "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/f414ff953002a9b18e3a116f5e462c56f21237cf", + "reference": "f414ff953002a9b18e3a116f5e462c56f21237cf", "shasum": "" }, "require": { "ext-iconv": "*", - "php": ">=5.6.20" + "php": "^5.6.20 || ^7.0.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { - "codacy/coverage": "^1.4", - "phpunit/phpunit": "^4.8.36" + "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.40" }, "suggest": { "ext-mbstring": "for parsing UTF-8 CSS" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.0.x-dev" + } + }, "autoload": { "psr-4": { "Sabberworm\\CSS\\": "src/" @@ -5560,6 +6111,14 @@ "authors": [ { "name": "Raphael Schweikert" + }, + { + "name": "Oliver Klee", + "email": "github@oliverklee.de" + }, + { + "name": "Jake Hotson", + "email": "jake.github@qzdesign.co.uk" } ], "description": "Parser for CSS Files written in PHP", @@ -5570,32 +6129,35 @@ "stylesheet" ], "support": { - "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", - "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0" + "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues", + "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.7.0" }, - "time": "2021-12-11T13:40:54+00:00" + "time": "2024-10-27T17:38:32+00:00" }, { "name": "sabre/uri", - "version": "2.2.4", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/sabre-io/uri.git", - "reference": "c0c9af9f7754e60a49ebd760e1708adc6d1510c0" + "reference": "b76524c22de90d80ca73143680a8e77b1266c291" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/uri/zipball/c0c9af9f7754e60a49ebd760e1708adc6d1510c0", - "reference": "c0c9af9f7754e60a49ebd760e1708adc6d1510c0", + "url": "https://api.github.com/repos/sabre-io/uri/zipball/b76524c22de90d80ca73143680a8e77b1266c291", + "reference": "b76524c22de90d80ca73143680a8e77b1266c291", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.19.3", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0" + "friendsofphp/php-cs-fixer": "^3.63", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^1.12", + "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan-strict-rules": "^1.6", + "phpunit/phpunit": "^9.6" }, "type": "library", "autoload": { @@ -5630,20 +6192,20 @@ "issues": "https://github.com/sabre-io/uri/issues", "source": "https://github.com/fruux/sabre-uri" }, - "time": "2022-09-19T12:25:28+00:00" + "time": "2024-08-27T12:18:16+00:00" }, { "name": "sabre/xml", - "version": "2.2.6", + "version": "2.2.11", "source": { "type": "git", "url": "https://github.com/sabre-io/xml.git", - "reference": "9cde7cdab1e50893cc83b037b40cd47bfde42a2b" + "reference": "01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/xml/zipball/9cde7cdab1e50893cc83b037b40cd47bfde42a2b", - "reference": "9cde7cdab1e50893cc83b037b40cd47bfde42a2b", + "url": "https://api.github.com/repos/sabre-io/xml/zipball/01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc", + "reference": "01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc", "shasum": "" }, "require": { @@ -5655,9 +6217,9 @@ "sabre/uri": ">=1.0,<3.0.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.17.1", + "friendsofphp/php-cs-fixer": "~2.17.1||3.63.2", "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0" + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" }, "type": "library", "autoload": { @@ -5699,7 +6261,7 @@ "issues": "https://github.com/sabre-io/xml/issues", "source": "https://github.com/fruux/sabre-xml" }, - "time": "2023-06-28T12:56:05+00:00" + "time": "2024-09-06T07:37:46+00:00" }, { "name": "setasign/fpdf", @@ -5749,31 +6311,31 @@ }, { "name": "setasign/fpdi", - "version": "v2.4.1", + "version": "v2.6.3", "source": { "type": "git", "url": "https://github.com/Setasign/FPDI.git", - "reference": "f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b" + "reference": "67c31f5e50c93c20579ca9e23035d8c540b51941" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b", - "reference": "f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/67c31f5e50c93c20579ca9e23035d8c540b51941", + "reference": "67c31f5e50c93c20579ca9e23035d8c540b51941", "shasum": "" }, "require": { "ext-zlib": "*", - "php": "^5.6 || ^7.0 || ^8.0" + "php": "^7.1 || ^8.0" }, "conflict": { "setasign/tfpdf": "<1.31" }, "require-dev": { - "phpunit/phpunit": "~5.7", - "setasign/fpdf": "~1.8", - "setasign/tfpdf": "~1.31", + "phpunit/phpunit": "^7", + "setasign/fpdf": "~1.8.6", + "setasign/tfpdf": "~1.33", "squizlabs/php_codesniffer": "^3.5", - "tecnickcom/tcpdf": "~6.2" + "tecnickcom/tcpdf": "^6.2" }, "suggest": { "setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured." @@ -5809,7 +6371,7 @@ ], "support": { "issues": "https://github.com/Setasign/FPDI/issues", - "source": "https://github.com/Setasign/FPDI/tree/v2.4.1" + "source": "https://github.com/Setasign/FPDI/tree/v2.6.3" }, "funding": [ { @@ -5817,7 +6379,7 @@ "type": "tidelift" } ], - "time": "2023-07-27T08:12:09+00:00" + "time": "2025-02-05T13:22:35+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -5897,16 +6459,16 @@ }, { "name": "symfony/console", - "version": "v5.4.28", + "version": "v5.4.47", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f4f71842f24c2023b91237c72a365306f3c58827" + "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", - "reference": "f4f71842f24c2023b91237c72a365306f3c58827", + "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", + "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", "shasum": "" }, "require": { @@ -5976,7 +6538,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.28" + "source": "https://github.com/symfony/console/tree/v5.4.47" }, "funding": [ { @@ -5992,25 +6554,24 @@ "type": "tidelift" } ], - "time": "2023-08-07T06:12:30+00:00" + "time": "2024-11-06T11:30:55+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.26", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a" + "reference": "cb23e97813c5837a041b73a6d63a9ddff0778f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a", - "reference": "0ad3f7e9a1ab492c5b4214cf22a9dc55dcf8600a", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/cb23e97813c5837a041b73a6d63a9ddff0778f5e", + "reference": "cb23e97813c5837a041b73a6d63a9ddff0778f5e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -6042,7 +6603,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.26" + "source": "https://github.com/symfony/css-selector/tree/v6.4.13" }, "funding": [ { @@ -6058,33 +6619,33 @@ "type": "tidelift" } ], - "time": "2023-07-07T06:10:25+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -6109,7 +6670,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -6125,20 +6686,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/error-handler", - "version": "v5.4.26", + "version": "v5.4.46", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "b26719213a39c9ba57520cbc5e52bfcc5e8d92f9" + "reference": "d19ede7a2cafb386be9486c580649d0f9e3d0363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/b26719213a39c9ba57520cbc5e52bfcc5e8d92f9", - "reference": "b26719213a39c9ba57520cbc5e52bfcc5e8d92f9", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/d19ede7a2cafb386be9486c580649d0f9e3d0363", + "reference": "d19ede7a2cafb386be9486c580649d0f9e3d0363", "shasum": "" }, "require": { @@ -6180,7 +6741,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.26" + "source": "https://github.com/symfony/error-handler/tree/v5.4.46" }, "funding": [ { @@ -6196,48 +6757,43 @@ "type": "tidelift" } ], - "time": "2023-07-16T16:48:57+00:00" + "time": "2024-11-05T14:17:06+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.26", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" + "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", - "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", + "reference": "0ffc48080ab3e9132ea74ef4e09d8dcf26bf897e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/expression-language": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -6265,7 +6821,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.13" }, "funding": [ { @@ -6281,37 +6837,34 @@ "type": "tidelift" } ], - "time": "2023-07-06T06:34:20+00:00" + "time": "2024-09-25T14:18:03+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -6344,7 +6897,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" }, "funding": [ { @@ -6360,20 +6913,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/finder", - "version": "v5.4.27", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" + "reference": "63741784cd7b9967975eec610b256eed3ede022b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", - "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b", + "reference": "63741784cd7b9967975eec610b256eed3ede022b", "shasum": "" }, "require": { @@ -6407,7 +6960,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.27" + "source": "https://github.com/symfony/finder/tree/v5.4.45" }, "funding": [ { @@ -6423,20 +6976,20 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:02:31+00:00" + "time": "2024-09-28T13:32:08+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.28", + "version": "v5.4.48", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2" + "reference": "3f38b8af283b830e1363acd79e5bc3412d055341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/365992c83a836dfe635f1e903ccca43ee03d3dd2", - "reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3f38b8af283b830e1363acd79e5bc3412d055341", + "reference": "3f38b8af283b830e1363acd79e5bc3412d055341", "shasum": "" }, "require": { @@ -6446,7 +6999,7 @@ "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "predis/predis": "~1.0", + "predis/predis": "^1.0|^2.0", "symfony/cache": "^4.4|^5.0|^6.0", "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", @@ -6483,7 +7036,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.28" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.48" }, "funding": [ { @@ -6499,20 +7052,20 @@ "type": "tidelift" } ], - "time": "2023-08-21T07:23:18+00:00" + "time": "2024-11-13T18:58:02+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.28", + "version": "v5.4.48", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "127a2322ca1828157901092518b8ea8e4e1109d4" + "reference": "c2dbfc92b851404567160d1ecf3fb7d9b7bde9b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/127a2322ca1828157901092518b8ea8e4e1109d4", - "reference": "127a2322ca1828157901092518b8ea8e4e1109d4", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c2dbfc92b851404567160d1ecf3fb7d9b7bde9b0", + "reference": "c2dbfc92b851404567160d1ecf3fb7d9b7bde9b0", "shasum": "" }, "require": { @@ -6561,6 +7114,7 @@ "symfony/stopwatch": "^4.4|^5.0|^6.0", "symfony/translation": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/var-dumper": "^4.4.31|^5.4", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -6595,7 +7149,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.28" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.48" }, "funding": [ { @@ -6611,20 +7165,20 @@ "type": "tidelift" } ], - "time": "2023-08-26T13:47:51+00:00" + "time": "2024-11-27T12:43:17+00:00" }, { "name": "symfony/mime", - "version": "v5.4.26", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2" + "reference": "8c1b9b3e5b52981551fc6044539af1d974e39064" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/2ea06dfeee20000a319d8407cea1d47533d5a9d2", - "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2", + "url": "https://api.github.com/repos/symfony/mime/zipball/8c1b9b3e5b52981551fc6044539af1d974e39064", + "reference": "8c1b9b3e5b52981551fc6044539af1d974e39064", "shasum": "" }, "require": { @@ -6639,15 +7193,16 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<4.4", - "symfony/serializer": "<5.4.26|>=6,<6.2.13|>=6.3,<6.3.2" + "symfony/serializer": "<5.4.35|>=6,<6.3.12|>=6.4,<6.4.3" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/process": "^5.4|^6.4", "symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.4.26|~6.2.13|^6.3.2" + "symfony/serializer": "^5.4.35|~6.3.12|^6.4.3" }, "type": "library", "autoload": { @@ -6679,7 +7234,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.26" + "source": "https://github.com/symfony/mime/tree/v5.4.45" }, "funding": [ { @@ -6695,24 +7250,24 @@ "type": "tidelift" } ], - "time": "2023-07-27T06:29:31+00:00" + "time": "2024-10-23T20:18:32+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -6722,12 +7277,9 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6761,7 +7313,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -6777,24 +7329,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "6de50471469b8c9afc38164452ab2b6170ee71c1" + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/6de50471469b8c9afc38164452ab2b6170ee71c1", - "reference": "6de50471469b8c9afc38164452ab2b6170ee71c1", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/48becf00c920479ca2e910c22a5a39e5d47ca956", + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-iconv": "*" @@ -6804,12 +7356,9 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6844,7 +7393,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.31.0" }, "funding": [ { @@ -6860,36 +7409,33 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6925,7 +7471,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -6941,38 +7487,34 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" }, "suggest": { "ext-intl": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -7012,7 +7554,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" }, "funding": [ { @@ -7028,36 +7570,33 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:30:37+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -7096,7 +7635,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -7112,24 +7651,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -7139,12 +7678,9 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -7179,7 +7715,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -7195,109 +7731,30 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -7334,7 +7791,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -7350,33 +7807,30 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -7417,7 +7871,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -7433,99 +7887,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v5.4.28", + "version": "v5.4.47", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" + "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "url": "https://api.github.com/repos/symfony/process/zipball/5d1662fb32ebc94f17ddb8d635454a776066733d", + "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d", "shasum": "" }, "require": { @@ -7558,7 +7933,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.28" + "source": "https://github.com/symfony/process/tree/v5.4.47" }, "funding": [ { @@ -7574,7 +7949,7 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:36:04+00:00" + "time": "2024-11-06T11:36:42+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -7667,16 +8042,16 @@ }, { "name": "symfony/routing", - "version": "v5.4.26", + "version": "v5.4.48", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "853fc7df96befc468692de0a48831b38f04d2cb2" + "reference": "dd08c19879a9b37ff14fd30dcbdf99a4cf045db1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/853fc7df96befc468692de0a48831b38f04d2cb2", - "reference": "853fc7df96befc468692de0a48831b38f04d2cb2", + "url": "https://api.github.com/repos/symfony/routing/zipball/dd08c19879a9b37ff14fd30dcbdf99a4cf045db1", + "reference": "dd08c19879a9b37ff14fd30dcbdf99a4cf045db1", "shasum": "" }, "require": { @@ -7737,7 +8112,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.26" + "source": "https://github.com/symfony/routing/tree/v5.4.48" }, "funding": [ { @@ -7753,47 +8128,47 @@ "type": "tidelift" } ], - "time": "2023-07-24T13:28:37+00:00" + "time": "2024-11-12T18:20:21+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -7820,7 +8195,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -7836,38 +8211,38 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/string", - "version": "v5.4.26", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "1181fe9270e373537475e826873b5867b863883c" + "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", - "reference": "1181fe9270e373537475e826873b5867b863883c", + "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", + "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -7906,7 +8281,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.26" + "source": "https://github.com/symfony/string/tree/v6.4.15" }, "funding": [ { @@ -7922,57 +8297,55 @@ "type": "tidelift" } ], - "time": "2023-06-28T12:46:07+00:00" + "time": "2024-11-13T13:31:12+00:00" }, { "name": "symfony/translation", - "version": "v5.4.24", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "de237e59c5833422342be67402d487fbf50334ff" + "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/de237e59c5833422342be67402d487fbf50334ff", - "reference": "de237e59c5833422342be67402d487fbf50334ff", + "url": "https://api.github.com/repos/symfony/translation/zipball/bee9bfabfa8b4045a66bf82520e492cddbaffa66", + "reference": "bee9bfabfa8b4045a66bf82520e492cddbaffa66", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" + "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { - "symfony/config": "<4.4", - "symfony/console": "<5.3", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-client-contracts": "<2.5", + "symfony/http-kernel": "<5.4", + "symfony/service-contracts": "<2.5", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" }, "provide": { - "symfony/translation-implementation": "2.3" + "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { + "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/http-client-contracts": "^2.5|^3.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/intl": "^5.4|^6.0|^7.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" + "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -8003,7 +8376,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.24" + "source": "https://github.com/symfony/translation/tree/v6.4.13" }, "funding": [ { @@ -8019,42 +8392,42 @@ "type": "tidelift" } ], - "time": "2023-05-19T12:34:17+00:00" + "time": "2024-09-27T18:14:25+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.5.2", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", - "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", "shasum": "" }, "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" + "php": ">=8.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { "psr-4": { "Symfony\\Contracts\\Translation\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -8081,7 +8454,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" }, "funding": [ { @@ -8097,20 +8470,20 @@ "type": "tidelift" } ], - "time": "2022-06-27T16:58:25+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.28", + "version": "v5.4.48", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "684b36ff415e1381d4a943c3ca2502cd2debad73" + "reference": "42f18f170aa86d612c3559cfb3bd11a375df32c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/684b36ff415e1381d4a943c3ca2502cd2debad73", - "reference": "684b36ff415e1381d4a943c3ca2502cd2debad73", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/42f18f170aa86d612c3559cfb3bd11a375df32c8", + "reference": "42f18f170aa86d612c3559cfb3bd11a375df32c8", "shasum": "" }, "require": { @@ -8170,7 +8543,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.28" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.48" }, "funding": [ { @@ -8186,35 +8559,37 @@ "type": "tidelift" } ], - "time": "2023-08-24T13:38:36+00:00" + "time": "2024-11-08T15:21:10+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.6", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c" + "reference": "0d72ac1c00084279c1816675284073c5a337c20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/c42125b83a4fa63b187fdf29f9c93cb7733da30c", - "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0d72ac1c00084279c1816675284073c5a337c20d", + "reference": "0d72ac1c00084279c1816675284073c5a337c20d", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "php": "^7.4 || ^8.0", + "symfony/css-selector": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -8237,9 +8612,9 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.6" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.3.0" }, - "time": "2023-01-03T09:29:04+00:00" + "time": "2024-12-21T16:25:41+00:00" }, { "name": "vitalybaev/google-merchant-feed", @@ -8289,31 +8664,31 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.5.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -8322,10 +8697,10 @@ "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -8357,7 +8732,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -8369,7 +8744,7 @@ "type": "tidelift" } ], - "time": "2022-10-16T01:01:54+00:00" + "time": "2024-07-20T21:52:34+00:00" }, { "name": "voku/portable-ascii", @@ -8536,16 +8911,16 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "9.0-dev" - }, "laravel": { - "providers": [ - "Yajra\\DataTables\\DataTablesServiceProvider" - ], "aliases": { "DataTables": "Yajra\\DataTables\\Facades\\DataTables" - } + }, + "providers": [ + "Yajra\\DataTables\\DataTablesServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "9.0-dev" } }, "autoload": { @@ -8620,16 +8995,16 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - }, "laravel": { - "providers": [ - "Barryvdh\\Debugbar\\ServiceProvider" - ], "aliases": { "Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar" - } + }, + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "3.6-dev" } }, "autoload": { @@ -8676,16 +9051,16 @@ }, { "name": "barryvdh/laravel-ide-helper", - "version": "v2.13.0", + "version": "v2.14.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "81d5b223ff067a1f38e14c100997e153b837fe4a" + "reference": "485c756f6cff408d6b273274c5e86112c3973d98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/81d5b223ff067a1f38e14c100997e153b837fe4a", - "reference": "81d5b223ff067a1f38e14c100997e153b837fe4a", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/485c756f6cff408d6b273274c5e86112c3973d98", + "reference": "485c756f6cff408d6b273274c5e86112c3973d98", "shasum": "" }, "require": { @@ -8696,7 +9071,7 @@ "illuminate/console": "^8 || ^9 || ^10", "illuminate/filesystem": "^8 || ^9 || ^10", "illuminate/support": "^8 || ^9 || ^10", - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5", "php": "^7.3 || ^8.0", "phpdocumentor/type-resolver": "^1.1.0" }, @@ -8709,20 +9084,20 @@ "orchestra/testbench": "^6 || ^7 || ^8", "phpunit/phpunit": "^8.5 || ^9", "spatie/phpunit-snapshot-assertions": "^3 || ^4", - "vimeo/psalm": "^3.12" + "vimeo/psalm": "^5.4" }, "suggest": { "illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9|^10)." }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.12-dev" - }, "laravel": { "providers": [ "Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider" ] + }, + "branch-alias": { + "dev-master": "2.14-dev" } }, "autoload": { @@ -8754,7 +9129,7 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-ide-helper/issues", - "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.13.0" + "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.14.0" }, "funding": [ { @@ -8766,24 +9141,24 @@ "type": "github" } ], - "time": "2023-02-04T13:56:40+00:00" + "time": "2024-02-05T08:16:36+00:00" }, { "name": "barryvdh/reflection-docblock", - "version": "v2.1.1", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/barryvdh/ReflectionDocBlock.git", - "reference": "e6811e927f0ecc37cc4deaa6627033150343e597" + "reference": "b6ff9f93603561f50e53b64310495d20b8dff5d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/e6811e927f0ecc37cc4deaa6627033150343e597", - "reference": "e6811e927f0ecc37cc4deaa6627033150343e597", + "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/b6ff9f93603561f50e53b64310495d20b8dff5d8", + "reference": "b6ff9f93603561f50e53b64310495d20b8dff5d8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^8.5.14|^9" @@ -8795,7 +9170,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.3.x-dev" } }, "autoload": { @@ -8816,22 +9191,22 @@ } ], "support": { - "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.1.1" + "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.3.1" }, - "time": "2023-06-14T05:06:27+00:00" + "time": "2025-01-18T19:26:32+00:00" }, { "name": "composer/class-map-generator", - "version": "1.1.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9" + "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/953cc4ea32e0c31f2185549c7d216d7921f03da9", - "reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ffe442c5974c44a9343e37a0abcb1cc37319f5b9", + "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9", "shasum": "" }, "require": { @@ -8840,12 +9215,12 @@ "symfony/finder": "^4.4 || ^5.3 || ^6 || ^7" }, "require-dev": { - "phpstan/phpstan": "^1.6", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/filesystem": "^5.4 || ^6", - "symfony/phpunit-bridge": "^5" + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-deprecation-rules": "^1 || ^2", + "phpstan/phpstan-phpunit": "^1 || ^2", + "phpstan/phpstan-strict-rules": "^1.1 || ^2", + "phpunit/phpunit": "^8", + "symfony/filesystem": "^5.4 || ^6" }, "type": "library", "extra": { @@ -8875,7 +9250,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.1.0" + "source": "https://github.com/composer/class-map-generator/tree/1.6.0" }, "funding": [ { @@ -8891,105 +9266,34 @@ "type": "tidelift" } ], - "time": "2023-06-30T13:58:57+00:00" - }, - { - "name": "composer/pcre", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "3fdb2807b31a78a40ad89570e30ec77466c98717" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/3fdb2807b31a78a40ad89570e30ec77466c98717", - "reference": "3fdb2807b31a78a40ad89570e30ec77466c98717", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/2.1.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-11-16T18:32:04+00:00" + "time": "2025-02-05T10:05:34+00:00" }, { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -9016,7 +9320,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -9032,7 +9336,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "facade/flare-client-php", @@ -9137,16 +9441,16 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { - "providers": [ - "Facade\\Ignition\\IgnitionServiceProvider" - ], "aliases": { "Flare": "Facade\\Ignition\\Facades\\Flare" - } + }, + "providers": [ + "Facade\\Ignition\\IgnitionServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "2.x-dev" } }, "autoload": { @@ -9232,20 +9536,20 @@ }, { "name": "fakerphp/faker", - "version": "v1.20.0", + "version": "v1.24.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -9256,7 +9560,8 @@ "bamarni/composer-bin-plugin": "^1.4.1", "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "suggest": { "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", @@ -9266,11 +9571,6 @@ "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.20-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -9293,32 +9593,32 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.24.1" }, - "time": "2022-07-20T13:12:54+00:00" + "time": "2024-11-21T13:46:39+00:00" }, { "name": "filp/whoops", - "version": "2.15.3", + "version": "2.17.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" + "reference": "075bc0c26631110584175de6523ab3f1652eb28e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", + "url": "https://api.github.com/repos/filp/whoops/zipball/075bc0c26631110584175de6523ab3f1652eb28e", + "reference": "075bc0c26631110584175de6523ab3f1652eb28e", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", + "php": "^7.1 || ^8.0", "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^4.0 || ^5.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -9358,7 +9658,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.3" + "source": "https://github.com/filp/whoops/tree/2.17.0" }, "funding": [ { @@ -9366,7 +9666,7 @@ "type": "github" } ], - "time": "2023-07-13T12:00:00+00:00" + "time": "2025-01-25T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -9421,36 +9721,41 @@ }, { "name": "laravel/sail", - "version": "v1.19.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "4f230634a3163f3442def6a4e6ffdb02b02e14d6" + "reference": "e81a7bd7ac1a745ccb25572830fecf74a89bb48a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/4f230634a3163f3442def6a4e6ffdb02b02e14d6", - "reference": "4f230634a3163f3442def6a4e6ffdb02b02e14d6", + "url": "https://api.github.com/repos/laravel/sail/zipball/e81a7bd7ac1a745ccb25572830fecf74a89bb48a", + "reference": "e81a7bd7ac1a745ccb25572830fecf74a89bb48a", "shasum": "" }, "require": { "illuminate/console": "^8.0|^9.0|^10.0", "illuminate/contracts": "^8.0|^9.0|^10.0", "illuminate/support": "^8.0|^9.0|^10.0", - "php": "^7.3|^8.0" + "php": "^8.0", + "symfony/yaml": "^6.0" + }, + "require-dev": { + "orchestra/testbench": "^6.0|^7.0|^8.0", + "phpstan/phpstan": "^1.10" }, "bin": [ "bin/sail" ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - }, "laravel": { "providers": [ "Laravel\\Sail\\SailServiceProvider" ] + }, + "branch-alias": { + "dev-master": "1.x-dev" } }, "autoload": { @@ -9477,29 +9782,31 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2023-01-31T13:37:57+00:00" + "time": "2023-09-11T17:37:09+00:00" }, { "name": "maximebf/debugbar", - "version": "v1.18.2", + "version": "v1.23.6", "source": { "type": "git", - "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "17dcf3f6ed112bb85a37cf13538fd8de49f5c274" + "url": "https://github.com/php-debugbar/php-debugbar.git", + "reference": "4b3d5f1afe09a7db5a9d3282890f49f6176d6542" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/17dcf3f6ed112bb85a37cf13538fd8de49f5c274", - "reference": "17dcf3f6ed112bb85a37cf13538fd8de49f5c274", + "url": "https://api.github.com/repos/php-debugbar/php-debugbar/zipball/4b3d5f1afe09a7db5a9d3282890f49f6176d6542", + "reference": "4b3d5f1afe09a7db5a9d3282890f49f6176d6542", "shasum": "" }, "require": { - "php": "^7.1|^8", + "php": "^7.2|^8", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4|^5|^6" + "symfony/var-dumper": "^4|^5|^6|^7" }, "require-dev": { - "phpunit/phpunit": ">=7.5.20 <10.0", + "dbrekelmans/bdi": "^1", + "phpunit/phpunit": "^8|^9", + "symfony/panther": "^1|^2.1", "twig/twig": "^1.38|^2.7|^3.0" }, "suggest": { @@ -9510,7 +9817,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-master": "1.23-dev" } }, "autoload": { @@ -9540,23 +9847,23 @@ "debugbar" ], "support": { - "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.2" + "issues": "https://github.com/php-debugbar/php-debugbar/issues", + "source": "https://github.com/php-debugbar/php-debugbar/tree/v1.23.6" }, - "time": "2023-02-04T15:27:00+00:00" + "time": "2025-02-13T12:22:36+00:00" }, { "name": "mockery/mockery", - "version": "1.6.6", + "version": "1.6.12", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e" + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/b8e0bb7d8c604046539c1115994632c74dcb361e", - "reference": "b8e0bb7d8c604046539c1115994632c74dcb361e", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { @@ -9568,10 +9875,8 @@ "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.6.10", - "psalm/plugin-phpunit": "^0.18.4", - "symplify/easy-coding-standard": "^11.5.0", - "vimeo/psalm": "^4.30" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, "type": "library", "autoload": { @@ -9628,20 +9933,20 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2023-08-09T00:03:52+00:00" + "time": "2024-05-16T03:13:13+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "024473a478be9df5fdaca2c793f2232fe788e414" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414", + "reference": "024473a478be9df5fdaca2c793f2232fe788e414", "shasum": "" }, "require": { @@ -9649,11 +9954,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -9679,7 +9985,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0" }, "funding": [ { @@ -9687,7 +9993,7 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2025-02-12T12:17:51+00:00" }, { "name": "nunomaduro/collision", @@ -9778,20 +10084,21 @@ }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -9832,9 +10139,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -9942,25 +10255,33 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "doctrine/deprecations": "^1.0", + "php": "^7.3 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.18|^2.0" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -9986,41 +10307,88 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" }, - "time": "2022-03-15T21:29:03+00:00" + "time": "2024-11-09T15:12:26+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "9.2.28", + "name": "phpstan/phpdoc-parser", + "version": "2.1.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef", - "reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", + "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^5.3.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.1.0" + }, + "time": "2025-02-19T13:28:12+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -10029,7 +10397,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -10058,7 +10426,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.28" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -10066,7 +10434,7 @@ "type": "github" } ], - "time": "2023-09-12T14:36:20+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -10311,45 +10679,45 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.12", + "version": "9.6.22", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a122c2ebd469b751d774aa0f613dc0d67697653f" + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a122c2ebd469b751d774aa0f613dc0d67697653f", - "reference": "a122c2ebd469b751d774aa0f613dc0d67697653f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c", + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.1", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -10394,7 +10762,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.12" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22" }, "funding": [ { @@ -10410,20 +10778,20 @@ "type": "tidelift" } ], - "time": "2023-09-12T14:39:31+00:00" + "time": "2024-12-05T13:48:26+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -10458,7 +10826,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -10466,7 +10834,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -10655,20 +11023,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -10700,7 +11068,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -10708,20 +11076,20 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -10766,7 +11134,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -10774,7 +11142,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -10841,16 +11209,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -10906,7 +11274,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -10914,20 +11282,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -10970,7 +11338,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -10978,24 +11346,24 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -11027,7 +11395,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -11035,7 +11403,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -11214,16 +11582,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -11235,7 +11603,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -11256,8 +11624,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -11265,7 +11632,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -11377,17 +11744,89 @@ "time": "2020-09-28T06:39:44+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.2.1", + "name": "symfony/yaml", + "version": "v6.4.18", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "url": "https://github.com/symfony/yaml.git", + "reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/symfony/yaml/zipball/bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5", + "reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0|^7.0" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v6.4.18" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-01-07T09:44:41+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -11416,7 +11855,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -11424,7 +11863,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], @@ -11433,8 +11872,8 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.3|^8.0" + "php": "^7.4|^8.0" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/config/app.php b/config/app.php index a7b8065..b5f5638 100755 --- a/config/app.php +++ b/config/app.php @@ -51,7 +51,7 @@ return [ | your application so that it is used when running Artisan tasks. | */ - + 'mode' => env('APP_MODE', 'live'), 'url' => env('APP_URL', 'https://mivita'), 'domain' => env('APP_DOMAIN', 'mivita'), 'tld_care' => env('APP_TLD_CARE', '.local'), @@ -76,7 +76,7 @@ return [ 'main_tax_rate' => env('APP_MAIN_TAX_RATE', 19), 'shipping_tax' => env('APP_SHIPPING_TAX', 19), - 'php_version' => env('APP_PHP_VERSION', '7.4'), + 'php_version' => env('APP_PHP_VERSION', '8.2'), /* 'url_backend' => env('APP_URL', 'http://mivita.local/'), 'url_backend' => env('APP_URL', 'http://mivita.local/'), @@ -177,7 +177,7 @@ return [ Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, Reliese\Coders\CodersServiceProvider::class, - + Intervention\Image\ImageServiceProvider::class, /* * Package Service Providers... */ @@ -192,11 +192,9 @@ return [ // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, - Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, Jenssegers\Date\DateServiceProvider::class, Collective\Html\HtmlServiceProvider::class, - Intervention\Image\ImageServiceProvider::class, Maatwebsite\Excel\ExcelServiceProvider::class, Yajra\DataTables\DataTablesServiceProvider::class, App\Providers\YardServiceProvider::class @@ -250,10 +248,10 @@ return [ 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, - 'Input' => Illuminate\Support\Facades\Input::class, + //'Input' => Illuminate\Support\Facades\Input::class, 'Form' => Collective\Html\FormFacade::class, 'HTML' => Collective\Html\HtmlFacade::class, - 'Image' => Intervention\Image\Facades\Image::class, + 'Image' => Intervention\Image\Facades\Image::class, 'Carbon' => Carbon\Carbon::class, 'Date' => Jenssegers\Date\Date::class, 'HTMLHelper' => App\Services\HTMLHelper::class, diff --git a/config/image.php b/config/image.php deleted file mode 100644 index 2b1d2c3..0000000 --- a/config/image.php +++ /dev/null @@ -1,20 +0,0 @@ - 'gd' - -]; diff --git a/cron_script_local.sh b/cron_script_local.sh index c519548..8829457 100644 --- a/cron_script_local.sh +++ b/cron_script_local.sh @@ -1,8 +1,10 @@ #!/bin/bash echo $(date) # Will print the output of date command /Applications/MAMP/bin/php/php7.4.33/bin/php -v -/Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan business:store 0 0 2>&1 -/Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan user:cleanup 2>&1 +# /Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan business:store 0 0 2>&1 +# /Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan user:cleanup 2>&1 +/Applications/MAMP/bin/php/php7.4.33/bin/php ../artisan user:make_abo_order 2>&1 + # php /path/to/artisan schedule:run 1>> /dev/null 2>&1 # cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1 \ No newline at end of file diff --git a/cron_script_server.sh b/cron_script_server.sh index 34ac6ee..8d66ac6 100644 --- a/cron_script_server.sh +++ b/cron_script_server.sh @@ -1,7 +1,8 @@ #!/bin/bash echo $(date) # Will print the output of date command -/usr/bin/php74 -v -/usr/bin/php74 ../artisan business:store 0 0 2>&1 -/usr/bin/php74 ../artisan user:cleanup 2>&1 +/usr/bin/php82 -v +/usr/bin/php82 ../artisan business:store 0 0 2>&1 +/usr/bin/php82 ../artisan user:cleanup 2>&1 +/usr/bin/php82 ../artisan user:make_abo_order 2>&1 # php /path/to/artisan schedule:run 1>> /dev/null 2>&1 # cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1 \ No newline at end of file diff --git a/database/migrations/2019_02_23_163832_create_shopping_payments_table.php b/database/migrations/2019_02_23_163832_create_shopping_payments_table.php index 16ff321..feb8150 100644 --- a/database/migrations/2019_02_23_163832_create_shopping_payments_table.php +++ b/database/migrations/2019_02_23_163832_create_shopping_payments_table.php @@ -21,7 +21,9 @@ class CreateShoppingPaymentsTable extends Migration $table->string('clearingtype',3); $table->string('wallettype', 3)->nullable(); $table->string('onlinebanktransfertype',3)->nullable(); + $table->string('pseudocardpan')->nullable(); + $table->string('reference', 16); $table->unsignedInteger('amount'); $table->string('currency', 6); @@ -31,6 +33,7 @@ class CreateShoppingPaymentsTable extends Migration $table->boolean('is_abo')->default(false); $table->unsignedTinyInteger('abo_interval')->nullable(); + $table->string('identifier')->nullable(); $table->char('mode', 4)->nullable(); diff --git a/database/migrations/2024_07_29_144455_create_user_abos_table.php b/database/migrations/2024_07_29_144455_create_user_abos_table.php index 7512c0f..848e23e 100644 --- a/database/migrations/2024_07_29_144455_create_user_abos_table.php +++ b/database/migrations/2024_07_29_144455_create_user_abos_table.php @@ -16,15 +16,18 @@ class CreateUserAbosTable extends Migration Schema::create('user_abos', function (Blueprint $table) { $table->increments('id'); $table->unsignedInteger('user_id')->nullable(); + $table->unsignedInteger('member_id')->nullable(); + $table->unsignedInteger('shopping_user_id'); $table->char('is_for', 2)->nullable(); + $table->string('email')->nullable(); $table->unsignedInteger('payone_userid'); $table->string('clearingtype',3); $table->string('wallettype', 3)->nullable(); - $table->unsignedInteger('amount'); - $table->string('currency', 6); - + $table->string('carddata')->nullable(); + + $table->decimal('amount', 13, 2)->default(0.00); $table->boolean('active')->default(true); $table->unsignedTinyInteger('status')->index()->default(0); @@ -34,9 +37,6 @@ class CreateUserAbosTable extends Migration $table->date('next_date')->nullable(); $table->date('cancel_date')->nullable(); - $table->unsignedTinyInteger('count')->default(0); - - $table->timestamps(); $table->softDeletes(); $table->timestamp('user_deleted_at')->nullable(); @@ -45,6 +45,10 @@ class CreateUserAbosTable extends Migration ->references('id') ->on('users'); + $table->foreign('member_id') + ->references('id') + ->on('users'); + $table->foreign('shopping_user_id') ->references('id') ->on('shopping_users'); diff --git a/database/migrations/2024_10_17_161306_create_user_abo_items_table.php b/database/migrations/2024_10_17_161306_create_user_abo_items_table.php new file mode 100644 index 0000000..d006229 --- /dev/null +++ b/database/migrations/2024_10_17_161306_create_user_abo_items_table.php @@ -0,0 +1,49 @@ +increments('id'); + $table->unsignedInteger('user_abo_id'); + $table->unsignedInteger('product_id'); + $table->unsignedTinyInteger('comp')->nullable(); + $table->unsignedInteger('qty'); + + $table->unsignedTinyInteger('status')->index()->default(0); + $table->timestamps(); + + $table->foreign('user_abo_id') + ->references('id') + ->on('user_abos') + ->onDelete('cascade'); + + $table->foreign('product_id') + ->references('id') + ->on('products'); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_abo_items'); + } +} diff --git a/mivita.code-workspace b/mivita.code-workspace index 876a149..29881eb 100644 --- a/mivita.code-workspace +++ b/mivita.code-workspace @@ -4,5 +4,7 @@ "path": "." } ], - "settings": {} + "settings": { + "CodeGPT.apiKey": "CodeGPT Plus Beta" + } } \ No newline at end of file diff --git a/packages/shoppingcart/.gitignore b/packages/shoppingcart/.gitignore deleted file mode 100644 index 225319b..0000000 --- a/packages/shoppingcart/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/vendor -composer.phar -composer.lock -.DS_Store -.idea/ \ No newline at end of file diff --git a/packages/shoppingcart/.travis.yml b/packages/shoppingcart/.travis.yml deleted file mode 100644 index 51c3700..0000000 --- a/packages/shoppingcart/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: php - -php: - - 7.0 - -before_script: - - composer self-update - - composer install --prefer-source --no-interaction - -script: vendor/bin/phpunit \ No newline at end of file diff --git a/packages/shoppingcart/CanBeBought.php b/packages/shoppingcart/CanBeBought.php deleted file mode 100644 index 75b2729..0000000 --- a/packages/shoppingcart/CanBeBought.php +++ /dev/null @@ -1,43 +0,0 @@ -getKey() : $this->id; - } - - /** - * Get the description or title of the Buyable item. - * - * @return string - */ - public function getBuyableDescription($options = null) - { - if(property_exists($this, 'name')) return $this->name; - if(property_exists($this, 'title')) return $this->title; - if(property_exists($this, 'description')) return $this->description; - - return null; - } - - /** - * Get the price of the Buyable item. - * - * @return float - */ - public function getBuyablePrice($options = null) - { - if(property_exists($this, 'price')) return $this->price; - - return null; - } -} \ No newline at end of file diff --git a/packages/shoppingcart/Cart.php b/packages/shoppingcart/Cart.php deleted file mode 100644 index eaaf942..0000000 --- a/packages/shoppingcart/Cart.php +++ /dev/null @@ -1,686 +0,0 @@ -session = $session; - $this->events = $events; - $this->extraCosts = new Collection(); - - $this->instance(self::DEFAULT_INSTANCE); - } - - /** - * Set the current cart instance. - * - * @param string|null $instance - * @return Cart - */ - public function instance($instance = null) - { - $instance = $instance ?: self::DEFAULT_INSTANCE; - - $this->instance = sprintf('%s.%s', 'cart', $instance); - - return $this; - } - - /** - * Get the current cart instance. - * - * @return string - */ - public function currentInstance() - { - return str_replace('cart.', '', $this->instance); - } - - /** - * Add an item to the cart. - * - * @param mixed $id - * @param mixed $name - * @param int|float $qty - * @param float $price - * @param array $options - * @return CartItem - */ - public function add($id, $name = null, $qty = null, $price = null, array $options = []) - { - if ($this->isMulti($id)) { - return array_map(function ($item) { - return $this->add($item); - }, $id); - } - - $cartItem = $this->createCartItem($id, $name, $qty, $price, $options); - - $content = $this->getContent(); - - if ($content->has($cartItem->rowId)) { - $cartItem->qty += $content->get($cartItem->rowId)->qty; - } - - $content->put($cartItem->rowId, $cartItem); - - $this->events->dispatch('cart.added', $cartItem); - - $this->session->put($this->instance, $content); - - return $cartItem; - } - - /** - * Sets/adds an additional cost on the cart. - * - * @param string $name - * @param float $price - * @todo add in session - */ - public function addCost($name, $price) - { - $oldCost = $this->extraCosts->pull($name, 0); - - $this->extraCosts->put($name, $price + $oldCost); - } - - /** - * Gets an additional cost by name - * - * @param $name - * @param int|null $decimals - * @param string|null $decimalPoint - * @param string|null $thousandSeparator - * @return string - */ - public function getCost($name) - { - $cost = $this->extraCosts->get($name, 0); - - return $this->numberFormat($cost); - } - - /** - * Update the cart item with the given rowId. - * - * @param string $rowId - * @param mixed $qty - * @return CartItem - */ - public function update($rowId, $qty) - { - $cartItem = $this->get($rowId); - - if ($qty instanceof Buyable) { - $cartItem->updateFromBuyable($qty); - } elseif (is_array($qty)) { - $cartItem->updateFromArray($qty); - } else { - $cartItem->qty = $qty; - } - - $content = $this->getContent(); - - if ($rowId !== $cartItem->rowId) { - $content->pull($rowId); - - if ($content->has($cartItem->rowId)) { - $existingCartItem = $this->get($cartItem->rowId); - $cartItem->setQuantity($existingCartItem->qty + $cartItem->qty); - } - } - - if ($cartItem->qty <= 0) { - $this->remove($cartItem->rowId); - return; - } else { - $content->put($cartItem->rowId, $cartItem); - } - - $this->events->dispatch('cart.updated', $cartItem); - - $this->session->put($this->instance, $content); - - return $cartItem; - } - - /** - * Remove the cart item with the given rowId from the cart. - * - * @param string $rowId - * @return void - */ - public function remove($rowId) - { - $cartItem = $this->get($rowId); - - $content = $this->getContent(); - - $content->pull($cartItem->rowId); - - $this->events->dispatch('cart.removed', $cartItem); - - $this->session->put($this->instance, $content); - } - - /** - * Get a cart item from the cart by its rowId. - * - * @param string $rowId - * @return CartItem - */ - public function get($rowId) - { - $content = $this->getContent(); - - if ( ! $content->has($rowId)) - throw new InvalidRowIDException("The cart does not contain rowId {$rowId}."); - - return $content->get($rowId); - } - - /** - * Destroy the current cart instance. - * - * @return void - */ - public function destroy() - { - $this->session->remove($this->instance); - } - - /** - * Get the content of the cart. - * - * @return Collection - */ - public function content() - { - if (is_null($this->session->get($this->instance))) { - return new Collection(); - } - - return $this->session->get($this->instance); - } - - /** - * Get the number of items in the cart. - * - * @return int|float - */ - public function count() - { - $content = $this->getContent(); - - return $content->sum('qty'); - } - - /** - * Get the total price of the items in the cart. - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return string - */ - public function total() - { - $content = $this->getContent(); - - $total = $content->reduce(function ($total, CartItem $cartItem) { - return $total + ($cartItem->qty * $cartItem->priceTax); - }, 0); - - $totalCost = $this->extraCosts->reduce(function ($total, $cost) { - return $total + $cost; - }, 0); - - $total += $totalCost; - - return $this->numberFormat($total); - } - - /** - * Get the total tax of the items in the cart. - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return float - */ - public function tax() - { - $content = $this->getContent(); - - $tax = $content->reduce(function ($tax, CartItem $cartItem) { - return $tax + ($cartItem->qty * $cartItem->tax); - }, 0); - - return $this->numberFormat($tax); - } - - /** - * Get the subtotal (total - tax) of the items in the cart. - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return float - */ - public function subtotal() - { - $content = $this->getContent(); - - $subTotal = $content->reduce(function ($subTotal, CartItem $cartItem) { - return $subTotal + ($cartItem->qty * $cartItem->price); - }, 0); - - return $this->numberFormat($subTotal); - } - - /** - * Search the cart content for a cart item matching the given search closure. - * - * @param \Closure $search - * @return Collection - */ - public function search(Closure $search) - { - $content = $this->getContent(); - - return $content->filter($search); - } - - /** - * Associate the cart item with the given rowId with the given model. - * - * @param string $rowId - * @param mixed $model - * @return void - */ - public function associate($rowId, $model) - { - if(is_string($model) && ! class_exists($model)) { - throw new UnknownModelException("The supplied model {$model} does not exist."); - } - - $cartItem = $this->get($rowId); - - $cartItem->associate($model); - - $content = $this->getContent(); - - $content->put($cartItem->rowId, $cartItem); - - $this->session->put($this->instance, $content); - } - - /** - * Set the tax rate for the cart item with the given rowId. - * - * @param string $rowId - * @param int|float $taxRate - * @return void - */ - public function setTax($rowId, $taxRate) - { - $cartItem = $this->get($rowId); - - $cartItem->setTaxRate($taxRate); - - $content = $this->getContent(); - - $content->put($cartItem->rowId, $cartItem); - - $this->session->put($this->instance, $content); - } - - /** - * Store an the current instance of the cart. - * - * @param mixed $identifier - * @return void - */ - public function store($identifier) - { - $content = $this->getContent(); - - if ($identifier instanceof InstanceIdentifier) { - $identifier = $identifier->getInstanceIdentifier(); - } - - $instance = $this->currentInstance(); - - if ($this->storedCartInstanceWithIdentifierExists($instance, $identifier)) { - throw new CartAlreadyStoredException("A cart with identifier {$identifier} was already stored."); - } - - $this->getConnection()->table($this->getTableName())->insert([ - 'identifier' => $identifier, - 'instance' => $instance, - 'content' => serialize($content), - 'created_at' => $this->createdAt ?: Carbon::now(), - 'updated_at' => Carbon::now(), - ]); - - $this->events->dispatch('cart.stored'); - - } - - /** - * @param $identifier - * - * @return bool - */ - private function storedCartInstanceWithIdentifierExists($instance, $identifier) - { - return $this->getConnection()->table($this->getTableName())->where(['identifier' => $identifier, 'instance'=> $instance])->exists(); - } - - - /** - * Restore the cart with the given identifier. - * - * @param mixed $identifier - * @return void - */ - public function restore($identifier) - { - if ($identifier instanceof InstanceIdentifier) { - $identifier = $identifier->getInstanceIdentifier(); - } - - $currentInstance = $this->currentInstance(); - - if (!$this->storedCartInstanceWithIdentifierExists($currentInstance, $identifier)) { - return; - } - - $stored = $this->getConnection()->table($this->getTableName()) - ->where(['identifier'=> $identifier, 'instance' => $currentInstance])->first(); - - $storedContent = unserialize(data_get($stored, 'content')); - - $this->instance(data_get($stored, 'instance')); - - $content = $this->getContent(); - - foreach ($storedContent as $cartItem) { - $content->put($cartItem->rowId, $cartItem); - } - - $this->events->dispatch('cart.restored'); - - $this->session->put($this->instance, $content); - - $this->instance($currentInstance); - - $this->createdAt = Carbon::parse(data_get($stored, 'created_at')); - $this->updatedAt = Carbon::parse(data_get($stored, 'updated_at')); - - $this->getConnection()->table($this->getTableName())->where(['identifier' => $identifier, 'instance' => $currentInstance])->delete(); - - } - - /** - * Merges the contents of another cart into this cart. - * - * @param mixed $identifier Identifier of the Cart to merge with. - * @param bool $keepDiscount Keep the discount of the CartItems. - * @param bool $keepTax Keep the tax of the CartItems. - * @param bool $dispatchAdd Flag to dispatch the add events. - * - * @return bool - */ - public function merge($identifier, $keepTax = false, $dispatchAdd = true, $instance = self::DEFAULT_INSTANCE) - { - if (!$this->storedCartInstanceWithIdentifierExists($instance, $identifier)) { - return false; - } - - $stored = $this->getConnection()->table($this->getTableName()) - ->where(['identifier'=> $identifier, 'instance'=> $instance])->first(); - - $storedContent = unserialize($stored->content); - - foreach ($storedContent as $cartItem) { - $this->addCartItem($cartItem, $keepTax, $dispatchAdd); - } - - $this->events->dispatch('cart.merged'); - - return true; - } - - /** - * Add an item to the cart. - * - * @param \Gloudemans\Shoppingcart\CartItem $item Item to add to the Cart - * @param bool $keepDiscount Keep the discount rate of the Item - * @param bool $keepTax Keep the Tax rate of the Item - * @param bool $dispatchEvent - * - * @return \Gloudemans\Shoppingcart\CartItem The CartItem - */ - public function addCartItem($item, $keepTax = false, $dispatchEvent = true) - { - if (!$keepTax) { - $item->setTaxRate($this->taxRate); - } - - $content = $this->getContent(); - - if ($content->has($item->rowId)) { - $item->qty += $content->get($item->rowId)->qty; - } - - $content->put($item->rowId, $item); - - if ($dispatchEvent) { - $this->events->dispatch('cart.adding', $item); - } - - $this->session->put($this->instance, $content); - - if ($dispatchEvent) { - $this->events->dispatch('cart.added', $item); - } - - return $item; - } - - /** - * Magic method to make accessing the total, tax and subtotal properties possible. - * - * @param string $attribute - * @return float|null - */ - public function __get($attribute) - { - if($attribute === 'total') { - return $this->total(); - } - - if($attribute === 'tax') { - return $this->tax(); - } - - if($attribute === 'subtotal') { - return $this->subtotal(); - } - - return null; - } - - /** - * Get the carts content, if there is no cart content set yet, return a new empty Collection - * - * @return Collection - */ - protected function getContent() - { - $content = $this->session->has($this->instance) - ? $this->session->get($this->instance) - : new Collection; - - return $content; - } - - /** - * Create a new CartItem from the supplied attributes. - * - * @param mixed $id - * @param mixed $name - * @param int|float $qty - * @param float $price - * @param array $options - * @return CartItem - */ - private function createCartItem($id, $name, $qty, $price, array $options) - { - if ($id instanceof Buyable) { - $cartItem = CartItem::fromBuyable($id, $qty ?: []); - $cartItem->setQuantity($name ?: 1); - $cartItem->associate($id); - } elseif (is_array($id)) { - $cartItem = CartItem::fromArray($id); - $cartItem->setQuantity($id['qty']); - } else { - $cartItem = CartItem::fromAttributes($id, $name, $price, $options); - $cartItem->setQuantity($qty); - } - - $cartItem->setTaxRate(config('cart.tax')); - - return $cartItem; - } - - /** - * Check if the item is a multidimensional array or an array of Buyables. - * - * @param mixed $item - * @return bool - */ - private function isMulti($item) - { - if ( ! is_array($item)) return false; - - return is_array(head($item)) || head($item) instanceof Buyable; - } - - /** - * @param $identifier - * @return bool - */ - private function storedCartWithIdentifierExists($identifier) - { - return $this->getConnection()->table($this->getTableName())->where('identifier', $identifier)->exists(); - } - - /** - * Get the database connection. - * - * @return Connection - */ - private function getConnection() - { - $connectionName = $this->getConnectionName(); - - return app(DatabaseManager::class)->connection($connectionName); - } - - /** - * Get the database table name. - * - * @return string - */ - private function getTableName() - { - return 'shopping_cart'; - } - - /** - * Get the database connection name. - * - * @return string - */ - private function getConnectionName() - { - $connection = config('cart.database.connection'); - - return is_null($connection) ? config('database.default') : $connection; - } - - /** - * Get the Formated number - * - * @param $value - * @param $decimals - * @param $decimalPoint - * @param $thousandSeparator - * @return string - */ - private function numberFormat($value) - { - $decimals = is_null(config('cart.format.decimals')) ? 2 : config('cart.format.decimals'); - $decimalPoint = is_null(config('cart.format.decimal_point')) ? '.' : config('cart.format.decimal_point'); - $thousandSeparator = ''; - - return number_format($value, $decimals, $decimalPoint, $thousandSeparator); - } -} diff --git a/packages/shoppingcart/CartItem.php b/packages/shoppingcart/CartItem.php deleted file mode 100644 index 4e74020..0000000 --- a/packages/shoppingcart/CartItem.php +++ /dev/null @@ -1,386 +0,0 @@ -id = $id; - $this->name = $name; - $this->price = floatval($price); - $this->options = new CartItemOptions($options); - $this->rowId = $this->generateRowId($id, $options); - } - - /** - * Returns the formatted price without TAX. - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return string - */ - public function price() - { - return $this->numberFormat($this->price); - } - - /** - * Returns the formatted price with TAX. - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return string - */ - public function priceTax() - { - return $this->numberFormat($this->priceTax); - } - - /** - * Returns the formatted subtotal. - * Subtotal is price for whole CartItem without TAX - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return string - */ - public function subtotal() - { - return $this->numberFormat($this->subtotal); - } - - /** - * Returns the formatted total. - * Total is price for whole CartItem with TAX - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return string - */ - public function total() - { - return $this->numberFormat($this->total); - } - - /** - * Returns the formatted tax. - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return string - */ - public function tax() - { - return $this->numberFormat($this->tax); - } - - /** - * Returns the formatted tax. - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return string - */ - public function taxTotal() - { - return $this->numberFormat($this->taxTotal); - } - - /** - * Set the quantity for this cart item. - * - * @param int|float $qty - */ - public function setQuantity($qty) - { - if(empty($qty) || ! is_numeric($qty)) - throw new \InvalidArgumentException('Please supply a valid quantity.'); - - $this->qty = $qty; - } - - /** - * Update the cart item from a Buyable. - * - * @param Buyable $item - * @return void - */ - public function updateFromBuyable(Buyable $item) - { - $this->id = $item->getBuyableIdentifier($this->options); - $this->name = $item->getBuyableDescription($this->options); - $this->price = $item->getBuyablePrice($this->options); - $this->priceTax = $this->price + $this->tax; - } - - /** - * Update the cart item from an array. - * - * @param array $attributes - * @return void - */ - public function updateFromArray(array $attributes) - { - $this->id = Arr::get($attributes, 'id', $this->id); - $this->qty = Arr::get($attributes, 'qty', $this->qty); - $this->name = Arr::get($attributes, 'name', $this->name); - $this->price = Arr::get($attributes, 'price', $this->price); - $this->priceTax = $this->price + $this->tax; - $this->options = new CartItemOptions(Arr::get($attributes, 'options', $this->options)); - - $this->rowId = $this->generateRowId($this->id, $this->options->all()); - } - - /** - * Associate the cart item with the given model. - * - * @param mixed $model - * @return CartItem - */ - public function associate($model) - { - $this->associatedModel = is_string($model) ? $model : get_class($model); - - return $this; - } - - /** - * Set the tax rate. - * - * @param int|float $taxRate - * @return CartItem - */ - public function setTaxRate($taxRate) - { - $this->taxRate = $taxRate; - - return $this; - } - - /** - * Get an attribute from the cart item or get the associated model. - * - * @param string $attribute - * @return mixed - */ - public function __get($attribute) - { - if(property_exists($this, $attribute)) { - return $this->{$attribute}; - } - - if($attribute === 'priceTax') { - return number_format($this->price + $this->tax, 2, '.', ''); - } - - if($attribute === 'subtotal') { - return number_format($this->qty * $this->price, 2, '.', ''); - } - - if($attribute === 'total') { - return number_format($this->qty * $this->priceTax, 2, '.', ''); - } - - if($attribute === 'tax') { - return number_format($this->price * ($this->taxRate / 100), 2, '.', ''); - } - - if($attribute === 'taxTotal') { - return number_format($this->tax * $this->qty, 2, '.', ''); - } - - if($attribute === 'model' && isset($this->associatedModel)) { - return with(new $this->associatedModel)->find($this->id); - } - - return null; - } - - /** - * Create a new instance from a Buyable. - * - * @param Buyable $item - * @param array $options - * @return CartItem - */ - public static function fromBuyable(Buyable $item, array $options = []) - { - return new self($item->getBuyableIdentifier($options), $item->getBuyableDescription($options), $item->getBuyablePrice($options), $options); - } - - /** - * Create a new instance from the given array. - * - * @param array $attributes - * @return CartItem - */ - public static function fromArray(array $attributes) - { - $options = Arr::get($attributes, 'options', []); - - return new self($attributes['id'], $attributes['name'], $attributes['price'], $options); - } - - /** - * Create a new instance from the given attributes. - * - * @param int|string $id - * @param string $name - * @param float $price - * @param array $options - * @return CartItem - */ - public static function fromAttributes($id, $name, $price, array $options = []) - { - return new self($id, $name, $price, $options); - } - - /** - * Generate a unique id for the cart item. - * - * @param string $id - * @param array $options - * @return string - */ - protected function generateRowId($id, array $options) - { - ksort($options); - - return md5($id . serialize($options)); - } - - /** - * Get the instance as an array. - * - * @return array - */ - public function toArray() - { - return [ - 'rowId' => $this->rowId, - 'id' => $this->id, - 'name' => $this->name, - 'qty' => $this->qty, - 'price' => $this->price, - 'options' => $this->options->toArray(), - 'tax' => $this->tax, - 'subtotal' => $this->subtotal - ]; - } - - /** - * Convert the object to its JSON representation. - * - * @param int $options - * @return string - */ - public function toJson($options = 0) - { - return json_encode($this->toArray(), $options); - } - - /** - * Get the formatted number. - * - * @param float $value - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeparator - * @return string - */ - private function numberFormat($value) - { - $decimals = is_null(config('cart.format.decimals')) ? 2 : config('cart.format.decimals'); - $decimalPoint = is_null(config('cart.format.decimal_point')) ? '.' : config('cart.format.decimal_point'); - $thousandSeparator = ''; - - return number_format($value, $decimals, $decimalPoint, $thousandSeparator); - } -} diff --git a/packages/shoppingcart/CartItemOptions.php b/packages/shoppingcart/CartItemOptions.php deleted file mode 100644 index 18b9552..0000000 --- a/packages/shoppingcart/CartItemOptions.php +++ /dev/null @@ -1,19 +0,0 @@ -get($key); - } -} \ No newline at end of file diff --git a/packages/shoppingcart/Contracts/Buyable.php b/packages/shoppingcart/Contracts/Buyable.php deleted file mode 100644 index aeb9509..0000000 --- a/packages/shoppingcart/Contracts/Buyable.php +++ /dev/null @@ -1,27 +0,0 @@ -app->bind('cart', 'Gloudemans\Shoppingcart\Cart'); - - $config = __DIR__ . '/../config/cart.php'; - $this->mergeConfigFrom($config, 'cart'); - - $this->publishes([__DIR__ . '/../config/cart.php' => config_path('cart.php')], 'config'); - - $this->app['events']->listen(Logout::class, function () { - if ($this->app['config']->get('cart.destroy_on_logout')) { - $this->app->make(SessionManager::class)->forget('cart'); - } - }); - - if ( ! class_exists('CreateShoppingcartTable')) { - // Publish the migration - $timestamp = date('Y_m_d_His', time()); - - $this->publishes([ - __DIR__ . '/../database/migrations/0000_00_00_000000_create_shopping_cart_table.php' => database_path('migrations/'.$timestamp.'_create_shoppingcart_table.php'), - ], 'migrations'); - } - } -} diff --git a/packages/shoppingcart/_info/LICENSE b/packages/shoppingcart/_info/LICENSE deleted file mode 100644 index 61c6afc..0000000 --- a/packages/shoppingcart/_info/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Rob Gloudemans - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/packages/shoppingcart/_info/README.md b/packages/shoppingcart/_info/README.md deleted file mode 100644 index de8f5ab..0000000 --- a/packages/shoppingcart/_info/README.md +++ /dev/null @@ -1,477 +0,0 @@ -## LaravelShoppingcart - -A simple shopping cart implementation for Laravel 7 & 8 & 9 & 10. - -## Installation - -Install the package through [Composer](http://getcomposer.org/). - -Run the Composer require command from the Terminal: - - composer require mindscms/laravelshoppingcart - -### Laravel <= 7.0 - -Should you still be on version 7.0 of Laravel, the final steps for you are to add the service provider of the package and alias the package. To do this open your `config/app.php` file. - -Add a new line to the `providers` array: - - Gloudemans\Shoppingcart\ShoppingcartServiceProvider::class - -And optionally add a new line to the `aliases` array: - - 'Cart' => Gloudemans\Shoppingcart\Facades\Cart::class, - -Now you're ready to start using the shopping cart in your application. - -**As of version 2 of this package it's possibly to use dependency injection to inject an instance of the Cart class into your controller or other class** - -## Overview -Look at one of the following topics to learn more about LaravelShoppingcart - -* [Usage](#usage) -* [Collections](#collections) -* [Instances](#instances) -* [Models](#models) -* [Database](#database) -* [Exceptions](#exceptions) -* [Events](#events) -* [Example](#example) - -## Usage - -The shoppingcart gives you the following methods to use: - -### Cart::add() - -Adding an item to the cart is really simple, you just use the `add()` method, which accepts a variety of parameters. - -In its most basic form you can specify the id, name, quantity, price of the product you'd like to add to the cart. - -```php -Cart::add('293ad', 'Product 1', 1, 9.99); -``` - -As an optional fifth parameter you can pass it options, so you can add multiple items with the same id, but with (for instance) a different size. - -```php -Cart::add('293ad', 'Product 1', 1, 9.99, ['size' => 'large']); -``` - -**The `add()` method will return an CartItem instance of the item you just added to the cart.** - -Maybe you prefer to add the item using an array? As long as the array contains the required keys, you can pass it to the method. The options key is optional. - -```php -Cart::add(['id' => '293ad', 'name' => 'Product 1', 'qty' => 1, 'price' => 9.99, 'options' => ['size' => 'large']]); -``` - -New in version 2 of the package is the possibility to work with the `Buyable` interface. The way this works is that you have a model implement the `Buyable` interface, which will make you implement a few methods so the package knows how to get the id, name and price from your model. -This way you can just pass the `add()` method a model and the quantity and it will automatically add it to the cart. - -**As an added bonus it will automatically associate the model with the CartItem** - -```php -Cart::add($product, 1, ['size' => 'large']); -``` -As an optional third parameter you can add options. -```php -Cart::add($product, 1, ['size' => 'large']); -``` - -Finally, you can also add multipe items to the cart at once. -You can just pass the `add()` method an array of arrays, or an array of Buyables and they will be added to the cart. - -**When adding multiple items to the cart, the `add()` method will return an array of CartItems.** - -```php -Cart::add([ - ['id' => '293ad', 'name' => 'Product 1', 'qty' => 1, 'price' => 10.00], - ['id' => '4832k', 'name' => 'Product 2', 'qty' => 1, 'price' => 10.00, 'options' => ['size' => 'large']] -]); - -Cart::add([$product1, $product2]); - -``` - -### Cart::update() - -To update an item in the cart, you'll first need the rowId of the item. -Next you can use the `update()` method to update it. - -If you simply want to update the quantity, you'll pass the update method the rowId and the new quantity: - -```php -$rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; - -Cart::update($rowId, 2); // Will update the quantity -``` - -If you want to update more attributes of the item, you can either pass the update method an array or a `Buyable` as the second parameter. This way you can update all information of the item with the given rowId. - -```php -Cart::update($rowId, ['name' => 'Product 1']); // Will update the name - -Cart::update($rowId, $product); // Will update the id, name and price - -``` - -### Cart::remove() - -To remove an item for the cart, you'll again need the rowId. This rowId you simply pass to the `remove()` method and it will remove the item from the cart. - -```php -$rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; - -Cart::remove($rowId); -``` - -### Cart::get() - -If you want to get an item from the cart using its rowId, you can simply call the `get()` method on the cart and pass it the rowId. - -```php -$rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; - -Cart::get($rowId); -``` - -### Cart::content() - -Of course you also want to get the carts content. This is where you'll use the `content` method. This method will return a Collection of CartItems which you can iterate over and show the content to your customers. - -```php -Cart::content(); -``` - -This method will return the content of the current cart instance, if you want the content of another instance, simply chain the calls. - -```php -Cart::instance('wishlist')->content(); -``` - -### Cart::destroy() - -If you want to completely remove the content of a cart, you can call the destroy method on the cart. This will remove all CartItems from the cart for the current cart instance. - -```php -Cart::destroy(); -``` - -### Cart::total() - -The `total()` method can be used to get the calculated total of all items in the cart, given there price and quantity. Includes any additional costs too. - -```php -Cart::total(); -``` - -The method will automatically format the result, which you can tweak using the three optional parameters - -```php -Cart::total($decimals, $decimalSeperator, $thousandSeperator); -``` - -You can set the default number format in the config file. - -**If you're not using the Facade, but use dependency injection in your (for instance) Controller, you can also simply get the total property `$cart->total`** - -### Cart::tax() - -The `tax()` method can be used to get the calculated amount of tax for all items in the cart, given there price and quantity. - -```php -Cart::tax(); -``` - -The method will automatically format the result, which you can tweak using the three optional parameters - -```php -Cart::tax($decimals, $decimalSeperator, $thousandSeperator); -``` - -You can set the default number format in the config file. - -**If you're not using the Facade, but use dependency injection in your (for instance) Controller, you can also simply get the tax property `$cart->tax`** - -### Cart::subtotal() - -The `subtotal()` method can be used to get the total of all items in the cart, minus the total amount of tax. - -```php -Cart::subtotal(); -``` - -The method will automatically format the result, which you can tweak using the three optional parameters - -```php -Cart::subtotal($decimals, $decimalSeperator, $thousandSeperator); -``` - -You can set the default number format in the config file. - -**If you're not using the Facade, but use dependency injection in your (for instance) Controller, you can also simply get the subtotal property `$cart->subtotal`** - -### Cart::count() - -If you want to know how many items there are in your cart, you can use the `count()` method. This method will return the total number of items in the cart. So if you've added 2 books and 1 shirt, it will return 3 items. - -```php -Cart::count(); -``` - -### Cart::search() - -To find an item in the cart, you can use the `search()` method. - -**This method was changed on version 2** - -Behind the scenes, the method simply uses the filter method of the Laravel Collection class. This means you must pass it a Closure in which you'll specify you search terms. - -If you for instance want to find all items with an id of 1: - -```php -$cart->search(function ($cartItem, $rowId) { - return $cartItem->id === 1; -}); -``` - -As you can see the Closure will receive two parameters. The first is the CartItem to perform the check against. The second parameter is the rowId of this CartItem. - -**The method will return a Collection containing all CartItems that where found** - -This way of searching gives you total control over the search process and gives you the ability to create very precise and specific searches. - -### Cart::addCost() - -If you want to add additional costs to the cart you can use the `addCost()` method. The method accepts a cost name and the price of the cost. This can be used for eg shipping or transaction costs. - -```php -Cart::addCost($name, $price) -``` - -**Add this method before summarizing the whole cart. The costs are not saved in the session (yet).** - -### Cart::getCost() - -Get an addition cost you added by `addCost()`. Accepts the cost name. Returns the formatted price of the cost. - -```php -Cart::getCost($name, $decimals, $decimalPoint, $thousandSeperator) -``` - -## Collections - -On multiple instances the Cart will return to you a Collection. This is just a simple Laravel Collection, so all methods you can call on a Laravel Collection are also available on the result. - -As an example, you can quicky get the number of unique products in a cart: - -```php -Cart::content()->count(); -``` - -Or you can group the content by the id of the products: - -```php -Cart::content()->groupBy('id'); -``` - -## Instances - -The packages supports multiple instances of the cart. The way this works is like this: - -You can set the current instance of the cart by calling `Cart::instance('newInstance')`. From this moment, the active instance of the cart will be `newInstance`, so when you add, remove or get the content of the cart, you're work with the `newInstance` instance of the cart. -If you want to switch instances, you just call `Cart::instance('otherInstance')` again, and you're working with the `otherInstance` again. - -So a little example: - -```php -Cart::instance('shopping')->add('192ao12', 'Product 1', 1, 9.99); - -// Get the content of the 'shopping' cart -Cart::content(); - -Cart::instance('wishlist')->add('sdjk922', 'Product 2', 1, 19.95, ['size' => 'medium']); - -// Get the content of the 'wishlist' cart -Cart::content(); - -// If you want to get the content of the 'shopping' cart again -Cart::instance('shopping')->content(); - -// And the count of the 'wishlist' cart again -Cart::instance('wishlist')->count(); -``` - -**N.B. Keep in mind that the cart stays in the last set instance for as long as you don't set a different one during script execution.** - -**N.B.2 The default cart instance is called `default`, so when you're not using instances,`Cart::content();` is the same as `Cart::instance('default')->content()`.** - -## Models - -Because it can be very convenient to be able to directly access a model from a CartItem is it possible to associate a model with the items in the cart. Let's say you have a `Product` model in your application. With the `associate()` method, you can tell the cart that an item in the cart, is associated to the `Product` model. - -That way you can access your model right from the `CartItem`! - -The model can be accessed via the `model` property on the CartItem. - -**If your model implements the `Buyable` interface and you used your model to add the item to the cart, it will associate automatically.** - -Here is an example: - -```php - -// First we'll add the item to the cart. -$cartItem = Cart::add('293ad', 'Product 1', 1, 9.99, ['size' => 'large']); - -// Next we associate a model with the item. -Cart::associate($cartItem->rowId, 'Product'); - -// Or even easier, call the associate method on the CartItem! -$cartItem->associate('Product'); - -// You can even make it a one-liner -Cart::add('293ad', 'Product 1', 1, 9.99, ['size' => 'large'])->associate('Product'); - -// Now, when iterating over the content of the cart, you can access the model. -foreach(Cart::content() as $row) { - echo 'You have ' . $row->qty . ' items of ' . $row->model->name . ' with description: "' . $row->model->description . '" in your cart.'; -} -``` -## Database - -- [Config](#configuration) -- [Storing the cart](#save-cart-to-database) -- [Restoring the cart](#retrieve-cart-from-database) - -### Configuration -To save cart into the database so you can retrieve it later, the package needs to know which database connection to use and what the name of the table is. -By default the package will use the default database connection and use a table named `shopping_cart`. -If you want to change these options, you'll have to publish the `config` file. - - php artisan vendor:publish --provider="Gloudemans\Shoppingcart\ShoppingcartServiceProvider" --tag="config" - -This will give you a `cart.php` config file in which you can make the changes. - -To make your life easy, the package also includes a ready to use `migration` which you can publish by running: - - php artisan vendor:publish --provider="Gloudemans\Shoppingcart\ShoppingcartServiceProvider" --tag="migrations" - -This will place a `shopping_cart` table's migration file into `database/migrations` directory. Now all you have to do is run `php artisan migrate` to migrate your database. - -### Storing the cart -To store your cart instance into the database, you have to call the `store($identifier) ` method. Where `$identifier` is a random key, for instance the id or username of the user. - - Cart::store('username'); - - // To store a cart instance named 'wishlist' - Cart::instance('wishlist')->store('username'); - -### Restoring the cart -If you want to retrieve the cart from the database and restore it, all you have to do is call the `restore($identifier)` where `$identifier` is the key you specified for the `store` method. - - Cart::restore('username'); - - // To restore a cart instance named 'wishlist' - Cart::instance('wishlist')->restore('username'); - -## Exceptions - -The Cart package will throw exceptions if something goes wrong. This way it's easier to debug your code using the Cart package or to handle the error based on the type of exceptions. The Cart packages can throw the following exceptions: - -| Exception | Reason | -| ---------------------------- | ---------------------------------------------------------------------------------- | -| *CartAlreadyStoredException* | When trying to store a cart that was already stored using the specified identifier | -| *InvalidRowIDException* | When the rowId that got passed doesn't exists in the current cart instance | -| *UnknownModelException* | When you try to associate an none existing model to a CartItem. | - -## Events - -The cart also has events build in. There are five events available for you to listen for. - -| Event | Fired | Parameter | -| ------------- | ---------------------------------------- | -------------------------------- | -| cart.added | When an item was added to the cart. | The `CartItem` that was added. | -| cart.updated | When an item in the cart was updated. | The `CartItem` that was updated. | -| cart.removed | When an item is removed from the cart. | The `CartItem` that was removed. | -| cart.stored | When the content of a cart was stored. | - | -| cart.restored | When the content of a cart was restored. | - | - -## Example - -Below is a little example of how to list the cart content in a table: - -```php - -// Add some items in your Controller. -Cart::add('192ao12', 'Product 1', 1, 9.99); -Cart::add('1239ad0', 'Product 2', 2, 5.95, ['size' => 'large']); - -// Set an additional cost (on the same page where you display your cart content) -Cart::addCost(Cart::COST_TRANSACTION, 0.10); -Cart::addCost(Cart::COST_SHIPPING, 5.00); -Cart::addCost('somethingelse', 1.11); - -// Display the content in a View. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProductQtyPriceSubtotal
-

name; ?>

-

options->has('size') ? $row->options->size : ''); ?>

-
$price; ?>$total; ?>
 Subtotal
 Tax
 Transaction cost
 Transaction cost
 Transaction cost
 Total
-``` diff --git a/packages/shoppingcart/_info/_composer.json b/packages/shoppingcart/_info/_composer.json deleted file mode 100644 index ee51015..0000000 --- a/packages/shoppingcart/_info/_composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "mindscms/laravelshoppingcart", - "description": "Laravel Shopping cart", - "keywords": ["laravel", "shoppingcart"], - "license": "MIT", - "authors": [ - { - "name": "Rob Gloudemans", - "email": "info@robgloudemans.nl" - }, - { - "name": "Michael V.", - "email": "michael@michaelbelgium.me" - }, - { - "name": "Sami Mansour", - "email": "mindscms@gmail.com" - } - ], - "require": { - "illuminate/support": "^7.0|^8.0|^9.0|^10.0", - "illuminate/session": "^7.0|^8.0|^9.0|^10.0", - "illuminate/events": "^7.0|^8.0|^9.0|^10.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5|^10.1", - "mockery/mockery": "^1.4", - "orchestra/testbench": "^7" - }, - "autoload": { - "psr-4": { - "Gloudemans\\Shoppingcart\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Gloudemans\\Tests\\Shoppingcart\\": "tests/" - } - }, - "minimum-stability": "stable", - "extra": { - "laravel": { - "providers": [ - "Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider" - ], - "aliases": { - "Cart": "Gloudemans\\Shoppingcart\\Facades\\Cart" - } - } - } -} diff --git a/packages/shoppingcart/_info/phpunit.xml b/packages/shoppingcart/_info/phpunit.xml deleted file mode 100644 index f994f39..0000000 --- a/packages/shoppingcart/_info/phpunit.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - ./tests/ - - - \ No newline at end of file diff --git a/packages/shoppingcart/_info/tests/CartAssertions.php b/packages/shoppingcart/_info/tests/CartAssertions.php deleted file mode 100644 index c351f40..0000000 --- a/packages/shoppingcart/_info/tests/CartAssertions.php +++ /dev/null @@ -1,35 +0,0 @@ -count(); - - PHPUnit::assertEquals($items, $cart->count(), "Expected the cart to contain {$items} items, but got {$actual}."); - } - - /** - * Assert that the cart contains the given number of rows. - * - * @param int $rows - * @param \Gloudemans\Shoppingcart\Cart $cart - */ - public function assertRowsInCart($rows, Cart $cart) - { - $actual = $cart->content()->count(); - - PHPUnit::assertCount($rows, $cart->content(), "Expected the cart to contain {$rows} rows, but got {$actual}."); - } -} diff --git a/packages/shoppingcart/_info/tests/CartItemTest.php b/packages/shoppingcart/_info/tests/CartItemTest.php deleted file mode 100644 index ac0bdf4..0000000 --- a/packages/shoppingcart/_info/tests/CartItemTest.php +++ /dev/null @@ -1,55 +0,0 @@ - 'XL', 'color' => 'red']); - $cartItem->setQuantity(2); - - $this->assertEquals([ - 'id' => 1, - 'name' => 'Some item', - 'price' => 10.00, - 'rowId' => '07d5da5550494c62daf9993cf954303f', - 'qty' => 2, - 'options' => [ - 'size' => 'XL', - 'color' => 'red' - ], - 'tax' => 0, - 'subtotal' => 20.00, - ], $cartItem->toArray()); - } - - /** @test */ - public function it_can_be_cast_to_json() - { - $cartItem = new CartItem(1, 'Some item', 10.00, ['size' => 'XL', 'color' => 'red']); - $cartItem->setQuantity(2); - - $this->assertJson($cartItem->toJson()); - - $json = '{"rowId":"07d5da5550494c62daf9993cf954303f","id":1,"name":"Some item","qty":2,"price":10,"options":{"size":"XL","color":"red"},"tax":"0.00","subtotal":"20.00"}'; - - $this->assertEquals($json, $cartItem->toJson()); - } -} \ No newline at end of file diff --git a/packages/shoppingcart/_info/tests/CartTest.php b/packages/shoppingcart/_info/tests/CartTest.php deleted file mode 100644 index ae2f878..0000000 --- a/packages/shoppingcart/_info/tests/CartTest.php +++ /dev/null @@ -1,945 +0,0 @@ -set('cart.database.connection', 'testing'); - - $app['config']->set('session.driver', 'array'); - - $app['config']->set('database.default', 'testing'); - $app['config']->set('database.connections.testing', [ - 'driver' => 'sqlite', - 'database' => ':memory:', - 'prefix' => '', - ]); - } - - /** - * Setup the test environment. - * - * @return void - */ - protected function setUp() - { - parent::setUp(); - - $this->app->afterResolving('migrator', function ($migrator) { - $migrator->path(realpath(__DIR__.'/../database/migrations')); - }); - } - - /** @test */ - public function it_has_a_default_instance() - { - $cart = $this->getCart(); - - $this->assertEquals(Cart::DEFAULT_INSTANCE, $cart->currentInstance()); - } - - /** @test */ - public function it_can_have_multiple_instances() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'First item')); - - $cart->instance('wishlist')->add(new BuyableProduct(2, 'Second item')); - - $this->assertItemsInCart(1, $cart->instance(Cart::DEFAULT_INSTANCE)); - $this->assertItemsInCart(1, $cart->instance('wishlist')); - } - - /** @test */ - public function it_can_add_an_item() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $this->assertEquals(1, $cart->count()); - - Event::assertDispatched('cart.added'); - } - - /** @test */ - public function it_will_return_the_cartitem_of_the_added_item() - { - Event::fake(); - - $cart = $this->getCart(); - - $cartItem = $cart->add(new BuyableProduct); - - $this->assertInstanceOf(CartItem::class, $cartItem); - $this->assertEquals('027c91341fd5cf4d2579b49c4b6a90da', $cartItem->rowId); - - Event::assertDispatched('cart.added'); - } - - /** @test */ - public function it_can_add_multiple_buyable_items_at_once() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add([new BuyableProduct(1), new BuyableProduct(2)]); - - $this->assertEquals(2, $cart->count()); - - Event::assertDispatched('cart.added'); - } - - /** @test */ - public function it_will_return_an_array_of_cartitems_when_you_add_multiple_items_at_once() - { - Event::fake(); - - $cart = $this->getCart(); - - $cartItems = $cart->add([new BuyableProduct(1), new BuyableProduct(2)]); - - $this->assertTrue(is_array($cartItems)); - $this->assertCount(2, $cartItems); - $this->assertContainsOnlyInstancesOf(CartItem::class, $cartItems); - - Event::assertDispatched('cart.added'); - } - - /** @test */ - public function it_can_add_an_item_from_attributes() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(1, 'Test item', 1, 10.00); - - $this->assertEquals(1, $cart->count()); - - Event::assertDispatched('cart.added'); - } - - /** @test */ - public function it_can_add_an_item_from_an_array() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(['id' => 1, 'name' => 'Test item', 'qty' => 1, 'price' => 10.00]); - - $this->assertEquals(1, $cart->count()); - - Event::assertDispatched('cart.added'); - } - - /** @test */ - public function it_can_add_multiple_array_items_at_once() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add([ - ['id' => 1, 'name' => 'Test item 1', 'qty' => 1, 'price' => 10.00], - ['id' => 2, 'name' => 'Test item 2', 'qty' => 1, 'price' => 10.00] - ]); - - $this->assertEquals(2, $cart->count()); - - Event::assertDispatched('cart.added'); - } - - /** @test */ - public function it_can_add_an_item_with_options() - { - Event::fake(); - - $cart = $this->getCart(); - - $options = ['size' => 'XL', 'color' => 'red']; - - $cart->add(new BuyableProduct, 1, $options); - - $cartItem = $cart->get('07d5da5550494c62daf9993cf954303f'); - - $this->assertInstanceOf(CartItem::class, $cartItem); - $this->assertEquals('XL', $cartItem->options->size); - $this->assertEquals('red', $cartItem->options->color); - - Event::assertDispatched('cart.added'); - } - - /** - * @test - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Please supply a valid identifier. - */ - public function it_will_validate_the_identifier() - { - $cart = $this->getCart(); - - $cart->add(null, 'Some title', 1, 10.00); - } - - /** - * @test - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Please supply a valid name. - */ - public function it_will_validate_the_name() - { - $cart = $this->getCart(); - - $cart->add(1, null, 1, 10.00); - } - - /** - * @test - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Please supply a valid quantity. - */ - public function it_will_validate_the_quantity() - { - $cart = $this->getCart(); - - $cart->add(1, 'Some title', 'invalid', 10.00); - } - - /** - * @test - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Please supply a valid price. - */ - public function it_will_validate_the_price() - { - $cart = $this->getCart(); - - $cart->add(1, 'Some title', 1, 'invalid'); - } - - /** @test */ - public function it_will_update_the_cart_if_the_item_already_exists_in_the_cart() - { - $cart = $this->getCart(); - - $item = new BuyableProduct; - - $cart->add($item); - $cart->add($item); - - $this->assertItemsInCart(2, $cart); - $this->assertRowsInCart(1, $cart); - } - - /** @test */ - public function it_will_keep_updating_the_quantity_when_an_item_is_added_multiple_times() - { - $cart = $this->getCart(); - - $item = new BuyableProduct; - - $cart->add($item); - $cart->add($item); - $cart->add($item); - - $this->assertItemsInCart(3, $cart); - $this->assertRowsInCart(1, $cart); - } - - /** @test */ - public function it_can_update_the_quantity_of_an_existing_item_in_the_cart() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->update('027c91341fd5cf4d2579b49c4b6a90da', 2); - - $this->assertItemsInCart(2, $cart); - $this->assertRowsInCart(1, $cart); - - Event::assertDispatched('cart.updated'); - } - - /** @test */ - public function it_can_update_an_existing_item_in_the_cart_from_a_buyable() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->update('027c91341fd5cf4d2579b49c4b6a90da', new BuyableProduct(1, 'Different description')); - - $this->assertItemsInCart(1, $cart); - $this->assertEquals('Different description', $cart->get('027c91341fd5cf4d2579b49c4b6a90da')->name); - - Event::assertDispatched('cart.updated'); - } - - /** @test */ - public function it_can_update_an_existing_item_in_the_cart_from_an_array() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->update('027c91341fd5cf4d2579b49c4b6a90da', ['name' => 'Different description']); - - $this->assertItemsInCart(1, $cart); - $this->assertEquals('Different description', $cart->get('027c91341fd5cf4d2579b49c4b6a90da')->name); - - Event::assertDispatched('cart.updated'); - } - - /** - * @test - * @expectedException \Gloudemans\Shoppingcart\Exceptions\InvalidRowIDException - */ - public function it_will_throw_an_exception_if_a_rowid_was_not_found() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->update('none-existing-rowid', new BuyableProduct(1, 'Different description')); - } - - /** @test */ - public function it_will_regenerate_the_rowid_if_the_options_changed() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct, 1, ['color' => 'red']); - - $cart->update('ea65e0bdcd1967c4b3149e9e780177c0', ['options' => ['color' => 'blue']]); - - $this->assertItemsInCart(1, $cart); - $this->assertEquals('7e70a1e9aaadd18c72921a07aae5d011', $cart->content()->first()->rowId); - $this->assertEquals('blue', $cart->get('7e70a1e9aaadd18c72921a07aae5d011')->options->color); - } - - /** @test */ - public function it_will_add_the_item_to_an_existing_row_if_the_options_changed_to_an_existing_rowid() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct, 1, ['color' => 'red']); - $cart->add(new BuyableProduct, 1, ['color' => 'blue']); - - $cart->update('7e70a1e9aaadd18c72921a07aae5d011', ['options' => ['color' => 'red']]); - - $this->assertItemsInCart(2, $cart); - $this->assertRowsInCart(1, $cart); - } - - /** @test */ - public function it_can_remove_an_item_from_the_cart() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->remove('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertItemsInCart(0, $cart); - $this->assertRowsInCart(0, $cart); - - Event::assertDispatched('cart.removed'); - } - - /** @test */ - public function it_will_remove_the_item_if_its_quantity_was_set_to_zero() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->update('027c91341fd5cf4d2579b49c4b6a90da', 0); - - $this->assertItemsInCart(0, $cart); - $this->assertRowsInCart(0, $cart); - - Event::assertDispatched('cart.removed'); - } - - /** @test */ - public function it_will_remove_the_item_if_its_quantity_was_set_negative() - { - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->update('027c91341fd5cf4d2579b49c4b6a90da', -1); - - $this->assertItemsInCart(0, $cart); - $this->assertRowsInCart(0, $cart); - - Event::assertDispatched('cart.removed'); - } - - /** @test */ - public function it_can_get_an_item_from_the_cart_by_its_rowid() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertInstanceOf(CartItem::class, $cartItem); - } - - /** @test */ - public function it_can_get_the_content_of_the_cart() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1)); - $cart->add(new BuyableProduct(2)); - - $content = $cart->content(); - - $this->assertInstanceOf(Collection::class, $content); - $this->assertCount(2, $content); - } - - /** @test */ - public function it_will_return_an_empty_collection_if_the_cart_is_empty() - { - $cart = $this->getCart(); - - $content = $cart->content(); - - $this->assertInstanceOf(Collection::class, $content); - $this->assertCount(0, $content); - } - - /** @test */ - public function it_will_include_the_tax_and_subtotal_when_converted_to_an_array() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1)); - $cart->add(new BuyableProduct(2)); - - $content = $cart->content(); - - $this->assertInstanceOf(Collection::class, $content); - $this->assertEquals([ - '027c91341fd5cf4d2579b49c4b6a90da' => [ - 'rowId' => '027c91341fd5cf4d2579b49c4b6a90da', - 'id' => 1, - 'name' => 'Item name', - 'qty' => 1, - 'price' => 10.00, - 'tax' => 2.10, - 'subtotal' => 10.0, - 'options' => [], - ], - '370d08585360f5c568b18d1f2e4ca1df' => [ - 'rowId' => '370d08585360f5c568b18d1f2e4ca1df', - 'id' => 2, - 'name' => 'Item name', - 'qty' => 1, - 'price' => 10.00, - 'tax' => 2.10, - 'subtotal' => 10.0, - 'options' => [], - ] - ], $content->toArray()); - } - - /** @test */ - public function it_can_destroy_a_cart() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $this->assertItemsInCart(1, $cart); - - $cart->destroy(); - - $this->assertItemsInCart(0, $cart); - } - - /** @test */ - public function it_can_get_the_total_price_of_the_cart_content() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'First item', 10.00)); - $cart->add(new BuyableProduct(2, 'Second item', 25.00), 2); - - $this->assertItemsInCart(3, $cart); - $this->assertEquals(60.00, $cart->subtotal()); - } - - /** @test */ - public function it_can_return_a_formatted_total() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'First item', 1000.00)); - $cart->add(new BuyableProduct(2, 'Second item', 2500.00), 2); - - $this->assertItemsInCart(3, $cart); - $this->assertEquals('6.000,00', $cart->subtotal(2, ',', '.')); - } - - /** @test */ - public function it_can_search_the_cart_for_a_specific_item() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some item')); - $cart->add(new BuyableProduct(2, 'Another item')); - - $cartItem = $cart->search(function ($cartItem, $rowId) { - return $cartItem->name == 'Some item'; - }); - - $this->assertInstanceOf(Collection::class, $cartItem); - $this->assertCount(1, $cartItem); - $this->assertInstanceOf(CartItem::class, $cartItem->first()); - $this->assertEquals(1, $cartItem->first()->id); - } - - /** @test */ - public function it_can_search_the_cart_for_multiple_items() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some item')); - $cart->add(new BuyableProduct(2, 'Some item')); - $cart->add(new BuyableProduct(3, 'Another item')); - - $cartItem = $cart->search(function ($cartItem, $rowId) { - return $cartItem->name == 'Some item'; - }); - - $this->assertInstanceOf(Collection::class, $cartItem); - } - - /** @test */ - public function it_can_search_the_cart_for_a_specific_item_with_options() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some item'), 1, ['color' => 'red']); - $cart->add(new BuyableProduct(2, 'Another item'), 1, ['color' => 'blue']); - - $cartItem = $cart->search(function ($cartItem, $rowId) { - return $cartItem->options->color == 'red'; - }); - - $this->assertInstanceOf(Collection::class, $cartItem); - $this->assertCount(1, $cartItem); - $this->assertInstanceOf(CartItem::class, $cartItem->first()); - $this->assertEquals(1, $cartItem->first()->id); - } - - /** @test */ - public function it_will_associate_the_cart_item_with_a_model_when_you_add_a_buyable() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertContains(BuyableProduct::class, Assert::readAttribute($cartItem, 'associatedModel')); - } - - /** @test */ - public function it_can_associate_the_cart_item_with_a_model() - { - $cart = $this->getCart(); - - $cart->add(1, 'Test item', 1, 10.00); - - $cart->associate('027c91341fd5cf4d2579b49c4b6a90da', new ProductModel); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertEquals(ProductModel::class, Assert::readAttribute($cartItem, 'associatedModel')); - } - - /** - * @test - * @expectedException \Gloudemans\Shoppingcart\Exceptions\UnknownModelException - * @expectedExceptionMessage The supplied model SomeModel does not exist. - */ - public function it_will_throw_an_exception_when_a_non_existing_model_is_being_associated() - { - $cart = $this->getCart(); - - $cart->add(1, 'Test item', 1, 10.00); - - $cart->associate('027c91341fd5cf4d2579b49c4b6a90da', 'SomeModel'); - } - - /** @test */ - public function it_can_get_the_associated_model_of_a_cart_item() - { - $cart = $this->getCart(); - - $cart->add(1, 'Test item', 1, 10.00); - - $cart->associate('027c91341fd5cf4d2579b49c4b6a90da', new ProductModel); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertInstanceOf(ProductModel::class, $cartItem->model); - $this->assertEquals('Some value', $cartItem->model->someValue); - } - - /** @test */ - public function it_can_calculate_the_subtotal_of_a_cart_item() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 9.99), 3); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertEquals(29.97, $cartItem->subtotal); - } - - /** @test */ - public function it_can_return_a_formatted_subtotal() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 500), 3); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertEquals('1.500,00', $cartItem->subtotal(2, ',', '.')); - } - - /** @test */ - public function it_can_calculate_tax_based_on_the_default_tax_rate_in_the_config() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 10.00), 1); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertEquals(2.10, $cartItem->tax); - } - - /** @test */ - public function it_can_calculate_tax_based_on_the_specified_tax() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 10.00), 1); - - $cart->setTax('027c91341fd5cf4d2579b49c4b6a90da', 19); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertEquals(1.90, $cartItem->tax); - } - - /** @test */ - public function it_can_return_the_calculated_tax_formatted() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 10000.00), 1); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertEquals('2.100,00', $cartItem->tax(2, ',', '.')); - } - - /** @test */ - public function it_can_calculate_the_total_tax_for_all_cart_items() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 10.00), 1); - $cart->add(new BuyableProduct(2, 'Some title', 20.00), 2); - - $this->assertEquals(10.50, $cart->tax); - } - - /** @test */ - public function it_can_return_formatted_total_tax() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 1000.00), 1); - $cart->add(new BuyableProduct(2, 'Some title', 2000.00), 2); - - $this->assertEquals('1.050,00', $cart->tax(2, ',', '.')); - } - - /** @test */ - public function it_can_return_the_subtotal() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 10.00), 1); - $cart->add(new BuyableProduct(2, 'Some title', 20.00), 2); - - $this->assertEquals(50.00, $cart->subtotal); - } - - /** @test */ - public function it_can_return_formatted_subtotal() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 1000.00), 1); - $cart->add(new BuyableProduct(2, 'Some title', 2000.00), 2); - - $this->assertEquals('5000,00', $cart->subtotal(2, ',', '')); - } - - /** @test */ - public function it_can_return_cart_formated_numbers_by_config_values() - { - $this->setConfigFormat(2, ',', ''); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 1000.00), 1); - $cart->add(new BuyableProduct(2, 'Some title', 2000.00), 2); - - $this->assertEquals('5000,00', $cart->subtotal()); - $this->assertEquals('1050,00', $cart->tax()); - $this->assertEquals('6050,00', $cart->total()); - - $this->assertEquals('5000,00', $cart->subtotal); - $this->assertEquals('1050,00', $cart->tax); - $this->assertEquals('6050,00', $cart->total); - } - - /** @test */ - public function it_can_return_cartItem_formated_numbers_by_config_values() - { - $this->setConfigFormat(2, ',', ''); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'Some title', 2000.00), 2); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $this->assertEquals('2000,00', $cartItem->price()); - $this->assertEquals('2420,00', $cartItem->priceTax()); - $this->assertEquals('4000,00', $cartItem->subtotal()); - $this->assertEquals('4840,00', $cartItem->total()); - $this->assertEquals('420,00', $cartItem->tax()); - $this->assertEquals('840,00', $cartItem->taxTotal()); - } - - /** @test */ - public function it_can_store_the_cart_in_a_database() - { - $this->artisan('migrate', [ - '--database' => 'testing', - ]); - - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->store($identifier = 123); - - $serialized = serialize($cart->content()); - - $this->assertDatabaseHas('shopping_cart', ['identifier' => $identifier, 'instance' => 'default', 'content' => $serialized]); - - Event::assertDispatched('cart.stored'); - } - - /** - * @test - * @expectedException \Gloudemans\Shoppingcart\Exceptions\CartAlreadyStoredException - * @expectedExceptionMessage A cart with identifier 123 was already stored. - */ - public function it_will_throw_an_exception_when_a_cart_was_already_stored_using_the_specified_identifier() - { - $this->artisan('migrate', [ - '--database' => 'testing', - ]); - - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->store($identifier = 123); - - $cart->store($identifier); - - Event::assertDispatched('cart.stored'); - } - - /** @test */ - public function it_can_restore_a_cart_from_the_database() - { - $this->artisan('migrate', [ - '--database' => 'testing', - ]); - - Event::fake(); - - $cart = $this->getCart(); - - $cart->add(new BuyableProduct); - - $cart->store($identifier = 123); - - $cart->destroy(); - - $this->assertItemsInCart(0, $cart); - - $cart->restore($identifier); - - $this->assertItemsInCart(1, $cart); - - $this->assertDatabaseMissing('shopping_cart', ['identifier' => $identifier, 'instance' => 'default']); - - Event::assertDispatched('cart.restored'); - } - - /** @test */ - public function it_will_just_keep_the_current_instance_if_no_cart_with_the_given_identifier_was_stored() - { - $this->artisan('migrate', [ - '--database' => 'testing', - ]); - - $cart = $this->getCart(); - - $cart->restore($identifier = 123); - - $this->assertItemsInCart(0, $cart); - } - - /** @test */ - public function it_can_calculate_all_values() - { - $cart = $this->getCart(); - - $cart->add(new BuyableProduct(1, 'First item', 10.00), 2); - - $cartItem = $cart->get('027c91341fd5cf4d2579b49c4b6a90da'); - - $cart->setTax('027c91341fd5cf4d2579b49c4b6a90da', 19); - - $this->assertEquals(10.00, $cartItem->price(2)); - $this->assertEquals(11.90, $cartItem->priceTax(2)); - $this->assertEquals(20.00, $cartItem->subtotal(2)); - $this->assertEquals(23.80, $cartItem->total(2)); - $this->assertEquals(1.90, $cartItem->tax(2)); - $this->assertEquals(3.80, $cartItem->taxTotal(2)); - - $this->assertEquals(20.00, $cart->subtotal(2)); - $this->assertEquals(23.80, $cart->total(2)); - $this->assertEquals(3.80, $cart->tax(2)); - } - - /** @test */ - public function it_will_destroy_the_cart_when_the_user_logs_out_and_the_config_setting_was_set_to_true() - { - $this->app['config']->set('cart.destroy_on_logout', true); - - $this->app->instance(SessionManager::class, Mockery::mock(SessionManager::class, function ($mock) { - $mock->shouldReceive('forget')->once()->with('cart'); - })); - - $user = Mockery::mock(Authenticatable::class); - - event(new Logout($user)); - } - - /** - * Get an instance of the cart. - * - * @return \Gloudemans\Shoppingcart\Cart - */ - private function getCart() - { - $session = $this->app->make('session'); - $events = $this->app->make('events'); - - return new Cart($session, $events); - } - - /** - * Set the config number format. - * - * @param int $decimals - * @param string $decimalPoint - * @param string $thousandSeperator - */ - private function setConfigFormat($decimals, $decimalPoint, $thousandSeperator) - { - $this->app['config']->set('cart.format.decimals', $decimals); - $this->app['config']->set('cart.format.decimal_point', $decimalPoint); - $this->app['config']->set('cart.format.thousand_separator', $thousandSeperator); - } -} diff --git a/packages/shoppingcart/_info/tests/Fixtures/BuyableProduct.php b/packages/shoppingcart/_info/tests/Fixtures/BuyableProduct.php deleted file mode 100644 index a58e830..0000000 --- a/packages/shoppingcart/_info/tests/Fixtures/BuyableProduct.php +++ /dev/null @@ -1,67 +0,0 @@ -id = $id; - $this->name = $name; - $this->price = $price; - } - - /** - * Get the identifier of the Buyable item. - * - * @return int|string - */ - public function getBuyableIdentifier($options = null) - { - return $this->id; - } - - /** - * Get the description or title of the Buyable item. - * - * @return string - */ - public function getBuyableDescription($options = null) - { - return $this->name; - } - - /** - * Get the price of the Buyable item. - * - * @return float - */ - public function getBuyablePrice($options = null) - { - return $this->price; - } -} \ No newline at end of file diff --git a/packages/shoppingcart/_info/tests/Fixtures/ProductModel.php b/packages/shoppingcart/_info/tests/Fixtures/ProductModel.php deleted file mode 100644 index 70494ca..0000000 --- a/packages/shoppingcart/_info/tests/Fixtures/ProductModel.php +++ /dev/null @@ -1,13 +0,0 @@ - 15, - - /* - |-------------------------------------------------------------------------- - | Shopping cart database settings - |-------------------------------------------------------------------------- - | - | Here you can set the connection that the shopping cart should use when - | storing and restoring a cart. - | - */ - - 'database' => [ - - 'connection' => env('DB_CONNECTION', 'mysql'), - - 'table' => 'shopping_cart', - - ], - - /* - |-------------------------------------------------------------------------- - | Destroy the cart on user logout - |-------------------------------------------------------------------------- - | - | When this option is set to 'true' the cart will automatically - | destroy all cart instances when the user logs out. - | - */ - - 'destroy_on_logout' => false, - - /* - |-------------------------------------------------------------------------- - | Default number format - |-------------------------------------------------------------------------- - | - | This defaults will be used for the formated numbers if you don't - | set them in the method call. - | - */ - - 'format' => [ - - 'decimals' => 2, - - 'decimal_point' => '.', - - 'thousand_separator' => '' - - ], - -]; \ No newline at end of file diff --git a/packages/shoppingcart/database/migrations/0000_00_00_000000_create_shopping_cart_table.php b/packages/shoppingcart/database/migrations/0000_00_00_000000_create_shopping_cart_table.php deleted file mode 100644 index 891afc7..0000000 --- a/packages/shoppingcart/database/migrations/0000_00_00_000000_create_shopping_cart_table.php +++ /dev/null @@ -1,30 +0,0 @@ -string('identifier'); - $table->string('instance'); - $table->longText('content'); - $table->nullableTimestamps(); - - $table->primary(['identifier', 'instance']); - }); - } - /** - * Reverse the migrations. - */ - public function down() - { - Schema::drop('shopping_cart'); - } -} diff --git a/public/assets/css/custom-style.css b/public/assets/css/custom-style.css index b72c1f9..2315f98 100644 --- a/public/assets/css/custom-style.css +++ b/public/assets/css/custom-style.css @@ -1,6 +1,6 @@ h1, .h1 { - font-family: 'Pacifico', cursive; + font-family: 'Raleway', 'Open Sans', Arial, Helvetica, sans-serif; font-size: 1.2em; } @@ -21,7 +21,7 @@ h2 { h3.h3 { - font-family: 'Pacifico', cursive; + font-family: 'Raleway', 'Open Sans', Arial, Helvetica, sans-serif; font-size: 1.6em; color:#b5c49b; margin-bottom: 25px; diff --git a/public/assets/images/logo_dark.png b/public/assets/images/logo_dark.png index f52accb..7149a6c 100644 Binary files a/public/assets/images/logo_dark.png and b/public/assets/images/logo_dark.png differ diff --git a/public/assets/images/logo_dark_old.png b/public/assets/images/logo_dark_old.png index 372016e..0ecbf0a 100644 Binary files a/public/assets/images/logo_dark_old.png and b/public/assets/images/logo_dark_old.png differ diff --git a/public/assets/images/logo_mivita.png b/public/assets/images/logo_mivita.png index 44d3619..7bada40 100644 Binary files a/public/assets/images/logo_mivita.png and b/public/assets/images/logo_mivita.png differ diff --git a/public/assets/images/logo_mivita_fixed.png b/public/assets/images/logo_mivita_fixed.png index ec7f5c7..c86a11d 100644 Binary files a/public/assets/images/logo_mivita_fixed.png and b/public/assets/images/logo_mivita_fixed.png differ diff --git a/public/assets/images/produktfamilie.jpg b/public/assets/images/produktfamilie.jpg index a65c82c..cbf60ca 100644 Binary files a/public/assets/images/produktfamilie.jpg and b/public/assets/images/produktfamilie.jpg differ diff --git a/public/assets/images/slider-hg_gruen-mitte.jpg b/public/assets/images/slider-hg_gruen-mitte.jpg index 634ada8..4b675ab 100644 Binary files a/public/assets/images/slider-hg_gruen-mitte.jpg and b/public/assets/images/slider-hg_gruen-mitte.jpg differ diff --git a/public/assets/plugins/text-rotator/demo.html b/public/assets/plugins/text-rotator/demo.html index ab19ca8..306e18f 100644 --- a/public/assets/plugins/text-rotator/demo.html +++ b/public/assets/plugins/text-rotator/demo.html @@ -52,7 +52,7 @@ .pointer { color: #9b59b6; - font-family: 'Pacifico', cursive; + font-family: 'Open Sans', Arial, Helvetica, sans-serif; font-size: 30px; margin-top: 15px; } diff --git a/public/images/logo_mivita.png b/public/images/logo_mivita.png index 09a6b2e..5032188 100644 Binary files a/public/images/logo_mivita.png and b/public/images/logo_mivita.png differ diff --git a/public/js/iq-abo-cart.js b/public/js/iq-abo-cart.js new file mode 100644 index 0000000..c1e5450 --- /dev/null +++ b/public/js/iq-abo-cart.js @@ -0,0 +1,201 @@ + +var IqAboCart = { + form: "#homeparty-order-form", + btn_modal_add: '.add-product-basket', + btn_add: '.add-from-basket', + btn_remove: '.remove-from-basket', + table_input: '.table-input-event-onchange', + oTable: null, + cart_holder: '#insert_show_products_order_', + cart_holders: '.insert_show_products_order', + modal: '#modals-load-content', + remove_item_cart: '.remove_item_form_cart', + insert_show_total_order: '#insert_show_total_order', + insert_show_bonus: '#insert_show_bonus', + insert_show_bonus_host: '#insert_show_bonus_host', + select_delivery_option: '.select_delivery_option', + /* + comp_holder: '#holder_html_view_comp_product', + is_for: null, + url: null, + btn_clear: '#clear-products-basket', + + cart_input: '.cart-input-event-onchange', + remove_item: '.remove_item_form_cart', + shipping_state: '#change_shipping_state', + comp_products: 'switchers-comp-product', + count_comp_products: 'count_comp_products', + shipping_is_for: 'shipping_is_for',*/ + + _log: function ($msg){ + console.log($msg); + }, + init: function () { + var _self = this; + _self.url = $(_self.form).attr('action'); + + + $(_self.cart_holders).each(function (key, obj){ + _self.reInit($(obj)); + + }); + //_self.showInit(); + + /*$(_self.shipping_state).on('change', function(){ + _self.update_shipping_state($(this)); + });*/ + return _self; + }, + setDatabase: function (oTable){ + var _self = this; + _self.oTable = oTable; + }, + reInitModal: function (){ + var _self = this; + $(_self.oTable).find(_self.btn_modal_add).on('click', function(){ + _self.add_product_modal($(this)) + }); + }, + add_product_modal: function (_obj){ + var _self = this; + _self.performRequest({ + product_id: _obj.data('product-id'), + homeparty_id: $(_self.oTable).data('homeparty-id'), + homeparty_user_id: $(_self.oTable).data('homeparty-user-id'), + qty: 1, + action: 'addProduct' + }).done(_self.refreshView); + + }, + reInit: function (obj){ + var _self = this; + var _obj = obj; + obj.find(_self.btn_add).off('click').on('click', function(){ + _self.add_product($(this), _obj) + }); + obj.find(_self.btn_remove).off('click').on('click', function(){ + _self.remove_product($(this), _obj) + }); + obj.find(_self.table_input).off('change').on('change', function(){ + _self.update_input_table($(this), _obj); + }); + + obj.find(_self.remove_item_cart).off('click').on('click', function(){ + _self.remove_from_cart($(this), _obj); + }); + + obj.find(_self.select_delivery_option).off('change').on('change', function(){ + _self.update_delivery_option($(this), _obj); + }); + }, + + add_product: function (_obj, _holder){ + var _self = this; + var input = _holder.find('input[name="product_qty_'+_obj.data('order-item-id')+'"]'); + var qty = parseInt(input.val()) + 1; + qty = _self.checkNumber(qty); + input.val(qty); + _self.update_cart(_holder, _obj, qty); + }, + remove_product: function (_obj, _holder){ + var _self = this; + var input = _holder.find('input[name="product_qty_'+_obj.data('order-item-id')+'"]'); + var qty = parseInt(input.val()) - 1; + qty = _self.checkNumber(qty); + input.val(qty); + _self.update_cart(_holder, _obj, qty); + }, + update_input_table: function (_obj, _holder){ + var _self = this; + var qty = parseInt(_obj.val()); + qty = _self.checkNumber(qty); + _obj.val(qty); + _self.update_cart(_holder, _obj, qty); + }, + update_cart: function (_holder, _obj, qty){ + var _self = this; + _self.performRequest({ + product_id: _obj.data('product-id'), + order_item_id: _obj.data('order-item-id'), + homeparty_id: _holder.data('homeparty-id'), + homeparty_user_id: _holder.data('homeparty-user-id'), + qty: qty, + action: 'updateCart' + }).done(_self.refreshView); + }, + remove_from_cart: function (_obj, _holder){ + var _self = this; + _self.performRequest({ + product_id: _obj.data('product-id'), + order_item_id: _obj.data('order-item-id'), + homeparty_id: _holder.data('homeparty-id'), + homeparty_user_id: _holder.data('homeparty-user-id'), + action: 'removeFromCart' + }).done(_self.refreshView); + }, + update_delivery_option: function (_obj, _holder){ + var _self = this; + _self.performRequest({ + delivery: _obj.val(), + homeparty_id: _holder.data('homeparty-id'), + homeparty_user_id: _holder.data('homeparty-user-id'), + action: 'updateDeliveryOption' + }).done(_self.refreshView); + }, + + refreshView: function (data) { + var _self = IqHomepartyCart; + var obj = $(_self.cart_holder+data.data.homeparty_user_id) + obj.html(data.html_user_cart); + $(_self.insert_show_total_order).html(data.html_total); + $(_self.insert_show_bonus).html(data.html_bonus); + $(_self.insert_show_bonus_host).html(data.html_host_bonus); + $(_self.modal).modal('hide'); + _self.reInit(obj); + //$(_self.comp_holder).html(data.html_comp); + // var input = $(_self.table).find('input[name="product_qty_'+data.data.product_id+'"]'); + // input.val(data.data.qty); + // _self.showInit(); + }, + performRequest : function(data) { + var _self = this; + var url = _self.url, + contentType = 'application/x-www-form-urlencoded; charset=UTF-8'; + + console.log(data); + console.log(url); + + return $.ajax({ + url: url, + data: data, + type: "POST", + dataType: "json", + cache: false, + contentType: contentType, + encode: true, + headers: { + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') + } + }) + .done(function (data) { + console.log('performRequest'); + console.log(data); + + }).fail(function (jqXHR, textStatus, errorThrown) { + console.log(jqXHR); + console.log(jqXHR.responseText); + console.log(textStatus); + console.log(errorThrown); + console.log("Sorry, there was a problem!"); + }); + }, + checkNumber : function(number){ + if(number < 1 || isNaN(number)){ + return 1; + } + if(number >= 999){ + return 999; + } + return number; + } +}; \ No newline at end of file diff --git a/public/js/iq-modal-cart.js b/public/js/iq-modal-cart.js new file mode 100644 index 0000000..e065a4e --- /dev/null +++ b/public/js/iq-modal-cart.js @@ -0,0 +1,181 @@ + +var IqModalCart = { + form: "#cart-order-form", + btn_modal_add: '.add-product-basket', + btn_add: '.add-from-basket', + btn_remove: '.remove-from-basket', + table_input: '.table-input-event-onchange', + oTable: null, + cart_holder: '#insert_show_products_order', + is_for: null, + modal: '#modals-load-content', + remove_item_cart: '.remove_item_form_cart', + insert_show_total_order: '#insert_show_total_order', + input_is_for: 'is_for', + comp_holder: '#holder_html_view_comp_product', + comp_products: 'switchers-comp-product', + count_comp_products: 'count_comp_products', + + _log: function ($msg){ + console.log($msg); + }, + init: function () { + var _self = this; + _self.url = $(_self.form).attr('action'); + _self.is_for = $('input[name="'+_self.input_is_for+'"]').val(); + _self.reInitCart($(_self.cart_holder)); + return _self; + }, + setDatabase: function (oTable){ + var _self = this; + _self.oTable = oTable; + }, + reInitModal: function (){ + var _self = this; + $(_self.oTable).find(_self.btn_modal_add).on('click', function(){ + _self.add_product_modal($(this)) + }); + }, + add_product_modal: function (_obj){ + var _self = this; + _self.performRequest({ + product_id: _obj.data('product-id'), + qty: 1, + action: 'addProduct' + }).done(_self.refreshView); + + }, + reInitCart: function (obj){ + var _self = this; + var _obj = obj; + obj.find(_self.btn_add).off('click').on('click', function(){ + _self.add_product($(this), _obj) + }); + obj.find(_self.btn_remove).off('click').on('click', function(){ + _self.remove_product($(this), _obj) + }); + obj.find(_self.table_input).off('change').on('change', function(){ + _self.update_input_table($(this), _obj); + }); + obj.find(_self.remove_item_cart).off('click').on('click', function(event){ + event.preventDefault() + _self.remove_from_cart($(this), _obj); + }); + if(_self.is_for === 'me' || _self.is_for === 'abo-me'){ + $('input[name^="'+_self.comp_products+'"]').on('change', function(){ + _self.update_comp_product($(this)); + }); + } + }, + update_comp_product: function (_obj){ + var _self = this; + _self.performRequest({ + comp_product_id: _obj.val(), + comp_num: _obj.data('comp_num'), + count_comp_products: $('input[name="'+_self.count_comp_products+'"]').val(), + action: 'updateCompProduct'}) + .done(_self.refreshView); + }, + add_product: function (_obj, _holder){ + var _self = this; + var input = _holder.find('input[name="product_qty_'+_obj.data('order-item-id')+'"]'); + var qty = parseInt(input.val()) + 1; + qty = _self.checkNumber(qty); + input.val(qty); + _self.update_cart(_holder, _obj, qty); + }, + remove_product: function (_obj, _holder){ + var _self = this; + var input = _holder.find('input[name="product_qty_'+_obj.data('order-item-id')+'"]'); + var qty = parseInt(input.val()) - 1; + qty = _self.checkNumber(qty); + input.val(qty); + _self.update_cart(_holder, _obj, qty); + }, + update_input_table: function (_obj, _holder){ + var _self = this; + var qty = parseInt(_obj.val()); + qty = _self.checkNumber(qty); + _obj.val(qty); + _self.update_cart(_holder, _obj, qty); + }, + update_cart: function (_holder, _obj, qty){ + var _self = this; + _self.performRequest({ + product_id: _obj.data('product-id'), + order_item_id: _obj.data('order-item-id'), + cart_order_id: _holder.data('cart-order-id'), + qty: qty, + action: 'updateCart' + }).done(_self.refreshView); + }, + remove_from_cart: function (_obj, _holder){ + var _self = this; + _self.performRequest({ + product_id: _obj.data('product-id'), + order_item_id: _obj.data('order-item-id'), + cart_order_id: _holder.data('cart-order-id'), + action: 'removeFromCart' + }).done(_self.refreshView); + }, + + refreshView: function (data) { + var _self = IqModalCart; + var obj = $(_self.cart_holder) + obj.html(data.html_cart); + $(_self.insert_show_total_order).html(data.html_total); + $(_self.modal).modal('hide'); + if($(_self.comp_holder)){ + $(_self.comp_holder).html(data.html_comp); + } + if($('#value-amount')){ + $('#value-amount').html(data.amount); + } + _self.reInitCart(obj); + + // var input = $(_self.table).find('input[name="product_qty_'+data.data.product_id+'"]'); + // input.val(data.data.qty); + // _self.showInit(); + }, + performRequest : function(data) { + var _self = this; + var url = _self.url, + contentType = 'application/x-www-form-urlencoded; charset=UTF-8'; + + console.log(data); + console.log(url); + + return $.ajax({ + url: url, + data: data, + type: "POST", + dataType: "json", + cache: false, + contentType: contentType, + encode: true, + headers: { + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') + } + }) + .done(function (data) { + console.log('performRequest'); + console.log(data); + + }).fail(function (jqXHR, textStatus, errorThrown) { + console.log(jqXHR); + console.log(jqXHR.responseText); + console.log(textStatus); + console.log(errorThrown); + console.log("Sorry, there was a problem!"); + }); + }, + checkNumber : function(number){ + if(number < 1 || isNaN(number)){ + return 1; + } + if(number >= 999){ + return 999; + } + return number; + } +}; \ No newline at end of file diff --git a/resources/lang/de.json b/resources/lang/de.json index 3fc184b..1fab60d 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -91,6 +91,7 @@ "Data, Login & Security": "Daten, Anmeldung & Sicherheit", "Sign in with your e-mail:": "Anmeldung mit Deiner E-Mail:", "delete": "löschen", + "confirm_delete": "Wirklich löschen?", "imprint": "Impressum", "data protections": "Datenschutz", "Thank you for your registration!": "Vielen Dank für Deine Registrierung!", diff --git a/resources/lang/de/abo.php b/resources/lang/de/abo.php new file mode 100644 index 0000000..ae45be1 --- /dev/null +++ b/resources/lang/de/abo.php @@ -0,0 +1,65 @@ + 'Abo', + 'payment_for_abo' => 'Zahlungsart für Abo', + 'abo_delivery' => 'Abo - regelmäßige Lieferung', + 'abo_are_for_me_and_shipped' => 'Abo ist für mich und wird an meine Adresse versendet', + 'abo_are_for_customer_and_shipped' => 'Abo ist für einen Kunden und wird an den Kunden versendet', + 'abo_delivery_to_me' => 'Abo-Lieferung an mich', + 'abo_delivery_to_the_customer' => 'Abo-Lieferung an den Kunden', + 'every_week' => 'jede Woche', + 'every_weeks' => 'alle :num Wochen', + 'of_month' => 'des Monat', + 'delivery_intervall' => 'Liefertag anpassen', + 'abo_order_info' => 'Mit dem Abschluss des Abonnements wird eine regelmäßige Lieferung eingerichtet, die automatisch an dem gewählten Liefertag versendet und abgerechnet wird, beginnend ab dem heutigen Datum. Anpassungen können jederzeit bequem im Kundenkonto vorgenommen werden. Als Zahlungsmethoden stehen PayPal und Kreditkarte zur Verfügung.', + 'abo_infos' => 'Abo Infos', + 'abo_delivery_infos' => 'Abo Lieferinfos', + 'abo_start_date' => 'Beginn des Abos', + 'abo_delivery_intervall' => 'Liefertag des Abos', + 'delivery_day' => 'Liefertag anpassen', + 'abo_settings' => 'Abo Einstellungen', + 'add_new_abo' => 'Neues Abo anlegen', + 'abo_edit' => 'Abo bearbeiten', + 'abo_details' => 'Abo Details', + 'abo_is_active' => 'Abo ist aktiv', + 'abo_copy_active' => 'Wenn das Abonnement nicht aktiv ist, erfolgt keine automatische Ausführung.', + 'abo_copy_next_date' => 'Der nächste Ausführungstermin kann frühesten auf den Folgetag festgelegt werden.', + 'abo_copy_abo_interval' => 'Die Anpassung des Abonnement-Liefertags wirkt sich auf den kommenden Ausführungstermin aus, wenn das Abonnement aktiv ist.', + 'error_abo_interval' => 'Das Abo Interval nicht korrekt', + 'error_next_date' => 'Das Datum für die nächste Ausführung nicht korrekt', + 'checkout_mail_abo_hl' => 'Dein Abo / regelmäßige Lieferung.', + 'checkout_mail_abo_start' => 'Dein Abo wurde erfolgreich mit folgenden Einstellungen angelegt:', + 'checkout_mail_abo_info' => 'Deine Abo-Einstellungen findest Du in Deinem Account unter "Meine Abos" und dort können die Einstellungen auch bearbeitet werden.', + 'abo_new' => 'neu', + 'abo_okay' => 'okay', + 'abo_hold' => 'angehalten', + 'abo_cancel' => 'storniert', + 'abo_finish' => 'beendet', + 'abo_inactive' => 'inaktiv', + 'abo_grace' => 'kulanz', + 'pros_hl' => 'Die Vorteile eines Abos', + 'pros_list' => '
  • Abo-Abschluss für Berater und Kunden: Jeder Berater oder Kunde kann ein Abo abschließen, das an einem festgelegten Tag im Monat ausgeführt wird, um eine regelmäßige und planbare Lieferung zu gewährleisten.
  • +
  • Monatliche Lieferung: Einmal im Monat wird eine neue Lieferung direkt an die Haustür gesendet.
  • +
  • Flexibel anpassbar: Das Abonnement kann jederzeit angepasst werden, z.B. in Bezug auf Produkte, Mengen oder Lieferzeitpunkte.
  • +
  • Vielfältige Produktauswahl: Verschiedene Produkte können im Abo enthalten sein.
  • +
  • Einfache Verwaltung: Änderungen und Anpassungen können bequem im Salescenter vorgenommen werden.
  • +
  • Pausieren oder Beenden: Das Abo kann flexibel pausiert oder beendet werden.
  • +
  • Preisvorteil: Die Abo-Produkte erhalten oft spezielle Rabatte oder Angebote.
  • +
  • Jetzt starten: Wähle Deine Produkte, passe das Abo an deine Bedürfnisse an, zahle die erste Bestellung und aktiviere damit Dein Abo für die nächsten Lieferungen.
  • ', + 'abo_pros' => 'Abo Vorteile', + 'abo_order_info' => 'Du kannst die Produkte Deines Abos jederzeit anpassen, bei der nächsten Ausführung werden Dir Deine zusammengestellen Produkte zugesendet.', + 'abo_order_hl' => 'Abo Zusammenstellung', + 'add_product' => 'Produkt hinzufügen', + 'product_prices_career_level_info' => 'Die Produktpreise werden entsprechend Deinem Karriere-Level :user_level_name abzüglich :user_level_margin % Marge angezeigt und brechnet.', + 'product_prices_career_level_cpay_info' => 'Die Produktpreise werden als Kunden VK-Preise angezeigt, nach Abschluss der Kundenzahlung erhälst du Deine Provision entsprechend Deinem Karriere-Level :user_level_name Provision :user_level_margin %.', + 'error_email_has_abo' => 'Für die E-Mail-Adresse :email ist bereits ein Abonnement vorhanden.', + 'abo_assigned' => 'Abo aktiv', + 'base' => 'Basis', + 'upgrade' => 'Upgrade', + 'abo_type_info' => 'Hinweis:Jedes Abo besteht mindestens aus einem Basis-Produkt :base !
    Upgrade-Produkte :upgrade sind optional und können nach belieben hinzugefügt werden.', + 'abo_type_info_base' => 'Das Abo benötigt mindestens ein Basis-Produkt :base !', + 'need_basis_product' => 'Sie müssen min. ein Basis-Produkt in Ihrem Abo haben, bitte fügen Sie erst ein neues Basis-Produkt hinzu und entfernen Sie dann das alte Basis-Produkt!', + 'abo_item_not_found' => 'Abo-Position nicht gefunden', + 'product_not_found' => 'Produkt nicht gefunden', +); diff --git a/resources/lang/de/actions.php b/resources/lang/de/actions.php index 0510007..a78f355 100644 --- a/resources/lang/de/actions.php +++ b/resources/lang/de/actions.php @@ -20,5 +20,5 @@ return array ( 'dictResponseError' => 'Server responded with {{statusCode}} code.', 'dictCancelUpload' => 'Cancel upload', 'dictRemoveFile' => 'Remove file', - 'dictMaxFilesExceeded' => 'You can not upload any more files.' + 'dictMaxFilesExceeded' => 'You can not upload any more files.', ); diff --git a/resources/lang/de/email.php b/resources/lang/de/email.php index 5af469e..b3c3a3d 100644 --- a/resources/lang/de/email.php +++ b/resources/lang/de/email.php @@ -96,8 +96,10 @@ Dein Team von MIVITA', 'verify_copy1line' => 'Wir haben Daten über Dich in unserem System gespeichert. Bitte folge dem unten stehenden Link um Deine E-Mail-Adresse zu bestätigen. Weitherhin kannst Du Deine Daten ändern oder auch löschen.', 'verify_e_mail' => 'Bestätige Deine Daten und E-Mail-Adresse', 'your_request_from' => 'Deine Anfrage von', - 'your_custom_payout' => 'Dein persönlicher mivita Berater - :name hat eine individuelle Bestellung für Dich zusammengestellt. Jetzt musst Du nur noch Deine Bestellung bezahlen. Klicke auf den Link und gelange zum Checkout von mivita.care.', + 'your_custom_payout' => 'Dein persönlicher mivita Berater - :name hat eine individuelle Bestellung für Dich zusammengestellt. Jetzt musst Du nur noch Deine Bestellung bezahlen. Klicke auf den Link und gelange zum Checkout von mivita.care.', + 'your_custom_abo_payout' => 'Dein persönlicher mivita Berater - :name hat eine individuelle Abo-Bestellung für Dich zusammengestellt. Jetzt musst Du nur noch Deine Abo-Bestellung bezahlen. Klicke auf den Link und gelange zum Checkout von mivita.care.', 'subject_custom_payout' => 'Deine individuelle Bestellung von :name auf mivita.care', + 'subject_custom_abo_payout' => 'Deine individuelle Abo-Bestellung von :name auf mivita.care', 'button_custom_payout' => 'zur Zahlung', 'checkout_custom_payout' => 'Dein Berater hat folgende Produkte für Dich zusammengestellt', diff --git a/resources/lang/de/membership.php b/resources/lang/de/membership.php index 06f9a98..d65ba11 100644 --- a/resources/lang/de/membership.php +++ b/resources/lang/de/membership.php @@ -41,9 +41,9 @@ return array ( 'inactive' => 'inaktiv', 'is_no_longer_possible_to_change_package' => 'Eine Änderung Deines Berater-Paketes ist nicht mehr möglich.', 'membership' => 'Mitgliedschaft', - 'membership_was_renewed' => 'Deine Mitglidschaft wurde am :date verlängert. ', + 'membership_was_renewed' => 'Dein Vertrag wurde am :date verlängert. ', 'open_payment_options' => 'Zahlungsoptionen öffnen', - 'payment_copy_1' => 'Alternativ hast Du die Möglichkeit jetzt direkt Deine Mitgliedschaft mit anderen Zahlungsmöglichkeite zu bezahlen.', + 'payment_copy_1' => 'Alternativ hast Du die Möglichkeit jetzt direkt Deine Mitgliedschaft mit anderen Zahlungsmöglichkeiten zu bezahlen.', 'payment_copy_2' => 'Ist die Mitgliedschaft vor dem :date bezahlt, wird das SEPA Mandart nicht ausgeführt!', 'payment_has_been_made' => 'Eine Zahlung wurde ausgeführt.', 'renewal_is_active_membership_fee_automatic' => ' Deine automatische Verlängerung ist aktiv, wir werden am :date Deine Mitgliedschaftsgebühr automatisch per SEPA Mandat einziehen.', @@ -55,4 +55,6 @@ return array ( 'upgrade_package_and_proceed_payment' => 'Du hast die Möglichkeit Dein Paket zu upgraden, wähle einfach das erweiterte Paket aus und gehe weiter zur Zahlung.', 'we_do_not_collect_membership_fee' => 'Wir konnten am :date Deine Mitgliedschaftsgebühr nicht automatisch per SEPA Mandat einziehen.', 'your_booked_package' => 'Dein gebuchtes Paket', + 'info_contract_renewal' => 'Dein Vertrag wird :days Tage vor Ablauf Deiner Berater-Mitgliedschaft automatisch verlängert. Nach der Vertragsverlängerung ist eine Änderung des Berater-Pakets nicht mehr möglich und du musst die Zahlung für Deine Mitgliedschaft vornehmen.', + 'alert_contract_renewal' => 'Um Deine Berater-Mitgliedschaft zu verlängern, führe bitte die Zahlung für Dein gebuchtes MIVITA-Paket durch.' ); diff --git a/resources/lang/de/navigation.php b/resources/lang/de/navigation.php index dc297be..44d92be 100644 --- a/resources/lang/de/navigation.php +++ b/resources/lang/de/navigation.php @@ -57,5 +57,12 @@ return array ( 'downloadcenter' => 'Downloadcenter', 'files' => 'Dateien', 'tags' => 'Tags', + 'myabos' => 'Meine Abos', + 'customerabos' => 'Kunden Abos', + 'myabo' => 'Mein Abo', + 'customerabo' => 'Kunden Abo', + 'abo' => 'Abo', + 'abos' => 'Abos', + 'payment_links' => 'Bezahllinks', ); diff --git a/resources/lang/de/order.php b/resources/lang/de/order.php index b069a12..e8ae271 100644 --- a/resources/lang/de/order.php +++ b/resources/lang/de/order.php @@ -48,6 +48,7 @@ return array ( 'invoice' => 'Rechnung', 'invoice_address' => 'Rechnungsadresse', 'land_can_no_longer_be_changed' => 'Das Land kann nicht mehr geändert werden', + 'email_can_not_be_changed' => 'Deine E-Mail Adresse kann nicht mehr geändert werden', 'link_to_the_invoice' => 'Link zur Rechnung', 'my_delivery_address' => 'Meine Lieferadresse', 'net' => 'netto', @@ -76,8 +77,10 @@ return array ( 'ship_to_existing_customer_select_customer' => 'An bestehenden Kunden versenden | Kunden auswählen', 'ship_to_new_customer' => 'An neuen Kunden versenden', 'ship_to_this_customer' => 'An diesen Kunde versenden', - 'ship_to_this_customer_check' => 'Mir ist bekannt, dass dieser Bestellvorgang nur für Kundenbestellungen ist und nicht für meine eigenen Bestellungen', - 'ship_to_this_customer_info' => 'Sollten unten stehende Angaben nicht korrekt sein oder aktualisiert werden müssen, ändere diese bitte vorerst unter', + 'ship_to_this_customer_check' => 'Mir ist bekannt, dass dieser Bestellvorgang nur für Kundenbestellungen ist und nicht für meine eigenen Bestellungen.', + 'ship_to_this_customer_info' => 'Sollten die Rechnungsadresse oder das Lieferland nicht korrekt sein, ändere diese bitte vor der Bestellung unter', + 'ship_to_this_customer_info_2' => 'Die Lieferadresse, bis auf das Lieferland, kann auch im Checkout angepassst werden.', + 'ship_to_this_email_info' => 'Der Bestelllink wird Deinem Kunden an folgenden E-Mail-Adresse gesendet:', 'shipping' => 'Versand', 'shipping_compensation_product' => 'Versand Kompensationsprodukt', 'shipping_costs' => 'Versandkosten', @@ -107,23 +110,8 @@ return array ( 'sum_net' => 'Summe netto', 'confirm_and_send_order' => 'Bestellung abschließen und Zahlungslink versenden', 'confirm_send_order_info' => 'Mit dem Abschließen der Bestellung wird ein Zahlungslink erstellt und per E-Mail an Deinen Kunden versendet.
    Dein Kunde kann dann die Zahlung abschließen und die Ware wird versendet, Deine Provision wird mit dem Abschluss der Zahlung gutgeschrieben.', - 'order_was_placed_successfully' => 'Die Bestellung wurde erfolgreich aufgegeben.', + 'order_was_placed_successfully' => 'Die Bestellung wurde erfolgreich angelegt.', + 'order_abo_was_placed_successfully' => 'Die Abo-Bestellung wurde erfolgreich angelegt.', 'payment_link_for_your_customer' => 'Der Bezahllink für Deinen Kunden', 'delivery' => 'Lierferung', - 'payment_for_abo' => 'Zahlungsart für Abo', - 'abo_delivery' => 'Abo - regelmäßige Lieferung', - 'abo_are_for_me_and_shipped' => 'Abo ist für mich und wird an meine Adresse versendet', - 'abo_are_for_customer_and_shipped' => 'Abo ist für einen Kunden und wird an den Kunden versendet', - 'abo_delivery_to_me' => 'Abo-Lieferung an mich', - 'abo_delivery_to_the_customer' => 'Abo-Lieferung an den Kunden', - 'every_week' => 'jede Woche', - 'every_weeks' => 'alle :num Wochen', - 'abo_settings' => 'Abo Einstellungen', - 'delivery_intervall' => 'Lieferintervall anpassen', - 'abo_order_info' => 'Durch das Abschließen des Abonnements wird eine regelmäßige Lieferung eingerichtet, die automatisch im festgelegten Intervall geliefert und abgerechnet wird, beginnend ab heute. Anpassungen am Abonnement können im Kundenkonto vorgenommen werden. Mögliche Zahlungsarten sind PayPal und Kreditkarte.', - 'abo_infos' => 'Abo Infos', - 'abo_delivery_infos' => 'Abo Lieferinfos', - 'abo_start_date' => 'Beginn des Abos', - 'abo_delivery_intervall' => 'Lieferintervall des Abos', - ); diff --git a/resources/lang/de/payment.php b/resources/lang/de/payment.php index 7a11ee6..40db3e1 100644 --- a/resources/lang/de/payment.php +++ b/resources/lang/de/payment.php @@ -84,13 +84,29 @@ return array ( 'your_mivita_team' => 'Dein Team von mivita.care', 'your_order_number_is' => 'Deine Bestellnummer ist', 'open'=>'offen', + 'openly'=>'geöffnet', 'paid'=>'bezahlt', 'check'=>'prüfen', 'cancelled'=>'storniert', - + 'link_sent'=>'Link gesendet', + 'link_openly'=>'Link geöffnet', + 'link_check'=>'Zahlung in Ausführung', + 'link_pending'=>'Zahlung in Bearbeitung', + 'link_failed'=>'Zahlung fehlgeschlagen', + 'link_canceled'=>'Zahlung abgebrochen', + 'link_appointed'=>'Zahlung genehmigt', + 'link_paid'=>'bezahlt', + 'alert_link_sent'=>'Zahlungslink gesendet', + 'alert_link_openly'=>'Zahlungslink geöffnet', + 'alert_link_check'=>'Zahlung in Ausführung', + 'alert_link_pending'=>'Zahlung in Bearbeitung', + 'alert_link_failed'=>'Zahlung ist fehlgeschlagen', + 'alert_link_canceled'=>'Zahlung wurde abgebrochen', + 'alert_link_appointed'=>'Zahlung wurde genehmigt', + 'alert_link_paid'=>'Zahlung war erfolgreich', 'failed' => 'abbruch', 'no_payment' => 'keine Zahlung', - + 'link_was_paid' => 'Die Zahlung wurde erfolgreich abgeschlossen.', 'paymend_paid' => 'Zahlung bezahlt', 'paymend_open' => 'Zahlung offen', 'paymend_failed' => 'Zahlung abbruch', @@ -121,7 +137,6 @@ return array ( 'shop'=> 'Shop', 'external'=> 'extern', 'collective_invoice'=> 'Sammelrechnung', - 'in_process'=> 'in Bearbeitung', 'shipped'=> 'versendet', 'completed'=> 'abgeschlossen', diff --git a/resources/lang/de/tables.php b/resources/lang/de/tables.php index ba37609..5f87cb8 100644 --- a/resources/lang/de/tables.php +++ b/resources/lang/de/tables.php @@ -1,6 +1,6 @@ '', 'VAT' => 'MwSt', 'account' => 'Account', @@ -76,5 +76,19 @@ return array ( 'type' => 'Art', 've' => 'VE', 'vk_price' => 'VK-Preis', - 'my_commission' => 'Meine Provision', + 'my_commission' => 'Mein Provision', + 'start_date' => 'Start Datum', + 'next_date' => 'Nächste Ausführung', + 'last_date' => 'Letzte Ausführung', + 'abo_delivery_day' => 'Abo-Liefertag', + 'abo_delivery' => 'Abo-Lieferungen', + 'active' => 'Aktiv', + 'is_for' => 'Ist für', + 'count' => 'Anzahl', + 'member' => 'Mitglied', + 'adviser' => 'Berater', + 'exc' => 'Ausf.', + 'executions' => 'Ausführungen', + 'previous_orders' => 'bisherige Kundebestellungen', + 'partner_since' => 'Partner seit', ); diff --git a/resources/lang/de/team.php b/resources/lang/de/team.php index 4f03a1b..0d93398 100644 --- a/resources/lang/de/team.php +++ b/resources/lang/de/team.php @@ -22,7 +22,7 @@ return array ( 'current_commission_level' => 'aktuelle Provisions-Stufe', 'customer_commission' => 'Kundenprovision', 'consultant_margin' => 'Beratermarge', - 'consultant_margin_info' => 'Hinweis: Die Marge wurde bei der Bestellung (an den Produkten) bereits abgezogen.', + 'consultant_margin_info' => 'Hinweis: Die Marge wurde bei der Bestellung bereits abgezogen und somit schon ausbezahlt.', 'customer_points' => 'Kunden Points', 'date' => 'Datum', 'e' => 'E', diff --git a/resources/lang/en/abo.php b/resources/lang/en/abo.php new file mode 100644 index 0000000..25926b0 --- /dev/null +++ b/resources/lang/en/abo.php @@ -0,0 +1,40 @@ + 'Subscription', + 'payment_for_abo' => 'Payment method for subscription', + 'abo_delivery' => 'Subscription - regular delivery', + 'abo_are_for_me_and_shipped' => 'Subscription is for me and will be shipped to my address', + 'abo_are_for_customer_and_shipped' => 'Subscription is for a customer and will be sent to the customer', + 'abo_delivery_to_me' => 'Subscription delivery to me', + 'abo_delivery_to_the_customer' => 'Subscription delivery to the customer', + 'every_week' => 'every week', + 'every_weeks' => 'every :num weeks', + 'abo_settings' => 'Subscription settings', + 'delivery_interval' => 'customize delivery interval', + 'abo_order_info' => 'By completing the subscription, a regular delivery is set up, which is automatically delivered and billed at the specified interval, starting today. Adjustments to the subscription can be made in the customer account. Possible payment methods are PayPal and credit card.', + 'abo_infos' => 'Subscription info', + 'abo_delivery_infos' => 'Subscription delivery information', + 'abo_start_date' => 'Start date of the subscription', + 'abo_delivery_interval' => 'Delivery interval of the subscription', + 'abo_settings' => 'Subscription settings', + 'add_new_abo' => 'Add new subscription', + 'abo_edit' => 'Edit subscription', + 'abo_details' => 'Subscription details', + 'abo_is_active' => 'Subscription is active', + 'abo_copy_active' => 'If the subscription is not active, it will not be executed automatically', + 'abo_copy_next_date' => 'The next execution date can be set to the following day at the earliest', + 'abo_copy_abo_interval' => 'The adjustment of the subscription interval does not affect the next execution date, but affects the dates after the next execution', + 'error_abo_interval' => 'The subscription interval is not correct', + 'error_next_date' => 'The date for the next execution is not correct', + 'checkout_mail_abo_hl' => 'Your subscription / regular delivery', + 'checkout_mail_abo_start' => 'Your subscription was successfully created with the following settings:', + 'checkout_mail_abo_info' => 'You can find your subscription settings in your account under "My subscriptions" and the settings can also be edited there', + 'abo_new' => 'new', + 'abo_okay' => 'okay', + 'abo_hold' => 'stopped', + 'abo_cancel' => 'canceled', + 'abo_finish' => 'finished', + 'abo_inactive' => 'inactive', + 'abo_grace' => 'grace', +); diff --git a/resources/lang/en/membership.php b/resources/lang/en/membership.php index 9fd2b1e..0a87872 100644 --- a/resources/lang/en/membership.php +++ b/resources/lang/en/membership.php @@ -7,6 +7,7 @@ return array ( 'abo_copy_3' => 'I hereby confirm that I will delete my SEPA and deactivate the automatic extension.', 'active' => 'active', 'active_package' => 'active package', + 'alert_contract_renewal' => 'To extend your consultant membership, please complete the payment for your booked MIVITA package.', 'booked_package' => 'booked package', 'change' => 'adjust', 'change_copy_1' => 'You can change your membership until the next contract extension, on :date.', @@ -38,9 +39,10 @@ return array ( 'home_copy_last_36' => 'As announced, we have paused your advisor account because you did not renew your membership in time. If you would like to benefit from the advantages and features of MIVITA again, you can reactivate your account at any time.', 'home_hl' => 'membership / annual fee', 'inactive' => 'inactive', + 'info_contract_renewal' => 'Your contract will be automatically extended :days before your consultant membership expires. Once the contract has been extended, it is no longer possible to change the consultant package and you must make the payment for your membership.', 'is_no_longer_possible_to_change_package' => 'It is no longer possible to change your advisor package.', 'membership' => 'membership', - 'membership_was_renewed' => 'Your membership was renewed on :date.', + 'membership_was_renewed' => 'Your contract was renewed on :date.', 'open_payment_options' => 'open payment options', 'payment_copy_1' => 'Alternatively, you now have the option of paying for your membership directly using other payment options.', 'payment_copy_2' => 'If the membership is paid before the :date, the SEPA mandate will not be executed!', diff --git a/resources/lang/es/abo.php b/resources/lang/es/abo.php new file mode 100644 index 0000000..352cee7 --- /dev/null +++ b/resources/lang/es/abo.php @@ -0,0 +1,40 @@ + 'Suscripción', + 'payment_for_abo' => 'Forma de pago para la suscripción', + 'abo_delivery' => 'Suscripción - entrega regular', + 'abo_are_for_me_and_shipped' => 'La suscripción es para mí y se enviará a mi dirección', + 'abo_are_for_customer_and_shipped' => 'La suscripción es para un cliente y será enviada al cliente', + 'abo_delivery_to_me' => 'Envío de la suscripción a mi dirección', + 'abo_delivery_to_the_customer' => 'Entrega de suscripción al cliente', + 'every_week' => 'cada semana', + 'every_weeks' => 'cada :num semanas', + 'abo_settings' => 'Ajustes de suscripción', + 'delivery_interval' => 'personalizar intervalo de entrega', + 'abo_order_info' => 'Al completar la suscripción, se establece una entrega regular, que se entrega y factura automáticamente en el intervalo especificado, a partir de hoy. Los ajustes a la suscripción se pueden hacer en la cuenta del cliente. Los métodos de pago posibles son PayPal y tarjeta de crédito.', + 'abo_infos' => 'Información de suscripción', + 'abo_delivery_infos' => 'Información de entrega de la suscripción', + 'abo_start_date' => 'Fecha de inicio de la suscripción', + 'abo_delivery_interval' => 'Intervalo de entrega de la suscripción', + 'abo_settings' => 'Configuración de la suscripción', + 'add_new_abo' => 'Añadir nueva suscripción', + 'abo_edit' => 'Editar suscripción', + 'abo_details' => 'Detalles de suscripción', + 'abo_is_active' => 'La suscripción está activa', + 'abo_copy_active' => 'Si la suscripción no está activa, no se ejecutará automáticamente', + 'abo_copy_next_date' => 'La siguiente fecha de ejecución puede establecerse como muy pronto al día siguiente', + 'abo_copy_abo_interval' => 'El ajuste del intervalo de suscripción no afecta a la siguiente fecha de ejecución, pero afecta a las fechas posteriores a la siguiente ejecución', + 'error_abo_interval' => 'El intervalo de suscripción no es correcto', + 'error_next_date' => 'La fecha de la siguiente ejecución no es correcta', + 'checkout_mail_abo_hl' => 'Su suscripción / entrega regular', + 'checkout_mail_abo_start' => 'Su suscripción se ha creado correctamente con la siguiente configuración:', + 'checkout_mail_abo_info' => 'Puede encontrar la configuración de su suscripción en su cuenta en «Mis suscripciones» y la configuración también se puede editar allí', + 'abo_new' => 'nuevo', + 'abo_okay' => 'ok', + 'abo_hold' => 'parado', + 'abo_cancel' => 'cancelado', + 'abo_finish' => 'terminado', + 'abo_inactive' => 'inactivo', + 'abo_grace' => 'gracia', +); diff --git a/resources/lang/es/cal.php b/resources/lang/es/cal.php index bce94f5..e016bf5 100644 --- a/resources/lang/es/cal.php +++ b/resources/lang/es/cal.php @@ -11,7 +11,7 @@ return array ( 'July' => 'julio', 'June' => 'junio', 'March' => 'marzo', - 'May' => 'puede', + 'May' => 'mayo', 'November' => 'noviembre', 'October' => 'octubre', 'September' => 'septiembre', diff --git a/resources/lang/es/homeparty.php b/resources/lang/es/homeparty.php index 6abc192..8b2b022 100644 --- a/resources/lang/es/homeparty.php +++ b/resources/lang/es/homeparty.php @@ -14,18 +14,18 @@ return array ( 'create_guest' => 'crear invitado', 'create_guests' => 'crear invitados', 'create_guests_info' => 'Luego se pueden crear invitados y realizar pedidos.', - 'create_new_homeparty' => 'crear un nuevo grupo de tiempo muerto', + 'create_new_homeparty' => 'Recrea la fiesta de descanso', 'credit_bonus' => 'bonificación de crédito', - 'credit_homeparty_voucher' => 'bono de fiesta de tiempo muerto de crédito', + 'credit_homeparty_voucher' => 'bono de fiesta de descanso de crédito', 'current_bonus_view' => 'vista de bonificación actual', 'data_protection' => 'protección de Datos', 'data_protection_reasons_your_personal_data_will_not_be_shown' => 'Nota: Por motivos de protección de datos, sus datos personales no se mostrarán aquí a otros participantes. Una vez enviados, ya no se pueden editar. Si desea realizar un cambio más adelante, comuníquese con su asesor personal de MIVITA.', 'deduct_points_by_voucher' => 'deducción de puntos mediante bono', - 'delivery_address_homeparty' => 'fiesta de tiempo de espera de dirección de entrega', + 'delivery_address_homeparty' => 'Dirección de entrega de la fiesta de descanso', 'delivery_directly_to_the_guest' => 'entrega directamente al huésped.', 'delivery_to_host' => 'entrega al anfitrión', 'description_welcome_text' => 'descripción/texto de bienvenida', - 'enter_your_personal_data_for_homeparty' => 'introduce tus datos personales para la fiesta de tiempo muerto', + 'enter_your_personal_data_for_homeparty' => 'Introduce tus datos personales para la fiesta de descanso', 'event_date' => 'fecha del evento', 'event_place' => 'evento', 'from' => 'lejos', @@ -36,14 +36,14 @@ return array ( 'guest_order_sent_directly_info' => 'Si un huésped desea que su pedido se envíe directamente a su dirección personal, puede especificarlo por separado durante el proceso de pedido.', 'guests' => 'invitados', 'homeparty' => 'Fiesta de descanso', - 'homeparty_add_host_address_info' => 'Ingrese la dirección del anfitrión donde se organiza la fiesta de tiempo muerto.', - 'homeparty_delete_really' => '¿Realmente eliminar la fiesta de tiempo muerto?', + 'homeparty_add_host_address_info' => 'Ingrese la dirección del anfitrión donde se organiza la fiesta de descanso.', + 'homeparty_delete_really' => '¿Realmente eliminar la fiesta de descanso?', 'homeparty_invoice_info' => 'La factura de mivita se enviará a su dirección (consultor). Usted es responsable de facturar al anfitrión y a los invitados.', - 'homeparty_manage' => 'gestionar fiesta de tiempo muerto', + 'homeparty_manage' => 'gestionar fiesta de descanso', 'host' => 'anfitriona', 'host_address_save' => 'guardar dirección de host', 'host_can_not_delete' => 'el host no se puede eliminar', - 'host_homeparty' => 'anfitrión: fiesta de tiempo muerto', + 'host_homeparty' => 'anfitrión: fiesta de descanso', 'host_organiser_event' => 'anfitrión/organizador', 'invitation' => 'invitación', 'invitation_link_for_guests' => 'enlace de invitación para invitados.', @@ -65,9 +65,9 @@ return array ( 'voucher_bonus' => 'bono de vale', 'voucher_bonus_cannot_be_applied' => 'El cupón/bono no se puede aplicar porque el anfitrión no ha agregado ningún producto.', 'voucher_total' => 'bono total', - 'welcome_copy' => 'Bienvenidos a nuestra fiesta time-out sobre aloe vera ecológico y cosmética natural. Le informaremos sobre lo que realmente significa calidad superior en cosmética natural, le mostraremos muchos ejemplos de aplicaciones para problemas de la piel y los intestinos y, por supuesto, podrá probar nuestros productos exhaustivamente. ¡Esperamos verte!', + 'welcome_copy' => 'Bienvenidos a nuestra fiesta de descando sobre aloe vera ecológico y cosmética natural. Le informaremos sobre lo que realmente significa calidad superior en cosmética natural, le mostraremos muchos ejemplos de aplicaciones para problemas de la piel y los intestinos y, por supuesto, podrá probar nuestros productos exhaustivamente. ¡Esperamos verte!', 'your_MIVITA_advice' => 'tu consejo MIVITA', - 'your_data_has_been_successfully_created_have_fun' => 'Tus datos han sido creados exitosamente. ¡Diviértete en la fiesta del descanso!', + 'your_data_has_been_successfully_created_have_fun' => 'Tus datos han sido creados exitosamente. ¡Diviértete en la fiesta de descanso!', 'your_host' => 'tu anfitrión', 'your_hostess' => 'tu anfitriona', ); diff --git a/resources/lang/es/membership.php b/resources/lang/es/membership.php index 7c9e134..86be59f 100644 --- a/resources/lang/es/membership.php +++ b/resources/lang/es/membership.php @@ -7,6 +7,7 @@ return array ( 'abo_copy_3' => 'Por la presente confirmo que eliminaré mi SEPA y desactivaré la extensión automática.', 'active' => 'activo', 'active_package' => 'paquete activo', + 'alert_contract_renewal' => 'Para ampliar su afiliación como consultor, complete el pago de su paquete MIVITA reservado.', 'booked_package' => 'paquete reservado', 'change' => 'ajustar', 'change_copy_1' => 'Puedes cambiar tu membresía hasta la próxima extensión de contrato, el :date.', @@ -38,9 +39,10 @@ return array ( 'home_copy_last_36' => 'Como lo anunciamos, hemos pausado su cuenta de asesor porque no renovó su membresía a tiempo. Si deseas volver a beneficiarte de las ventajas y características de MIVITA, puedes reactivar tu cuenta en cualquier momento.', 'home_hl' => 'membresía / cuota anual', 'inactive' => 'inactivo', + 'info_contract_renewal' => 'Su contrato se renovará automáticamente :días antes de que expire su afiliación como consultor. Una vez prorrogado el contrato, ya no será posible cambiar el paquete de consultor y deberá abonar su afiliación.', 'is_no_longer_possible_to_change_package' => 'Ya no es posible cambiar su paquete de asesor.', 'membership' => 'membresía', - 'membership_was_renewed' => 'Su membresía fue renovada el :date.', + 'membership_was_renewed' => 'Su contrato se prorrogó en :date.', 'open_payment_options' => 'abrir opciones de pago', 'payment_copy_1' => 'Alternativamente, ahora tiene la opción de pagar su membresía directamente utilizando otras opciones de pago.', 'payment_copy_2' => 'Si la membresía se paga antes de la :date, ¡el mandato SEPA no se ejecutará!', diff --git a/resources/lang/es/validation.php b/resources/lang/es/validation.php index cdd11cc..34d4542 100644 --- a/resources/lang/es/validation.php +++ b/resources/lang/es/validation.php @@ -65,8 +65,8 @@ return array ( 'shipping_salutation' => 'saludo', 'shipping_zipcode' => 'código postal', 'size' => 'tamaño', - 'tax_identification_number' => 'número de identificación tributaria', - 'tax_number' => 'número de impuesto', + 'tax_identification_number' => 'número de RIO', + 'tax_number' => 'número de impuesto (NIE ó NIF)', 'time' => 'tiempo', 'title' => 'título', 'user_shop_active' => 'condiciones de uso', diff --git a/resources/lang/es/website.php b/resources/lang/es/website.php index 8aa3512..130ed3b 100644 --- a/resources/lang/es/website.php +++ b/resources/lang/es/website.php @@ -21,7 +21,7 @@ return array ( 'contents' => 'contenido', 'email' => 'correo electrónico', 'for_you_on_spot' => 'para ti en el sitio', - 'for_you_on_spot_copy' => 'Estuvimos a su disposición en Aloe Vera Farm en Mallorca, porque para nosotros la transparencia es importante. De esta manera sabrá exactamente de dónde provienen sus productos y cómo se producen. Calidad auténtica.', + 'for_you_on_spot_copy' => 'La transparencia es muy imprtante para nosotros. Por eso estuvimos en Mallorca para visitar la granja de Aloe Vera. Para que sepa exactamente de dónde proceden nuestros productos y cómo se producen.', 'gtc' => 'condiciones', 'impress' => 'imprimir', 'language' => 'idioma', @@ -33,7 +33,7 @@ return array ( 'note_on_use_copy' => '¡El uso, reproducción, distribución, publicación o uso comercial no autorizado sin el permiso del autor del contenido de este sitio web está prohibido y será perseguido tanto bajo la ley penal como civil!', 'online_dispute_resolution' => 'resolución de disputas en línea', 'online_dispute_resolution_copy' => 'Según el artículo 14, apartado 1, ODR-VO: la Comisión Europea proporciona una plataforma para la resolución de disputas (OS) en línea, que puede encontrar aquí', - 'partner' => 'pareja', + 'partner' => 'socio', 'payment_methods' => 'métodos de pago', 'phone' => 'teléfono', 'phone_number' => 'teléfono: +49 (0) 8333 946 17 67', @@ -70,7 +70,7 @@ return array ( 'to_privacy_policy' => 'declaracion de privacidad', 'we_will_get_back_to_you' => 'Le contactaremos inmediatamente.', 'welcome' => 'bienvenido', - 'welcome_copy' => 'Espero su visita a mi tienda online MIVITA. Soy tu consejo personal sobre los productos y su aplicación.', + 'welcome_copy' => 'Espero su visita a mi tienda online MIVITA. Soy tu asesor personal sobre los productos y su aplicación.', 'yes' => 'SÍ', 'you_are_now_in_shop' => 'Estás en la tienda:', 'you_are_now_in_shop_notice' => 'Nota importante: Los pedidos en el país seleccionado solo se pueden enviar dentro de ese país. Si cambia su país, se cerrará su sesión actual y se vaciará su carrito de compras.', diff --git a/resources/views/admin/abo/_detail.blade.php b/resources/views/admin/abo/_detail.blade.php new file mode 100644 index 0000000..62fe806 --- /dev/null +++ b/resources/views/admin/abo/_detail.blade.php @@ -0,0 +1,109 @@ + + +
    +
    +
    +
    {{ __('tables.start_date') }}
    + {{ $user_abo->start_date }} +
    +
    +
    {{ __('tables.next_date') }}
    + {{ $user_abo->next_date }} +
    +
    +
    {{ __('tables.abo_delivery_day') }}
    + {{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }} +
    +
    +
    {{ __('tables.last_date') }}
    + {{ $user_abo->last_date }} +
    + +
    +
    +
    +
    +
    +
    +
    {{ __('tables.status') }} / {{ __('tables.active') }}
    + {!! $user_abo->getStatusFormated() !!}  {!! get_active_badge($user_abo->active) !!} +
    +
    +
    {{ __('tables.abo_delivery') }}
    + {{ $user_abo->getCountOrders() }} + +
    + +
    +
    {{ __('tables.payment') }}
    + {{ $user_abo->getPaymentType() }} +
    +
    +
    {{ __('tables.amount') }}
    + {{ $user_abo->getFormattedAmount() }} € +
    +
    +
    + +
    + @if($isAdmin) +
    +
    +
    + +
    + +
    + @if(isset($user_abo->shopping_user) && $user_abo->shopping_user->member_id > 0) +
    {{ __('tables.adviser') }}
    + {!! ''.$user_abo->shopping_user->member->getFullName().'' !!} + @endif +
    + +
    +
    {{ __('tables.is_for') }}
    + {!! $user_abo->getIsForFormated() !!} + @if($user_abo->is_for === 'me') + + + @endif + + @if($user_abo->is_for === 'ot') + + @endif +
    + +
    +
    + @else +
    +
    +
    + +
    + +
    + {!! $user_abo->getIsForFormated() !!} + @if($user_abo->is_for === 'me') + + + @endif + + @if($user_abo->is_for === 'ot') + + @endif +
    +
    +
    + @endif + + + \ No newline at end of file diff --git a/resources/views/admin/abo/_executions.blade.php b/resources/views/admin/abo/_executions.blade.php new file mode 100644 index 0000000..e35053d --- /dev/null +++ b/resources/views/admin/abo/_executions.blade.php @@ -0,0 +1,109 @@ + +
    +
    + {{ __('navigation.abo') }} {{ __('tables.executions') }} +
    + + +
    + + + + + + + + + + + + + + + + + + + @if($user_abo->user_abo_orders) + @foreach($user_abo->user_abo_orders()->orderBy('id', 'desc')->get() as $user_abo_order) + @if($user_abo_order->shopping_order) + + + + + + + + + + + + + + + + @endif + @endforeach + @endif + +
    #{{__('tables.date')}}{{__('tables.amount')}}{{__('tables.payment')}}{{__('tables.status')}}{{__('tables.shipping')}}{{__('tables.art')}}{{__('tables.invoice')}}{{__('tables.firstname')}}{{__('tables.lastname')}}{{__('tables.email')}}{{__('tables.status')}}{{__('tables.rf_no')}}
    + @if($isAdmin) + @if($user_abo->is_for === 'me') + {!! ''.$user_abo_order->shopping_order_id.'' !!} + @endif + @if($user_abo->is_for === 'ot') + {!! ''.$user_abo_order->shopping_order_id.'' !!} + @endif + @else + @if($user_abo->is_for === 'me') + {!! ''.$user_abo_order->shopping_order_id.'' !!} + @endif + @if($user_abo->is_for === 'ot') + {!! ''.$user_abo_order->shopping_order_id.'' !!} + @endif + @endif + + {!! $user_abo_order->shopping_order->created_at->format("d.m.Y H:i") !!} + + {!! $user_abo_order->shopping_order->getFormattedTotalShipping() !!} € + + {!! $user_abo_order->shopping_order->getLastShoppingPayment('getPaymentType'); !!} + + {!! \App\Services\Payment::getShoppingOrderBadge($user_abo_order->shopping_order) !!} + + {!! ''.$user_abo_order->shopping_order->getShippedType().'' !!} + + {!! ''.$user_abo_order->shopping_order->getPaymentForType().'' !!} + + @if($user_abo_order->shopping_order->isInvoice()) + {!! ' + ' !!} + @endif + + {{ $user_abo_order->shopping_order->shopping_user->shipping_firstname }} + + {{ $user_abo_order->shopping_order->shopping_user->shipping_lastname }} + + {{ $user_abo_order->shopping_order->shopping_user->shipping_email }} + + {!! $user_abo_order->getStatusFormated()!!} + + {{ $user_abo_order->shopping_order->getLastShoppingPayment('reference') }} +
    +
    +
    \ No newline at end of file diff --git a/resources/views/admin/abo/_order_abo.blade.php b/resources/views/admin/abo/_order_abo.blade.php new file mode 100644 index 0000000..175a9c7 --- /dev/null +++ b/resources/views/admin/abo/_order_abo.blade.php @@ -0,0 +1,123 @@ + + + +
    +
    + {{ __('abo.abo_order_hl') }} +
    +

    {{ __('abo.abo_order_info') }}

    +
    + @include('user.abo.vat_info') + + + +
    + @include('admin.abo._order_abo_show') +
    +
    + \ No newline at end of file diff --git a/resources/views/admin/abo/_order_abo_show.blade.php b/resources/views/admin/abo/_order_abo_show.blade.php new file mode 100644 index 0000000..93a1ea6 --- /dev/null +++ b/resources/views/admin/abo/_order_abo_show.blade.php @@ -0,0 +1,93 @@ +@if(isset($error_message) && $error_message) +
    {{ $error_message }}
    +@endif +
    + + + + + + + + + + @if($user_abo->user_abo_items) + @foreach($user_abo->user_abo_items as $abo_item) + @if(!$abo_item->comp) + + + + + + + + @endif + @endforeach + @endif + + + + + + + + + + + + + + + + + + @if(Yard::instance('shopping')->getUserTaxFree()) + + + + + @else + + + + + + + + + @endif + + + + + +
    #{{__('order.article')}}{{__('tables.quantity')}} {{ __('tables.price') }}
    + @if(count($abo_item->product->images)) + + @endif + + {{ $abo_item->product->getLang('name') }} +   {!! get_abo_type_badge_by_product($abo_item->product) !!} +
    +
    {{ __('order.content') }}: {{ $abo_item->product->contents }}
    +
    {{ __('order.art_no') }}: {{ $abo_item->product->number }}
    +
    + +
    +
    +
    + + + + + + + +
    +
    +
    +
    {{ $abo_item->getFormattedTotalPrice() }} €
    +

    {{ __('order.subtotal') }}:{{ Yard::instance('shopping')->subtotal() }} €
    {{ __('Delivery country') }}:{{ Yard::instance('shopping')->getShippingCountryName() }}
    {{ __('order.shipping_costs') }}:{{ Yard::instance('shopping')->shipping() }} €
    {{ __('order.sum_net') }}:{{ Yard::instance('shopping')->subtotalWithShipping() }} €
    {{ __('order.total_without_VAT') }}:{{ Yard::instance('shopping')->subtotalWithShipping() }} €
    {{ __('order.plus_VAT') }}:{{ Yard::instance('shopping')->taxWithShipping() }} €
    {{ __('order.total_sum') }}:{{ Yard::instance('shopping')->totalWithShipping() }} €
    +
    \ No newline at end of file diff --git a/resources/views/admin/abo/detail.blade.php b/resources/views/admin/abo/detail.blade.php new file mode 100644 index 0000000..38a6b01 --- /dev/null +++ b/resources/views/admin/abo/detail.blade.php @@ -0,0 +1,61 @@ +@extends('layouts.layout-2') + +@section('content') + +

    + {{ __('back') }} + {{ __('navigation.abo') }} {{ '#'.$user_abo->payone_userid }} +

    + + +@if(Session::has('alert-error')) +
    +
    +
      +
    • {{ Session::get('alert-error') }}
    • +
    +
    +
    +@endif +
    + @include('admin.abo._detail') +
    +
    + @include('admin.customer._customer_detail', ['shopping_user' => $customer_detail]) +
    + + {!! Form::open(['url' => route('user_abos_update', [$view, $user_abo->id]), 'class' => 'form-horizontal', 'id'=>'cart-order-form']) !!} + +
    + @include('admin.abo._order_abo') +
    + + @if($comp_products && Yard::instance('shopping')->getNumComp() > 0) +
    + @include('user.order.comp_product') +
    + @endif + +{{ Form::close() }} + +
    + @include('admin.abo._executions') +
    + + + {{ __('back') }} + + + +@endsection + +@section('scripts') + + +@endsection \ No newline at end of file diff --git a/resources/views/admin/abo/index.blade.php b/resources/views/admin/abo/index.blade.php new file mode 100644 index 0000000..77906ba --- /dev/null +++ b/resources/views/admin/abo/index.blade.php @@ -0,0 +1,118 @@ +@extends('layouts.layout-2') + +@section('content') + + +

    + {{ __('Abos') }} +

    +
    + {{-- +
    +
    +
    + + + +
    + + + +
    + + +
    + +
    + + + +
    +
    +
    + --}} +
    + + + + + + + + + + + + + + + + + + + + + +
    #{{__('tables.start_date')}}{{__('tables.next_date')}}{{__('tables.abo_delivery_day')}}{{__('tables.status')}}{{__('tables.active')}}{{__('tables.is_for')}}{{__('First name')}}{{__('Last name')}}{{__('E-Mail')}}{{__('tables.exc')}}{{__('tables.amount')}}{{__('tables.payment')}}{{__('tables.adviser')}}{{__('PayOneID')}}
    +
    +
    + +@endsection \ No newline at end of file diff --git a/resources/views/admin/abo/modal_abo_update.blade.php b/resources/views/admin/abo/modal_abo_update.blade.php new file mode 100644 index 0000000..cfcf99b --- /dev/null +++ b/resources/views/admin/abo/modal_abo_update.blade.php @@ -0,0 +1,88 @@ +{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!} + + + + +{!! Form::close() !!} + + + diff --git a/resources/views/admin/category/products.blade.php b/resources/views/admin/category/products.blade.php index d423615..c121f7e 100644 --- a/resources/views/admin/category/products.blade.php +++ b/resources/views/admin/category/products.blade.php @@ -41,7 +41,7 @@ @else   |   @endif -   |  {!! implode($product_category->product->getShowOnTypes(), ' / ') !!} +   |  {!! implode(' / ', $product_category->product->getShowOnTypes()) !!}   |   @else - diff --git a/resources/views/admin/customer/_customer_detail.blade.php b/resources/views/admin/customer/_customer_detail.blade.php index 0c7403d..7c1154a 100644 --- a/resources/views/admin/customer/_customer_detail.blade.php +++ b/resources/views/admin/customer/_customer_detail.blade.php @@ -47,6 +47,10 @@
    {{ __('Phone') }}
    {{ $shopping_user->billing_phone }}
    +
    +
    {{ __('E-Mail') }}
    + @if($shopping_user->faker_mail) "-" @else {{ $shopping_user->billing_email }} @endif +

    diff --git a/resources/views/admin/customer/_detail.blade.php b/resources/views/admin/customer/_detail.blade.php index 2c86068..84eb564 100644 --- a/resources/views/admin/customer/_detail.blade.php +++ b/resources/views/admin/customer/_detail.blade.php @@ -90,8 +90,8 @@
    {{ __('customer.about_shop') }}
    - @if($shopping_user->shopping_order) - @if($shopping_user->shopping_order->user_shop->user->isActive() && $shopping_user->shopping_order->user_shop->user->isActiveShop()) + @if($shopping_user->shopping_order && $shopping_user->shopping_order->user_shop) + @if($shopping_user->shopping_order->user_shop->user && $shopping_user->shopping_order->user_shop->user->isActive() && $shopping_user->shopping_order->user_shop->user->isActiveShop()) {{$shopping_user->shopping_order->user_shop->getSubdomain(false)}} @else {{$shopping_user->shopping_order->user_shop->getSubdomain(false)}} @@ -195,7 +195,6 @@ @endif @endif -
    @endif + +
    +
    + {{ __('tables.previous_orders') }} +
    +
    + + + + + + + + + + + @if($shopping_user->shopping_order) + @forelse($shopping_user->getAllOrdersByMember() as $shopping_order) + + + + + + + + + @empty + + + + @endforelse + @endif + +
    #{{__('tables.date')}}{{__('tables.amount')}}{{__('tables.status')}}{{__('tables.shipping')}}{{__('tables.art')}}
    + + + + {{ $shopping_order->created_at->format('d.m.Y') }} + + {{ $shopping_order->getFormattedTotalShipping() }} € + + {!! \App\Services\Payment::getShoppingOrderBadge($shopping_order) !!} + + {{ $shopping_order->getShippedType() }} + + {!! \App\Services\Payment::getPaymentForBadge($shopping_order) !!}
    {{ __('order.no_orders_found') }}
    +
    +
    +
    \ 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 index a6752e2..8dcc1c0 100644 --- a/resources/views/admin/modal/show_user_customers.blade.php +++ b/resources/views/admin/modal/show_user_customers.blade.php @@ -21,8 +21,6 @@ {{ __('City') }} {{ __('Country') }} {{__('Käufe')}} - {{__('Newsletter')}} - {{__('erstellt')}} {{__('tables.status')}} {{__('ID Kunden')}} WP @@ -43,7 +41,7 @@ url: '{!! route( 'user_customer_datatable') !!}', data: function(d) { // d.filter_member_id = $('select[name=filter_member_id]').val(); - d.isfor = "{{ $data['isfor'] }}"; + d.isfor = "{{ $data['isfor'] }}"; } }, "order": [[0, "desc" ]], @@ -58,8 +56,6 @@ { data: 'billing_city', name: 'billing_city' }, { data: 'billing_country_id', name: 'billing_country_id' }, { 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}, @@ -75,6 +71,5 @@ });
    - - +
    \ No newline at end of file diff --git a/resources/views/admin/payment/credit_detail.blade.php b/resources/views/admin/payment/credit_detail.blade.php index e81b3d1..20f418e 100644 --- a/resources/views/admin/payment/credit_detail.blade.php +++ b/resources/views/admin/payment/credit_detail.blade.php @@ -90,6 +90,78 @@
    @endif + + {{-- Eigene Marge --}} + @if (isset($collection->own_order[$date])) + @php($order = $collection->own_order[$date]) + @if (isset($cbot)) +
    + + + + + + + +
    + {{ __('team.own') }} {{ __('tables.margin') }} + + + {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} + € +   + ({{ __('team.net_turnover') }}: + {{ formatNumber($cbot->business_user->sales_volume_total) }} € / + {{ $cbot->business_user->margin }} %) +
    + {{ __('team.consultant_margin_info') }} +
    +
    + @endif +
    + + + + + + + + + + + + @foreach ($order->user_sales_volumes as $user_sales_volume) + + + + + + + + @endforeach + + + + + + + + + + +
    {{ __('tables.date') }}{{ __('tables.net_sales') }}{{ __('tables.margin') }} %{{ __('tables.margin') }} €{{ __('tables.order') }}
    {{ $user_sales_volume->date }}{{ formatNumber($user_sales_volume->total_net) }} €{{ $cbot->business_user->margin }} %{{ formatNumber($user_sales_volume->caluCommissonTotalNet($cbot->business_user->margin)) }} € + {{ $user_sales_volume->shopping_order_id }} + @if ($user_sales_volume->shopping_order) +
    {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }} + @endif +
    {{ __('tables.total') }}{{ formatNumber($order->credit_total_net) }} € {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} € 
    +
    +
    + @endif + + {{-- Provision Shop --}} @if (isset($collection->commission_shop[$date])) @php($cs = $collection->commission_shop[$date]) @if (isset($cbot)) @@ -159,8 +231,8 @@ - - {{ __('tables.total') }} + + {{ __('tables.total') }} {{ formatNumber($cs->user_sales_volumes_total->month_shop_total_net) }} €   {{ formatNumber($cbot->business_user->commission_shop_sales) }} € @@ -173,78 +245,9 @@ @endif - @if (isset($collection->own_order[$date])) - @php($order = $collection->own_order[$date]) - @if (isset($cbot)) -
    - - - - - - - -
    - {{ __('team.own') }} {{ __('tables.margin') }} - - - {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} - € -   - ({{ __('team.net_turnover') }}: - {{ formatNumber($cbot->business_user->sales_volume_total) }} € / - {{ $cbot->business_user->margin }} %) -
    - {{ __('team.consultant_margin_info') }} -
    -
    - @endif - -
    - - - - - - - - - - - - @foreach ($order->user_sales_volumes as $user_sales_volume) - - - - - - - - @endforeach - - - - - - - - - - -
    {{ __('tables.date') }}{{ __('tables.net_sales') }}{{ __('tables.margin') }} %{{ __('tables.margin') }} €{{ __('tables.order') }}
    {{ $user_sales_volume->date }}{{ formatNumber($user_sales_volume->total_net) }} €{{ $cbot->business_user->margin }} %{{ formatNumber($user_sales_volume->caluCommissonTotalNet($cbot->business_user->margin)) }} € - {{ $user_sales_volume->shopping_order_id }} - @if ($user_sales_volume->shopping_order) -
    {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }} - @endif -
    {{ __('tables.total') }} {{ formatNumber($order->credit_total_net) }} € {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} € 
    -
    -
    - - @endif - + + {{-- Points Registration @if (isset($collection->commission_registration[$date])) @php($cr = $collection->commission_registration[$date])
    @@ -288,8 +291,10 @@
    @endif + --}} + @if (isset($cbot)) - @if (isset($cbot)) + {{-- Payline Points / Provision / Wachstumsbonus
    @@ -317,6 +322,9 @@
    + --}} + + {{-- Payline Points / Provision / Wachstumsbonus
    @@ -364,6 +372,9 @@
    + --}} + + {{-- Table Payline Points / Provision / Wachstumsbonus
    @@ -404,7 +415,32 @@
    -
    +
    + --}} + + + +
    + + + @if($cbot->business_user->version == 2) + + + + + + + + + + @endif + +
    {{ __('team.commission_payline') }}: + {{ formatNumber($cbot->business_user->commission_pp_total) }} € +
    {{ __('team.commission_WB') }}: + {{ formatNumber($cbot->business_user->commission_growth_total) }} € +
    +
    diff --git a/resources/views/admin/payment_method/index.blade.php b/resources/views/admin/payment_method/index.blade.php index cd57a52..291645f 100755 --- a/resources/views/admin/payment_method/index.blade.php +++ b/resources/views/admin/payment_method/index.blade.php @@ -14,7 +14,7 @@ - + @@ -36,7 +36,7 @@ - + diff --git a/resources/views/admin/product/index.blade.php b/resources/views/admin/product/index.blade.php index 7fb27f5..b8e0560 100755 --- a/resources/views/admin/product/index.blade.php +++ b/resources/views/admin/product/index.blade.php @@ -63,7 +63,7 @@ - + diff --git a/resources/views/admin/sales/_detail_collection.blade.php b/resources/views/admin/sales/_detail_collection.blade.php index 8c371aa..bb79760 100644 --- a/resources/views/admin/sales/_detail_collection.blade.php +++ b/resources/views/admin/sales/_detail_collection.blade.php @@ -18,13 +18,13 @@ diff --git a/resources/views/emails/collection_detail.blade.php b/resources/views/emails/collection_detail.blade.php index 34457a2..b244422 100644 --- a/resources/views/emails/collection_detail.blade.php +++ b/resources/views/emails/collection_detail.blade.php @@ -14,7 +14,7 @@ {{ formatNumber($shop_item['user_price_net']) }} €
    {{__('Name')}} {{__('sichtbar') }} {{__('Standard')}}{{__('Abo')}}{{__('abo.abo')}} {{__('tables.status')}}
    {{ $value->pos }} {{ $value->name }} ({{ $value->short }}){!! implode($value->getShowOnTypes(), '
    ') !!}
    {!! implode('
    ', $value->getShowOnTypes()) !!}
    {!! get_active_badge($value->default) !!} {!! get_active_badge($value->is_abo) !!} {!! get_active_badge($value->active) !!}{{ $value->getUnitType() }} {{ $value->getBasePriceFormatted() }} {{ $value->weight }}{!! implode($value->getShowOnTypes(), '
    ') !!}
    {!! implode('
    ', $value->getShowOnTypes()) !!}
    {!! get_active_badge($value->shipping_addon) !!} {!! get_active_badge($value->no_commission) !!} {!! get_active_badge($value->no_free_shipping) !!} - {{$shop_item['points_total']}} + {{ number_format($shop_item['points_total'], 0) }} {{ formatNumber($shop_item['user_price_net']) }} € - {{$shop_item['qty']}} + {{ number_format($shop_item['qty'], 0) }} @@ -72,12 +72,12 @@ {{ __('order.sums') }} - {{ $shopping_order->shopping_collect_order->points }} + {{ number_format($shopping_order->shopping_collect_order->points, 0) }} - {{ $shopping_order->shopping_collect_order->qty_total }} + {{ number_format($shopping_order->shopping_collect_order->qty_total, 0) }} {{ formatNumber($shopping_order->shopping_collect_order->price_total_net) }} € diff --git a/resources/views/admin/sales/_detail_shopping_order.blade.php b/resources/views/admin/sales/_detail_shopping_order.blade.php index 342e3d1..6b2c173 100644 --- a/resources/views/admin/sales/_detail_shopping_order.blade.php +++ b/resources/views/admin/sales/_detail_shopping_order.blade.php @@ -25,12 +25,19 @@ @endif
    - {{ $shopping_order_item->product->getLang('name') }} - #{{ $shopping_order_item->product->number }} + + {{ $shopping_order_item->product->getLang('name') }} + @if($shopping_order->is_abo) +   {!! get_abo_type_badge_by_product($shopping_order_item->product) !!} + @endif + + + {{ __('order.content') }}: {{ $shopping_order_item->product->contents }}
    {{ __('order.weight') }}: {{ $shopping_order_item->product->weight }} g
    - {{ __('order.points') }}: {{ $shopping_order_item->product->points }} + {{ __('order.points') }}: {{ $shopping_order_item->product->points }}
    + {{ __('order.number') }}: {{ $shopping_order_item->product->number }}
    @endif diff --git a/resources/views/admin/sales/customers.blade.php b/resources/views/admin/sales/customers.blade.php index 9aa9652..fe2e93f 100644 --- a/resources/views/admin/sales/customers.blade.php +++ b/resources/views/admin/sales/customers.blade.php @@ -43,7 +43,6 @@ -
    diff --git a/resources/views/admin/settings/index.blade.php b/resources/views/admin/settings/index.blade.php index 0cce25e..79ad556 100755 --- a/resources/views/admin/settings/index.blade.php +++ b/resources/views/admin/settings/index.blade.php @@ -21,7 +21,7 @@ {{ Form::hidden('settings[is_comp_me_abo][type]', 'bool') }} diff --git a/resources/views/emails/checkout.blade.php b/resources/views/emails/checkout.blade.php index 4940cc9..804bdb3 100644 --- a/resources/views/emails/checkout.blade.php +++ b/resources/views/emails/checkout.blade.php @@ -145,10 +145,12 @@ {!! nl2br($copy1line) !!} - @@ -189,306 +191,317 @@ - - - + @if($shopping_order->shopping_user->is_from !== 'extern') - - @if($send_link) - - - - - - - @endif - - - - - - - @@ -236,18 +245,42 @@ @endif - + @if($shopping_order->is_abo) - + + + + @endif + - - - - - -


    + @if($shopping_order->is_abo) + {{ __('abo.abo') }} / + @endif @if($shopping_order->shopping_user->is_from === 'user_order') @if($shopping_order->shopping_user->is_for === 'me') {{__('email.checkout_mail_order_for_me')}} @@ -173,7 +175,7 @@ {{__('email.checkout_mail_order_for_extern')}} @endif @if($shopping_order->shopping_user->is_from === 'collection') - Berater Sammelrechnung
    + Berater Sammelrechnung @endif
    -
    -
    -
    - - - - - - -
    - - - - - - - - - -
    -

    - {{ $button }} -

    -
    - {{ $url }} -
    -
    -
    -
    -
    -
    - {{__('email.checkout_mail_pay_info')}} -
    - + @if($send_link) + + - - - - + + + + @endif + @if($shopping_order->is_abo) - - - - - - - - - - - - @else - @if($shopping_order->wp_invoice_path) - - - - @endif - @if($shopping_order->api_notice['wp_advertising']) + @endif + + + + + + + + + + + + + + + + + + + + + + + + @else + @if($shopping_order->wp_invoice_path) + + + + @endif + @if($shopping_order->api_notice['wp_advertising']) - @endif + @endif + @if($shopping_order->api_notice['wp_incentives']) - - - - - - - - - - - - + + + + + + + + + + @endif -
    +
    + + - +
    - {{__('email.checkout_mail_pay_success')}}
    - @if($shopping_payment) - {{__('email.checkout_mail_pay_with')}} {{$shopping_payment->getPaymentType()}}
    - {{__('email.checkout_mail_pay_ref')}} {{$shopping_payment->reference}}
    - @endif - {{__('email.checkout_mail_your_mail')}} {{ $shopping_order->shopping_user->billing_email }}
    +
    + + + + + + + + + +
    +

    + {{ $button }} +

    +
    + {{ $url }} +
    -
    -
    -
    - {{__('email.checkout_mail_invoice_addess')}} -
    - - - - - -
    - @if($shopping_order->shopping_user->billing_company) - {{ $shopping_order->shopping_user->billing_company }}
    - @endif - {{ $shopping_order->shopping_user->billing_firstname }} - {{ $shopping_order->shopping_user->billing_lastname }}
    - {{ $shopping_order->shopping_user->billing_address }}
    - @if($shopping_order->shopping_user->billing_address_2) - {{ $shopping_order->shopping_user->billing_address_2 }}
    - @endif - {{ $shopping_order->shopping_user->billing_zipcode }} - {{ $shopping_order->shopping_user->billing_city }}
    - {{ $shopping_order->shopping_user->billing_country->getLocated() }}
    - @if($shopping_order->shopping_user->billing_phone) -
    {{ $shopping_order->shopping_user->billing_phone }}
    - @endif -
    -
    - @if($shopping_order->shopping_user->is_from === 'user_order') - @if($shopping_order->shopping_user->is_for === 'me') - {{__('email.checkout_mail_deliver_addess')}} - @else - {{__('email.checkout_mail_deliver_customer')}} - @endif - @else - {{__('email.checkout_mail_deliver_addess')}} - @endif +

    + {{ __('abo.checkout_mail_abo_hl') }}
    - + @php($user_abo = $shopping_order->getUserAbo()) + @if($user_abo) +
    -
    - @if($shopping_order->shopping_user->same_as_billing) - {{__('email.checkout_mail_same_address')}} - @else - @if($shopping_order->shopping_user->shipping_company) - {{ $shopping_order->shopping_user->shipping_company }}
    - @endif - {{ $shopping_order->shopping_user->shipping_firstname }} - {{ $shopping_order->shopping_user->shipping_lastname }}
    - {{ $shopping_order->shopping_user->shipping_address }}
    - @if($shopping_order->shopping_user->shipping_address_2) - {{ $shopping_order->shopping_user->shipping_address_2 }}
    - @endif - {{ $shopping_order->shopping_user->shipping_zipcode }} - {{ $shopping_order->shopping_user->shipping_city }}
    - {{ $shopping_order->shopping_user->shipping_country->getLocated() }}
    - @if($shopping_order->shopping_user->shipping_phone) -
    {{ $shopping_order->shopping_user->shipping_phone }}
    - @endif + @if($shopping_order->abo_interval) + {{__('abo.checkout_mail_abo_start')}}
    + {{__('tables.start_date')}}: {{ $user_abo->start_date }}
    @endif + {{__('tables.next_date')}}: {{ $user_abo->next_date }}
    + {{__('tables.abo_delivery_day')}}: {{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}
    + {{ __('abo.checkout_mail_abo_info') }}
    + @endif
    -
    -
    - - - - - - - -
    - {{ $copy3line }} -
    - @if($shopping_order->member) - @if($shopping_order->member->shop && $shopping_order->member->isActiveShop()) - @if($shopping_order->member->shop->title) - {{ $shopping_order->member->shop->title }}
    - @endif - @if($shopping_order->member->shop->contact) - {!! nl2br($shopping_order->member->shop->contact) !!}
    - @endif - {{ $shopping_order->member->shop->getSubdomain(true) }} - @else - Dein Berater: {{$shopping_order->member->getFullName()}} - @endif - @endif -

    - {{ $greetings }}
    {{ $sender }} -
    -

    -
    - Rechnung: {{$shopping_order->wp_invoice_path}}
    -
    -
    +

    + {{__('email.checkout_mail_pay_info')}} +
    + - + +
    - Werbemittel: {!! $shopping_order->api_notice['wp_advertising'] !!}
    -
    +
    + {{__('email.checkout_mail_pay_success')}}
    + @if($shopping_payment) + {{__('email.checkout_mail_pay_with')}} {{$shopping_payment->getPaymentType()}}
    + {{__('email.checkout_mail_pay_ref')}} {{$shopping_payment->reference}}
    + @endif + {{__('email.checkout_mail_your_mail')}} {{ $shopping_order->shopping_user->billing_email }}
    +
    +

    + {{__('email.checkout_mail_invoice_addess')}} +
    + - @endif - @if($shopping_order->api_notice['wp_incentives']) + + +
    + @if($shopping_order->shopping_user->billing_company) + {{ $shopping_order->shopping_user->billing_company }}
    + @endif + {{ $shopping_order->shopping_user->billing_firstname }} + {{ $shopping_order->shopping_user->billing_lastname }}
    + {{ $shopping_order->shopping_user->billing_address }}
    + @if($shopping_order->shopping_user->billing_address_2) + {{ $shopping_order->shopping_user->billing_address_2 }}
    + @endif + {{ $shopping_order->shopping_user->billing_zipcode }} + {{ $shopping_order->shopping_user->billing_city }}
    + {{ $shopping_order->shopping_user->billing_country->getLocated() }}
    + @if($shopping_order->shopping_user->billing_phone) +
    {{ $shopping_order->shopping_user->billing_phone }}
    + @endif +
    +
    + @if($shopping_order->shopping_user->is_from === 'user_order') + @if($shopping_order->shopping_user->is_for === 'me') + {{__('email.checkout_mail_deliver_addess')}} + @else + {{__('email.checkout_mail_deliver_customer')}} + @endif + @else + {{__('email.checkout_mail_deliver_addess')}} + @endif +
    + + + + + +
    + @if($shopping_order->shopping_user->same_as_billing) + {{__('email.checkout_mail_same_address')}} + @else + @if($shopping_order->shopping_user->shipping_company) + {{ $shopping_order->shopping_user->shipping_company }}
    + @endif + {{ $shopping_order->shopping_user->shipping_firstname }} + {{ $shopping_order->shopping_user->shipping_lastname }}
    + {{ $shopping_order->shopping_user->shipping_address }}
    + @if($shopping_order->shopping_user->shipping_address_2) + {{ $shopping_order->shopping_user->shipping_address_2 }}
    + @endif + {{ $shopping_order->shopping_user->shipping_zipcode }} + {{ $shopping_order->shopping_user->shipping_city }}
    + {{ $shopping_order->shopping_user->shipping_country->getLocated() }}
    + @if($shopping_order->shopping_user->shipping_phone) +
    {{ $shopping_order->shopping_user->shipping_phone }}
    + @endif + @endif +
    +
    +
    +
    + + + + + + + +
    + {{ $copy3line }} +
    + @if($shopping_order->member) + @if($shopping_order->member->shop && $shopping_order->member->isActiveShop()) + @if($shopping_order->member->shop->title) + {{ $shopping_order->member->shop->title }}
    + @endif + @if($shopping_order->member->shop->contact) + {!! nl2br($shopping_order->member->shop->contact) !!}
    + @endif + {{ $shopping_order->member->shop->getSubdomain(true) }} + @else + Dein Berater: {{$shopping_order->member->getFullName()}} + @endif + @endif +

    + {{ $greetings }}
    {{ $sender }} +
    +

    +
    + Rechnung: {{$shopping_order->wp_invoice_path}}
    +
    +
    - Incentives: {!! $shopping_order->api_notice['wp_incentives'] !!}
    -
    + Werbemittel: {!! $shopping_order->api_notice['wp_advertising'] !!}
    +
    - {{__('email.checkout_mail_deliver_customer')}} + Incentives: {!! $shopping_order->api_notice['wp_incentives'] !!}
    +
    - - - - -
    - @if($shopping_order->shopping_user->same_as_billing) - @if($shopping_order->shopping_user->billing_company) - {{ $shopping_order->shopping_user->billing_company }}
    - @endif - - {{ $shopping_order->shopping_user->billing_firstname }} - {{ $shopping_order->shopping_user->billing_lastname }}
    -
    - - {{ $shopping_order->shopping_user->billing_address }}
    - @if($shopping_order->shopping_user->billing_address_2) - {{ $shopping_order->shopping_user->billing_address_2 }}
    - @endif - - {{ $shopping_order->shopping_user->billing_zipcode }} - {{ $shopping_order->shopping_user->billing_city }}
    - {{ $shopping_order->shopping_user->billing_country->getLocated() }}
    - - @if($shopping_order->shopping_user->billing_phone) -

    {{ $shopping_order->shopping_user->billing_phone }}
    - @endif - @else - @if($shopping_order->shopping_user->shipping_company) - {{ $shopping_order->shopping_user->shipping_company }}
    - @endif - - {{ $shopping_order->shopping_user->shipping_firstname }} - {{ $shopping_order->shopping_user->shipping_lastname }}
    -
    - - {{ $shopping_order->shopping_user->shipping_address }}
    - @if($shopping_order->shopping_user->shipping_address_2) - {{ $shopping_order->shopping_user->shipping_address_2 }}
    - @endif - - {{ $shopping_order->shopping_user->shipping_zipcode }} - {{ $shopping_order->shopping_user->shipping_city }}
    - - {{ $shopping_order->shopping_user->shipping_country->getLocated() }}
    - - @if($shopping_order->shopping_user->shipping_phone) -

    {{ $shopping_order->shopping_user->shipping_phone }}
    - @endif - @endif -
    -
    -
    -
    - {{__('email.checkout_copy3line_extern')}} -
    - - - + + + + - + {{ $shopping_order->shopping_user->billing_firstname }} + {{ $shopping_order->shopping_user->billing_lastname }}
    +
    + {{ $shopping_order->shopping_user->billing_address }}
    + @if($shopping_order->shopping_user->billing_address_2) + {{ $shopping_order->shopping_user->billing_address_2 }}
    + @endif + + {{ $shopping_order->shopping_user->billing_zipcode }} + {{ $shopping_order->shopping_user->billing_city }}
    + {{ $shopping_order->shopping_user->billing_country->getLocated() }}
    + + @if($shopping_order->shopping_user->billing_phone) +

    {{ $shopping_order->shopping_user->billing_phone }}
    + @endif + @else + @if($shopping_order->shopping_user->shipping_company) + {{ $shopping_order->shopping_user->shipping_company }}
    + @endif + + {{ $shopping_order->shopping_user->shipping_firstname }} + {{ $shopping_order->shopping_user->shipping_lastname }}
    +
    + + {{ $shopping_order->shopping_user->shipping_address }}
    + @if($shopping_order->shopping_user->shipping_address_2) + {{ $shopping_order->shopping_user->shipping_address_2 }}
    + @endif + + {{ $shopping_order->shopping_user->shipping_zipcode }} + {{ $shopping_order->shopping_user->shipping_city }}
    + + {{ $shopping_order->shopping_user->shipping_country->getLocated() }}
    + + @if($shopping_order->shopping_user->shipping_phone) +

    {{ $shopping_order->shopping_user->shipping_phone }}
    + @endif + @endif + + +
    - - @if($shopping_order->member) - Berater: {{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->member->account->m_salutation) }} {{ $shopping_order->member->account->m_first_name }} {{ $shopping_order->member->account->m_last_name }} -
    - Berater-ID: {{ $shopping_order->member->account->m_account }}
    - @if($shopping_order->member->user_level) - Karriere-Level: {{ $shopping_order->member->user_level->getLang('name') }}
    - @endif + @endif +
    + {{__('email.checkout_mail_deliver_customer')}} +
    + + + - - - - -
    + @if($shopping_order->shopping_user->same_as_billing) + @if($shopping_order->shopping_user->billing_company) + {{ $shopping_order->shopping_user->billing_company }}
    @endif -

    -
    +
    +
    +
    + {{__('email.checkout_copy3line_extern')}} +
    + + + + + + + +
    + + @if($shopping_order->member) + Berater: {{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->member->account->m_salutation) }} {{ $shopping_order->member->account->m_first_name }} {{ $shopping_order->member->account->m_last_name }} +
    + Berater-ID: {{ $shopping_order->member->account->m_account }}
    + @if($shopping_order->member->user_level) + Karriere-Level: {{ $shopping_order->member->user_level->getLang('name') }}
    + @endif + @endif + +

    +
    -
    {{__('email.checkout_mail_status_info')}} @@ -182,21 +181,31 @@ {{__('email.checkout_mail_pay_invoice_open')}}
    @else {{__('email.checkout_mail_system_status')}} {{$txaction}}
    - @endif {{__('email.checkout_mail_pay_with')}} {{$shopping_payment->getPaymentType()}}
    {{__('email.checkout_mail_pay_ref')}} {{$shopping_payment->reference}}
    {{__('email.checkout_mail_your_mail')}} {{ $shopping_order->shopping_user->billing_email }}
    + + @if($txaction === 'error' && isset($payment_error)) +
    + + @if(isset($payment_error['errorcode'])) {{ $payment_error['errorcode'] }} | @endif + @if(isset($payment_error['errormessage'])) {{ $payment_error['errormessage'] }} @endif +
    + @if(isset($payment_error['customermessage'])) {{ $payment_error['customermessage'] }} @endif +
    + @endif


    + @if($shopping_order->is_abo) + {{ __('abo.abo') }} / + @endif @if($shopping_order->shopping_user->is_from === 'user_order') @if($shopping_order->shopping_user->is_for === 'me') {{__('email.checkout_mail_order_for_me')}} @@ -221,7 +230,7 @@ {{__('email.checkout_mail_order_for_extern')}} @endif @if($shopping_order->shopping_user->is_from === 'collection') - Berater Sammelrechnung
    + Berater Sammelrechnung @endif
    -
    +
    +

    + {{ __('abo.checkout_mail_abo_hl') }}
    + @php($user_abo = $shopping_order->getUserAbo()) + @if($user_abo) + + + + +
    + @if($shopping_order->abo_interval) + {{__('abo.checkout_mail_abo_start')}}
    + {{__('tables.start_date')}}: {{ $user_abo->start_date }}
    + @endif + {{__('tables.next_date')}}: {{ $user_abo->next_date }}
    + {{__('tables.abo_delivery_day')}}: {{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}
    + {{ __('abo.checkout_mail_abo_info') }} +
    + @endif +
    +

    {{__('email.checkout_mail_invoice_addess')}}
    +
    @@ -271,14 +304,9 @@
    -
    -
    +

    @if($shopping_order->shopping_user->is_from === 'user_order') @if($shopping_order->shopping_user->is_for === 'me') {{__('email.checkout_mail_deliver_addess')}} @@ -316,7 +344,6 @@ @endif
    - {{$shop_item['qty']}} + {{ number_format($shop_item['qty'], 0) }} {{ formatNumber($shop_item['user_price_total_net']) }} € diff --git a/resources/views/emails/custom_payment_detail.blade.php b/resources/views/emails/custom_payment_detail.blade.php index a571d74..11fc26d 100644 --- a/resources/views/emails/custom_payment_detail.blade.php +++ b/resources/views/emails/custom_payment_detail.blade.php @@ -16,7 +16,7 @@ @foreach($yard_shopping_items['items'] as $items)
    - {{ $items->name }} + {{ $items->name }} @if($items->abo_type) {{ __('abo.abo') }} {{ __('abo.'.$items->abo_type) }} @endif @if($yard_shopping_items['tax_free']) diff --git a/resources/views/layouts/includes/layout-sidenav.blade.php b/resources/views/layouts/includes/layout-sidenav.blade.php index 8a3128c..7475396 100755 --- a/resources/views/layouts/includes/layout-sidenav.blade.php +++ b/resources/views/layouts/includes/layout-sidenav.blade.php @@ -13,7 +13,7 @@ @if(Auth::user()->showSideNav()) -
  • +
  • {{ __('navigation.my_account') }}
    @@ -22,6 +22,15 @@
  • {{ __('navigation.credit') }}
  • + @if(Auth::user()->isVIP()) +
  • +
    {{ __('navigation.myabo') }}
    +
    +
    VIP
    +
    +
    +
  • + @endif
  • {{ __('navigation.my_data') }}
  • @@ -35,7 +44,7 @@ @if(Auth::user()->isActiveShop()) -
  • +
  • {{ __('navigation.my_shop') }}
    @@ -84,7 +93,7 @@
  • @endif @if(Auth::user()->isActiveAccount()) -
  • +
  • {{ __('navigation.my_clients') }}
    @@ -96,6 +105,21 @@
  • {{ __('navigation.add') }}
  • +
  • +
    {{ __('navigation.orders') }}
    +
  • + + @if(Auth::user()->isVIP()) +
  • +
    {{ __('navigation.customerabos') }}
    +
    +
    VIP
    +
    +
    +
  • + @endif + + @endif @@ -112,8 +136,10 @@
  • {{ __('navigation.do_order') }}
  • +
  • +
    {{ __('navigation.payment_links') }}
    +
  • - @endif @if(Auth::user()->isActiveAccount())
  • @@ -129,7 +155,6 @@
  • @endif @if(Auth::user()->isActiveAccount()) -
  • {{ __('navigation.downloadcenter') }}
  • @@ -148,7 +173,7 @@
  • {{ __('navigation.clients') }}
  • -
  • +
  • {{ __('navigation.orders') }}
    @@ -160,6 +185,9 @@
  • {{ __('navigation.clients') }}
  • +
  • +
    {{ __('navigation.abos') }}
    +
  • @@ -169,7 +197,6 @@
    {{ __('navigation.payments') }}
      -
    • {{ __('navigation.invoice') }}
    • @@ -264,11 +291,9 @@
      • -
        {{ __('navigation.languages') }}
        -
      • -
      • -
        {{ __('navigation.translation') }}
        +
        {{ __('navigation.translation') }}
      • +
      • {{ __('navigation.products') }}
      • diff --git a/resources/views/pdf/credit_details.blade.php b/resources/views/pdf/credit_details.blade.php index 721c4b7..e4d9f00 100644 --- a/resources/views/pdf/credit_details.blade.php +++ b/resources/views/pdf/credit_details.blade.php @@ -299,7 +299,8 @@ border-bottom: 1px solid #d6d6de; } .card hr { - border-color: #d7d700; + border:#d7d700 0.2pt solid; + background-color: transparent; margin: 6mm 0; } @@ -323,6 +324,11 @@ color: #484e3e; } + .badge-info { + background-color: #28c3d7; + color: #fff; + } + .badge-secondary { background-color: #d7d700; color: #565600; @@ -452,6 +458,79 @@
        @endif + + {{-- Eigene Marge --}} + @if (isset($collection->own_order[$date])) + @php($order = $collection->own_order[$date]) + @if (isset($cbot)) +
        + + + + + + + +
        + {{ __('team.own') }} {{ __('tables.margin') }} + + + {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} + € +   + ({{ __('team.net_turnover') }}: + {{ formatNumber($cbot->business_user->sales_volume_total) }} € / + {{ $cbot->business_user->margin }} %) +
        + {{ __('team.consultant_margin_info') }} +
        +
        + @endif +
        + + + + + + + + + + + + @foreach ($order->user_sales_volumes as $user_sales_volume) + + + + + + + + @endforeach + + + + + + + + + + + +
        {{ __('tables.date') }}{{ __('tables.net_sales') }}{{ __('tables.margin') }} %{{ __('tables.margin') }} €{{ __('tables.order') }}
        {{ $user_sales_volume->date }}{{ formatNumber($user_sales_volume->total_net) }} €{{ $cbot->business_user->margin }} %{{ formatNumber($user_sales_volume->caluCommissonTotalNet($cbot->business_user->margin)) }} € + {{ $user_sales_volume->shopping_order_id }} + @if ($user_sales_volume->shopping_order) +
        {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }} + @endif +
        {{ __('tables.total') }}{{ formatNumber($order->credit_total_net) }} € {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} € 
        +
        +
        + @endif + + {{-- Provision Shop --}} @if (isset($collection->commission_shop[$date])) @php($cs = $collection->commission_shop[$date]) @if (isset($cbot)) @@ -476,8 +555,6 @@
    @endif - -
    @@ -520,8 +597,8 @@ - - + + @@ -530,83 +607,9 @@
    {{ __('tables.total') }}
    {{ __('tables.total') }} {{ formatNumber($cs->user_sales_volumes_total->month_shop_total_net) }} €   {{ formatNumber($cbot->business_user->commission_shop_sales) }} €
    -
    - @endif - @if (isset($collection->own_order[$date])) - @php($order = $collection->own_order[$date]) - @if (isset($cbot)) -
    - - - - - - - -
    - {{ __('team.own') }} {{ __('tables.margin') }} - - - {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} - € -   - ({{ __('team.net_turnover') }}: - {{ formatNumber($cbot->business_user->sales_volume_total) }} € / - {{ $cbot->business_user->margin }} %) -
    - {{ __('team.consultant_margin_info') }} -
    -
    - @endif - -
    - - - - - - - - - - - - @foreach ($order->user_sales_volumes as $user_sales_volume) - - - - - - - - @endforeach - - - - - - - - - - - -
    {{ __('tables.date') }}{{ __('tables.net_sales') }}{{ __('tables.margin') }} %{{ __('tables.margin') }} €{{ __('tables.order') }}
    {{ $user_sales_volume->date }}{{ formatNumber($user_sales_volume->total_net) }} €{{ $cbot->business_user->margin }} %{{ formatNumber($user_sales_volume->caluCommissonTotalNet($cbot->business_user->margin)) }} € - {{ $user_sales_volume->shopping_order_id }} - @if ($user_sales_volume->shopping_order) -
    {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }} - @endif -
    {{ __('tables.total') }} {{ formatNumber($order->credit_total_net) }} € {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} € 
    -
    -
    - - @endif - - + {{-- Points Registration @if (isset($collection->commission_registration[$date])) @php($cr = $collection->commission_registration[$date])
    @@ -648,10 +651,12 @@

    - @endif + --}} + @if (isset($cbot)) + {{-- Payline Points / Provision / Wachstumsbonus
    @@ -680,6 +685,10 @@

    + --}} + + {{-- Payline Points / Provision / Wachstumsbonus +
    @@ -726,6 +735,9 @@
    + --}} + + {{-- Table Payline Points / Provision / Wachstumsbonus
    @@ -767,7 +779,28 @@

    - + --}} +
    +
    + + + @if($cbot->business_user->version == 2) + + + + + + + + + @endif + +
    {{ __('team.commission_payline') }}: + {{ formatNumber($cbot->business_user->commission_pp_total) }} € +
    {{ __('team.commission_WB') }}: + {{ formatNumber($cbot->business_user->commission_growth_total) }} € +
    +
    @@ -785,6 +818,7 @@
    +
    @endif @endforeach
    diff --git a/resources/views/pdf/credit_details_long.blade.php b/resources/views/pdf/credit_details_long.blade.php index b716aaa..fcf7498 100644 --- a/resources/views/pdf/credit_details_long.blade.php +++ b/resources/views/pdf/credit_details_long.blade.php @@ -328,6 +328,11 @@ color: #565600; } + .badge-info { + background-color: #28c3d7; + color: #fff; + } + .badge-outline-success { background-color: #fff; border-color: #64bc40; @@ -452,6 +457,84 @@
    @endif + {{-- Eigene Marge --}} + @if (isset($collection->own_order[$date])) +
    + @php($order = $collection->own_order[$date]) + @if (isset($cbot)) +
    + + + + + + + +
    + {{ __('team.own') }} {{ __('tables.margin') }} + + + {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} + € +   + ({{ __('team.net_turnover') }}: + {{ formatNumber($cbot->business_user->sales_volume_total) }} € / + {{ $cbot->business_user->margin }} %) +
    + {{ __('team.consultant_margin_info') }} +
    +
    + @endif +
    + + + + + + + + + + + + + + + @foreach ($order->user_sales_volumes as $user_sales_volume) + + + + + + + + + + + @endforeach + + + + + + + + + +
    #{{ __('Datum') }}{{ __('Typ') }}{{ __('Umsatz netto') }}{{ __('tables.points') }}{{ __('für') }}{{ __('VE') }}{{ __('Bestellung') }}
    {{ $user_sales_volume->id }}{{ $user_sales_volume->date }}{{ $user_sales_volume->getStatusType() }}{{ formatNumber($user_sales_volume->total_net) }} €{{ $user_sales_volume->points }}{{ $user_sales_volume->getStatusPointsType() }}{{ $user_sales_volume->getStatusTurnoverType() }} + {{ $user_sales_volume->shopping_order_id }} + @if ($user_sales_volume->shopping_order) +
    {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }} + @endif +
    {{ __('tables.total') }} {{ formatNumber($order->credit_total_net) }} €{{ $order->credit_total_points }}
    +
    +
    +
    + @endif + + {{-- Provision Shop --}} @if (isset($collection->commission_shop[$date]))
    @php($cs = $collection->commission_shop[$date]) @@ -544,84 +627,9 @@
    @endif - @if (isset($collection->own_order[$date])) -
    - @php($order = $collection->own_order[$date]) - @if (isset($cbot)) -
    - - - - - - - -
    - {{ __('team.own') }} {{ __('tables.margin') }} - - - {{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }} - € -   - ({{ __('team.net_turnover') }}: - {{ formatNumber($cbot->business_user->sales_volume_total) }} € / - {{ $cbot->business_user->margin }} %) -
    - {{ __('team.consultant_margin_info') }} -
    -
    - @endif - -
    - - - - - - - - - - - - - - - @foreach ($order->user_sales_volumes as $user_sales_volume) - - - - - - - - - - - @endforeach - - - - - - - - - -
    #{{ __('Datum') }}{{ __('Typ') }}{{ __('Umsatz netto') }}{{ __('tables.points') }}{{ __('für') }}{{ __('VE') }}{{ __('Bestellung') }}
    {{ $user_sales_volume->id }}{{ $user_sales_volume->date }}{{ $user_sales_volume->getStatusType() }}{{ formatNumber($user_sales_volume->total_net) }} €{{ $user_sales_volume->points }}{{ $user_sales_volume->getStatusPointsType() }}{{ $user_sales_volume->getStatusTurnoverType() }} - {{ $user_sales_volume->shopping_order_id }} - @if ($user_sales_volume->shopping_order) -
    {{ $user_sales_volume->shopping_order->getShoppingUserFullName() }} - @endif -
    {{ __('tables.total') }} {{ formatNumber($order->credit_total_net) }} €{{ $order->credit_total_points }}
    -
    -
    -
    - @endif + {{-- Points Registration @if (isset($collection->commission_registration[$date]))
    @php($cr = $collection->commission_registration[$date]) @@ -674,9 +682,11 @@
    @endif - + --}} @if (isset($cbot)) + + {{-- Gesamt
    @@ -706,6 +716,9 @@
    + ––}} + + {{-- Payline Points / Provision / Wachstumsbonus
    @@ -793,7 +806,9 @@
    -
    +
    + + --}}
    diff --git a/resources/views/pdf/delivery-detail.blade.php b/resources/views/pdf/delivery-detail.blade.php index 1fc3c96..a194a15 100644 --- a/resources/views/pdf/delivery-detail.blade.php +++ b/resources/views/pdf/delivery-detail.blade.php @@ -19,7 +19,7 @@ {{ maxStrLength($shopping_order_item->product->getLang('name'), 35) }} @endforeach diff --git a/resources/views/pdf/delivery-homeparty-detail.blade.php b/resources/views/pdf/delivery-homeparty-detail.blade.php index 14d2907..648b4c0 100644 --- a/resources/views/pdf/delivery-homeparty-detail.blade.php +++ b/resources/views/pdf/delivery-homeparty-detail.blade.php @@ -9,7 +9,7 @@ {{ maxStrLength($value->product->getLang('name'), 35) }} @endforeach diff --git a/resources/views/pdf/invoice-collection.blade.php b/resources/views/pdf/invoice-collection.blade.php index 13ae702..663e13b 100644 --- a/resources/views/pdf/invoice-collection.blade.php +++ b/resources/views/pdf/invoice-collection.blade.php @@ -28,13 +28,13 @@ {{ maxStrLength($shop_item['name'], 30) }}
    - {{ $shopping_order_item->qty }} + {{ cleanIntegerFromString($shopping_order_item->qty) }}
    - {{ $value->qty }} + {{ cleanIntegerFromString($value->qty) }}
    - {{$shop_item['points_total']}} + {{ number_format($shop_item['points_total'], 0) }} {{ formatNumber($shop_item['user_price_net']) }} € - {{$shop_item['qty']}} + {{ number_format($shop_item['qty'], 0) }} {{ formatNumber($shop_item['user_price_total_net']) }} € @@ -80,7 +80,7 @@ - {{ $shopping_order->shopping_collect_order->qty_total }} + {{ cleanIntegerFromString($shopping_order->shopping_collect_order->qty_total) }} diff --git a/resources/views/pdf/invoice-detail.blade.php b/resources/views/pdf/invoice-detail.blade.php index e6d61b8..8bd873e 100644 --- a/resources/views/pdf/invoice-detail.blade.php +++ b/resources/views/pdf/invoice-detail.blade.php @@ -39,7 +39,7 @@ {{ $shopping_order_item->getFormattedPrice() }} € - {{ $shopping_order_item->qty }} + {{ cleanIntegerFromString($shopping_order_item->qty) }} {{ $shopping_order_item->getFormattedTaxRate() }}% @@ -52,7 +52,7 @@ {{ $shopping_order_item->getFormattedPriceVkNet() }} € - {{ $shopping_order_item->qty }} + {{ cleanIntegerFromString($shopping_order_item->qty) }} {{ $shopping_order_item->points }} diff --git a/resources/views/pdf/invoice-homeparty-detail.blade.php b/resources/views/pdf/invoice-homeparty-detail.blade.php index 2b37d0a..649213b 100644 --- a/resources/views/pdf/invoice-homeparty-detail.blade.php +++ b/resources/views/pdf/invoice-homeparty-detail.blade.php @@ -9,7 +9,7 @@ {{ maxStrLength($value->product->getLang('name') , 35) }} - {{ $value->qty }} + {{ cleanIntegerFromString($value->qty) }} {{ $value->getFormattedTotalPoints() }} diff --git a/resources/views/pdf/invoice-journal-collection.blade.php b/resources/views/pdf/invoice-journal-collection.blade.php index 37f25e2..d12741c 100644 --- a/resources/views/pdf/invoice-journal-collection.blade.php +++ b/resources/views/pdf/invoice-journal-collection.blade.php @@ -106,7 +106,7 @@ {{ $shopping_order_item->getFormattedPrice() }} € - {{ $shopping_order_item->qty }} + {{ cleanIntegerFromString($shopping_order_item->qty) }} {{ $shopping_order_item->getFormattedTotalPrice() }} € diff --git a/resources/views/user/abo/_bak_index.blade.php b/resources/views/user/abo/_bak_index.blade.php new file mode 100644 index 0000000..ebf2916 --- /dev/null +++ b/resources/views/user/abo/_bak_index.blade.php @@ -0,0 +1,130 @@ +@extends('layouts.layout-2') + +@section('content') +

    +
    + @if($view === 'ot') {{ __('navigation.customerabos') }} @endif + @if($view === 'me') {{ __('navigation.myabos') }} @endif + / {{ __('navigation.overview') }} +
    +

    + +
    +
    + + @if($user_abos->isEmpty()) +
    +
    +
    +
    +
    {{ __('abo.abo_delivery') }}
    + +
    +
    + + +
    +
    +
    + + @endif + @foreach($user_abos as $user_abo) +
    + +
    +
    +
    +
    +
    {{ __('tables.start_date') }}
    +
    {{ $user_abo->start_date }}
    +
    +
    +
    {{ __('tables.next_date') }}
    +
    {{ $user_abo->next_date }}
    +
    +
    +
    {{ __('tables.abo_delivery_day') }}
    +
    {{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}
    +
    +
    +
    {{ __('tables.last_date') }}
    +
    {{ $user_abo->last_date }} / {{ $user_abo->getCountOrders() }}
    +
    +
    +
    +
    +
    +
    +
    +
    {{ __('tables.status') }}
    + {!! $user_abo->getStatusFormated() !!} +
    +
    +
    {{ __('tables.active') }}
    + {!! get_active_badge($user_abo->active) !!} +
    +
    +
    {{ __('tables.amount') }}
    + {{ $user_abo->getFormattedAmount() }} € +
    +
    +
    {{ __('tables.payment') }}
    + {{ $user_abo->getPaymentType() }} +
    +
    +
    + @if($view === 'ot') +
    +
    +
    +
    +
    {{ __('First name') }}
    + @if($user_abo->shopping_user) + {{ $user_abo->shopping_user->billing_firstname }} + @endif +
    +
    +
    {{ __('Last name') }}
    + @if($user_abo->shopping_user) + {{ $user_abo->shopping_user->billing_lastname }} + @endif +
    +
    +
    {{ __('E-Mail') }}
    + @if($user_abo->shopping_user) + {{ $user_abo->shopping_user->billing_email }} + @endif +
    +
    +
    {{ __('tables.customer') }}
    + @if($user_abo->shopping_user) + + @endif + +
    +
    +
    + @endif +
    + @endforeach +
    +
    +@endsection \ No newline at end of file diff --git a/resources/views/user/abo/detail.blade.php b/resources/views/user/abo/detail.blade.php new file mode 100644 index 0000000..3276120 --- /dev/null +++ b/resources/views/user/abo/detail.blade.php @@ -0,0 +1,65 @@ +@extends('layouts.layout-2') + +@section('content') + +

    + {{ __('back') }} + +
    + @if($view === 'ot') {{ __('navigation.customerabo') }} @endif + @if($view === 'me') {{ __('navigation.myabo') }} @endif + {{ '#'.$user_abo->payone_userid }} +
    +

    + + +@if(Session::has('alert-error')) +
    +
    +
      +
    • {{ Session::get('alert-error') }}
    • +
    +
    +
    +@endif +
    + @include('admin.abo._detail') +
    + +
    + @include('admin.customer._customer_detail', ['shopping_user' => $customer_detail]) +
    + + {!! Form::open(['url' => route('user_abos_update', [$view, $user_abo->id]), 'class' => 'form-horizontal', 'id'=>'cart-order-form']) !!} + +
    + @include('admin.abo._order_abo') +
    + + @if($comp_products && Yard::instance('shopping')->getNumComp() > 0) +
    + @include('user.order.comp_product') +
    + @endif + + {{ Form::close() }} + +
    + @include('admin.abo._executions') +
    + + + {{ __('back') }} + +@endsection + +@section('scripts') + + +@endsection \ No newline at end of file diff --git a/resources/views/user/abo/index.blade.php b/resources/views/user/abo/index.blade.php new file mode 100644 index 0000000..3f9a064 --- /dev/null +++ b/resources/views/user/abo/index.blade.php @@ -0,0 +1,130 @@ +@extends('layouts.layout-2') + +@section('content') +

    +
    + @if($view === 'ot') {{ __('navigation.customerabos') }} @endif + @if($view === 'me') {{ __('navigation.myabos') }} @endif + / {{ __('navigation.overview') }} +
    +

    + +
    +
    + + @if(!$user_abos || $user_abos->isEmpty()) +
    +
    +
    +
    +
    {{ __('abo.abo_delivery') }}
    + +
    +
    + + +
    +
    +
    + @endif + + @foreach($user_abos as $user_abo) +
    + +
    +
    +
    +
    +
    {{ __('tables.start_date') }}
    +
    {{ $user_abo->start_date }}
    +
    +
    +
    {{ __('tables.next_date') }}
    +
    {{ $user_abo->next_date }}
    +
    +
    +
    {{ __('tables.abo_delivery_day') }}
    +
    {{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}
    +
    +
    +
    {{ __('tables.last_date') }}
    +
    {{ $user_abo->last_date }}
    +
    +
    +
    +
    +
    +
    +
    +
    {{ __('tables.status') }} / {{ __('tables.active') }}
    + {!! $user_abo->getStatusFormated() !!}  {!! get_active_badge($user_abo->active) !!} +
    +
    +
    {{ __('tables.abo_delivery') }}
    + {{ $user_abo->getCountOrders() }} +
    +
    +
    {{ __('tables.amount') }}
    + {{ $user_abo->getFormattedAmount() }} € +
    +
    +
    {{ __('tables.payment') }}
    + {{ $user_abo->getPaymentType() }} +
    +
    +
    + @if($view === 'ot') +
    +
    +
    +
    +
    {{ __('First name') }}
    + @if($user_abo->shopping_user) + {{ $user_abo->shopping_user->billing_firstname }} + @endif +
    +
    +
    {{ __('Last name') }}
    + @if($user_abo->shopping_user) + {{ $user_abo->shopping_user->billing_lastname }} + @endif +
    +
    +
    {{ __('E-Mail') }}
    + @if($user_abo->shopping_user) + {{ $user_abo->shopping_user->billing_email }} + @endif +
    +
    +
    {{ __('tables.customer') }}
    + @if($user_abo->shopping_user) + + @endif + +
    +
    +
    + @endif +
    + @endforeach +
    +
    +@endsection \ No newline at end of file diff --git a/resources/views/user/abo/modal_abo_show_products.blade.php b/resources/views/user/abo/modal_abo_show_products.blade.php new file mode 100644 index 0000000..86a2ca1 --- /dev/null +++ b/resources/views/user/abo/modal_abo_show_products.blade.php @@ -0,0 +1,60 @@ + + \ No newline at end of file diff --git a/resources/views/user/abo/vat_info.blade.php b/resources/views/user/abo/vat_info.blade.php new file mode 100644 index 0000000..ab36d80 --- /dev/null +++ b/resources/views/user/abo/vat_info.blade.php @@ -0,0 +1,28 @@ + + +
    +
    +
    {{ __('payment.ordering_country') }}
    + {{ App\Services\UserService::getOrderInfo('billing_state') }} +
    +
    +
    {{ __('payment.country_of_delivery') }}
    + {{ App\Services\UserService::getOrderInfo('shipping_state') }} +
    +
    +
    {{ __('payment.VAT') }}
    + {{ App\Services\UserService::getOrderInfo('tax_free') }} +
    +
    +
    {{ __('payment.reverse_charge_procedure') }}
    + {{ App\Services\UserService::getOrderInfo('user_reverse_charge') }} +
    +
    + +
    + @if($view === 'me' || $view === 'ot-member') +

    {!! __('abo.product_prices_career_level_info', ['user_level_name'=>$user_abo->user->user_level->getLang('name'), 'user_level_margin'=>$user_abo->user->user_level->getFormattedMargin()]) !!}

    + @endif + @if($view === 'ot') +

    {!! __('abo.product_prices_career_level_cpay_info', ['user_level_name'=>$user_abo->member->user_level->getLang('name'), 'user_level_margin'=>$user_abo->member->user_level->getFormattedMargin()]) !!}

    + @endif diff --git a/resources/views/user/homeparty/modal_hp_show_products.blade.php b/resources/views/user/homeparty/modal_hp_show_products.blade.php new file mode 100644 index 0000000..7062b3b --- /dev/null +++ b/resources/views/user/homeparty/modal_hp_show_products.blade.php @@ -0,0 +1,71 @@ + + \ No newline at end of file diff --git a/resources/views/user/membership/index.blade.php b/resources/views/user/membership/index.blade.php index f465c5b..fd14d7f 100644 --- a/resources/views/user/membership/index.blade.php +++ b/resources/views/user/membership/index.blade.php @@ -20,15 +20,19 @@
    - + {{-- isRenewalAccount payment_account date - config('mivita.renewal_days') Vertragsverlängerung --}} @if($user->isRenewalAccount())
    {!! __('membership.membership_was_renewed', ['date'=>$user->nextRenewalAccount()]) !!}
    +

    {{ __('membership.info_contract_renewal', ['days'=>config('mivita.renewal_days')]) }}

    @if($userHistoryPaymentOrder && $userHistoryPaymentOrder->status > 2)
    {{__('membership.payment_has_been_made') }} {{__('membership.status') }}: {{ trans('payment.status.'.$userHistoryPaymentOrder->getStatusType())}}
    + @else +
    {{ __('membership.alert_contract_renewal') }}
    + @endif {{-- Abo Option deaktiviert @@ -51,15 +55,7 @@ @endif @endif --}} - @if($user->payment_order_id) - @if($user->payment_order_product->identifier === 'show_upgrade') -

    {{ __('membership.downgrade_membership_is_not_possible') }}

    -

    {{ __('membership.upgrade_package_and_proceed_payment') }}

    - @endif - @if($user->payment_order_product->identifier === 'show_order') -

    {{ __('membership.is_no_longer_possible_to_change_package') }}

    - @endif - @endif + @if($userHistoryPaymentOrder && $userHistoryPaymentOrder->status > 2)
    @@ -73,6 +69,16 @@ @else @include('user.membership._payment_order') @endif + + @if($user->payment_order_id) + @if($user->payment_order_product->identifier === 'show_upgrade') +

    {{ __('membership.downgrade_membership_is_not_possible') }}

    +

    {{ __('membership.upgrade_package_and_proceed_payment') }}

    + @endif + @if($user->payment_order_product->identifier === 'show_order') +

    {{ __('membership.is_no_longer_possible_to_change_package') }}

    + @endif + @endif
    @else @@ -119,6 +125,50 @@
    @endif @endif + + +
    +
    Zahlungshistorie
    +
    +

    + Die Zahlungshistorie zeigt Dir alle Zahlungen für Deine MIVITA Mitgliedschaft. +

    +
    + + + + + + + + + + + + + + @foreach($userShoppingOrders as $value) + + + + + + + + + + + @endforeach + +
    #{{__('tables.date')}}{{__('tables.amount')}}{{__('tables.payment')}}{{__('tables.status')}}{{__('tables.art')}}{{__('tables.rf_no')}}
    + + + + {{ $value->created_at->format("d.m.Y") }}{{ $value->getFormattedTotalShipping() }}€{{ $value->getLastShoppingPayment('getPaymentType') }}{!! \App\Services\Payment::getShoppingOrderBadge($value) !!}{!! App\Services\Payment::getPaymentForBadge($value) !!}{{ $value->getLastShoppingPayment('reference') }}
    +
    +
    +
    + {{-- remove ABO Options --}} {{-- Abo Option deaktiviert diff --git a/resources/views/user/order/_list_delivery_vat_info.blade.php b/resources/views/user/order/_list_delivery_vat_info.blade.php index 55abfb8..c9fc691 100644 --- a/resources/views/user/order/_list_delivery_vat_info.blade.php +++ b/resources/views/user/order/_list_delivery_vat_info.blade.php @@ -1,14 +1,14 @@
    @if($template === 'me') -

    @if($is_abo) {{ __('order.abo_delivery_to_me') }} @else {{ __('order.delivery_to_me') }} @endif

    +

    @if($is_abo) {{ __('abo.abo_delivery_to_me') }} @else {{ __('order.delivery_to_me') }} @endif

    @endif @if($template === 'ot-customer') -

    @if($is_abo) {{ __('order.abo_delivery_to_the_customer') }} @else {{ __('order.delivery_to_the_customer') }} @endif

    +

    @if($is_abo) {{ __('abo.abo_delivery_to_the_customer') }} @else {{ __('order.delivery_to_the_customer') }} @endif

    {{ __('order.cpay_text') }}.

    @endif @if($template === 'ot-member') -

    @if($is_abo) {{ __('order.abo_delivery_to_the_customer') }} @else {{ __('order.delivery_to_the_customer') }} @endif

    +

    @if($is_abo) {{ __('abo.abo_delivery_to_the_customer') }} @else {{ __('order.delivery_to_the_customer') }} @endif

    {{ __('order.ipay_text') }}.

    @endif @@ -46,6 +46,12 @@ @endif @else

    {{ __('order.no_career_level_info') }}

    +@endif +@if($is_abo) +
    +
    {!! __('abo.abo_type_info', ['base'=>get_abo_type_badge('base'), 'upgrade'=>get_abo_type_badge('upgrade')]) !!}
    +

    @endif
    -
    \ No newline at end of file +
    + diff --git a/resources/views/user/order/comp_product.blade.php b/resources/views/user/order/comp_product.blade.php index 18fbdc9..2416c77 100644 --- a/resources/views/user/order/comp_product.blade.php +++ b/resources/views/user/order/comp_product.blade.php @@ -4,36 +4,35 @@ @for($i = 1; $i <= Yard::instance('shopping')->getNumComp(); $i++) @if(Yard::instance('shopping')->getNumComp() > 1) -

    {{$i}}. {{ __('order.shipping_compensation_product') }}

    +
    {{$i}}. {{ __('order.shipping_compensation_product') }}
    @else -

    {{ __('order.shipping_compensation_product') }}

    +
    {{ __('order.shipping_compensation_product') }}
    @endif
    @php($counter = 1) @php($checked_id = Yard::instance('shopping')->getCompProductBy($i)) - @foreach($comp_products as $comp_product) - -
    -
    - @if(count($comp_product->images)) - - @endif + @foreach($comp_products as $comp_product) +
    +
    + @if(count($comp_product->images)) + + @endif +
    +
    + +
    {{ $comp_product->getLang('name') }}
    +
    {{ __('order.art_no') }}: {{ $comp_product->number }}
    +
    -
    - -
    {{ $comp_product->getLang('name') }}
    -
    {{ __('order.art_no') }}: {{ $comp_product->number }}
    -
    -
    - @php($counter++) - @endforeach + @php($counter++) + @endforeach
    @endfor
    diff --git a/resources/views/user/order/custom_payment.blade.php b/resources/views/user/order/custom_payment.blade.php index d72ec0e..6817b4e 100644 --- a/resources/views/user/order/custom_payment.blade.php +++ b/resources/views/user/order/custom_payment.blade.php @@ -3,8 +3,12 @@ @section('content')
    + @if($is_abo) +

    {{ __('order.order_abo_was_placed_successfully') }}

    + @else

    {{ __('order.order_was_placed_successfully') }}

    - + @endif +
    {{ __('order.payment_link_for_your_customer') }}
    @@ -64,6 +68,10 @@
    {{ __('Phone') }}
    {{ $shopping_user->billing_phone }}
    +
    +
    {{ __('E-Mail') }}
    + @if($shopping_user->faker_mail) "-" @else {{ $shopping_user->billing_email }} @endif +

    @@ -133,7 +141,7 @@ @if(isset($yard_shopping_items))
    - +
    @@ -155,7 +163,12 @@ @endif
    - {{ $item->name }} +
    {{ $item->name }} + {!! get_abo_type_badge($item->abo_type) !!}
    +
    +
    {{ __('order.content') }}: {{ $item->contents }}
    +
    {{ __('order.art_no') }}: {{ $item->number }}
    +
    @@ -179,11 +192,6 @@ @endforeach - - - + @@ -69,6 +70,7 @@ + diff --git a/resources/views/user/user_form.blade.php b/resources/views/user/user_form.blade.php index 277e23a..515f193 100644 --- a/resources/views/user/user_form.blade.php +++ b/resources/views/user/user_form.blade.php @@ -312,16 +312,16 @@
    - - {{ Form::text('bank_owner', $user->account->bank_owner, array('placeholder'=>__('account.firstname_lastname'), 'class'=>'form-control', 'id'=>'bank_owner')) }} + + {{ Form::text('bank_owner', $user->account->bank_owner, array('placeholder'=>__('account.firstname_lastname'), 'class'=>'form-control', 'id'=>'bank_owner', 'required'=>true)) }}
    - - {{ Form::text('bank_iban', $user->account->bank_iban, array('placeholder'=>__('account.IBAN'), 'class'=>'form-control', 'id'=>'bank_iban')) }} + + {{ Form::text('bank_iban', $user->account->bank_iban, array('placeholder'=>__('account.IBAN'), 'class'=>'form-control', 'id'=>'bank_iban', 'required'=>true)) }}
    - - {{ Form::text('bank_bic', $user->account->bank_bic, array('placeholder'=>__('account.BIC'), 'class'=>'form-control', 'id'=>'bank_bic')) }} + + {{ Form::text('bank_bic', $user->account->bank_bic, array('placeholder'=>__('account.BIC'), 'class'=>'form-control', 'id'=>'bank_bic', 'required'=>true)) }}
    diff --git a/resources/views/vendor/translation/languages/index.blade.php b/resources/views/vendor/translation/languages/index.blade.php index 57f763c..e958934 100644 --- a/resources/views/vendor/translation/languages/index.blade.php +++ b/resources/views/vendor/translation/languages/index.blade.php @@ -24,7 +24,7 @@
    {{ __('tables.product') }}
    -
    -
    {{__('order.subtotal')}} diff --git a/resources/views/user/order/delivery.blade.php b/resources/views/user/order/delivery.blade.php index 8e54c8b..3ca7138 100644 --- a/resources/views/user/order/delivery.blade.php +++ b/resources/views/user/order/delivery.blade.php @@ -44,53 +44,61 @@ ({{ __('order.cpay') }}) + @if(Auth::user()->isVIP())
    -

    {{ __('order.abo_delivery') }}

    +
    +
    VIP only
    +
    - +

    {{ __('abo.abo_delivery') }} + +

    +
    + @if(\App\Services\AboHelper::userHasAbo(Auth::user())) +

    {{ __('navigation.myabo') }} {{ __('edit') }}

    + @else + + @endif - - -
    +
    +
    + +
    +
    +
    +
      + {!! __('abo.pros_list') !!} +
    +
    +
    +
    + @endif
    - @if(Session::has('custom-error')) -
    - - {{ Session::get('custom-error') }} -
    - @endif - + + {!! Form::close() !!} - - +@endsection \ 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 index b217dff..02f6db9 100644 --- a/resources/views/user/order/shipping_ot.blade.php +++ b/resources/views/user/order/shipping_ot.blade.php @@ -1,5 +1,5 @@ - @if($for == 'ot-customer') + @if($for == 'ot-customer' || $for == 'abo-ot-customer') {{ Form::hidden('billing_company', $shopping_user->billing_company) }} {{ Form::hidden('billing_salutation', $shopping_user->billing_salutation) }} {{ Form::hidden('billing_firstname', $shopping_user->billing_firstname) }} diff --git a/resources/views/user/order/yard_view_form.blade.php b/resources/views/user/order/yard_view_form.blade.php index 324e7ca..44d5073 100644 --- a/resources/views/user/order/yard_view_form.blade.php +++ b/resources/views/user/order/yard_view_form.blade.php @@ -125,7 +125,7 @@
    -
    {{ $row->name }}
    +
    {{ $row->name }} @if(isset($is_abo) && $is_abo) {!! get_abo_type_badge_by_product($product) !!} @endif
    {{ __('order.content') }}: {{ $product->contents }}
    {{ __('order.art_no') }}: {{ $product->number }}
    @@ -258,14 +258,14 @@ @if(isset($is_abo) && $is_abo)
    -

    {{ __('order.abo_settings') }}

    +

    {{ __('abo.abo_settings') }}

    - +
    @@ -273,20 +273,29 @@
    - {!! __('order.abo_order_info') !!} + {!! __('abo.abo_order_info') !!}
    + +
    -
    - +
    - - @endif - @if((isset($data['for']) && $data['for'] === 'ot-customer') || (isset($for) && $for === 'ot-customer')) + @php($is_disabled = false) + @if(isset($is_abo) && $is_abo && !\App\Services\AboHelper::aboHasBaseProduct(Yard::instance('shopping')->getContentByOrder())) + @php($is_disabled = true)
    - +
    + {!! __('abo.abo_type_info_base', ['base'=>get_abo_type_badge('base')]) !!} +
    +
    +
    + @endif + @if((isset($data['for']) && $data['for'] === 'ot-customer') || (isset($for) && $for === 'abo-ot-customer')) +
    +


    @@ -294,12 +303,13 @@
    @else
    - +


    {!! __('payment.checkout_ssl_server') !!}
    @endif + @endif @endif diff --git a/resources/views/user/shop/sales/api_order_list_total.blade.php b/resources/views/user/shop/sales/api_order_list_total.blade.php index 85a6f1c..abf57e4 100644 --- a/resources/views/user/shop/sales/api_order_list_total.blade.php +++ b/resources/views/user/shop/sales/api_order_list_total.blade.php @@ -22,13 +22,13 @@
    - {{$shop_item->points_total}} + {{ number_format($shop_item->points_total, 0) }} {{ formatNumber($shop_item->user_price_net) }} € - {{$shop_item->qty}} + {{ number_format($shop_item->qty, 0) }} diff --git a/resources/views/user/team/export.blade.php b/resources/views/user/team/export.blade.php index 4dfde51..1bf119e 100644 --- a/resources/views/user/team/export.blade.php +++ b/resources/views/user/team/export.blade.php @@ -47,6 +47,7 @@ {{__('tables.phone') }} {{__('tables.mobil') }} {{__('tables.birthday') }}{{__('tables.partner_since') }} {{__('tables.account') }} {{__('tables.account_to') }} {{__('tables.sponsor')}}{{ $child->phone }} {{ $child->mobil }} {{ $child->birthday }}{{ $child->partner_since }} {!! ($child->active_account == 1 ? __('yes') : __('no')) !!} {{ $child->payment_account_date }} {{ $child->sponsor_name }} - + {{ __('translation::translation.translations') }} {{ __('edit') }} {{ $name }} diff --git a/resources/views/web/layouts/application.blade.php b/resources/views/web/layouts/application.blade.php index 21f2110..cd8add1 100644 --- a/resources/views/web/layouts/application.blade.php +++ b/resources/views/web/layouts/application.blade.php @@ -11,6 +11,7 @@ + diff --git a/resources/views/web/templates/_bcategories.blade.php b/resources/views/web/templates/_bcategories.blade.php index 64dd20b..b6e9d26 100644 --- a/resources/views/web/templates/_bcategories.blade.php +++ b/resources/views/web/templates/_bcategories.blade.php @@ -22,11 +22,11 @@ {{ __('webcontent.compatibility_with_family_private_life') }} -
  • + {{--
  • {{ __('webcontent.start_up') }}
  • - +--}} diff --git a/resources/views/web/templates/existenzgruendung.blade.php b/resources/views/web/templates/_existenzgruendung.blade.php similarity index 100% rename from resources/views/web/templates/existenzgruendung.blade.php rename to resources/views/web/templates/_existenzgruendung.blade.php diff --git a/resources/views/web/templates/checkout-is-final.blade.php b/resources/views/web/templates/checkout-is-final.blade.php new file mode 100644 index 0000000..cd05132 --- /dev/null +++ b/resources/views/web/templates/checkout-is-final.blade.php @@ -0,0 +1,111 @@ +@extends($user_shop ?'web.user.layouts.layout' : 'web.layouts.layout') + +@section('content') + + + + + + + + +
    +
    + + +
    +
    +

    {{ __('payment.thank_you_very_much') }}

    + +

    {{ __('payment.link_was_paid') }}

    +
    + + +

    + {{ __('payment.your_mivita_team') }} +

    +
    +
    + + +
    +
    + +@endsection \ No newline at end of file diff --git a/resources/views/web/templates/checkout.blade.php b/resources/views/web/templates/checkout.blade.php index fe42f83..3af9fa4 100644 --- a/resources/views/web/templates/checkout.blade.php +++ b/resources/views/web/templates/checkout.blade.php @@ -217,6 +217,13 @@ @endif + @if($instance_status) +
    +
    + {!! \App\Services\OrderPaymentService::getStatusAlert($instance_status) !!} +
    +
    + @endif
    {{-- LEFT --}} @@ -252,7 +259,7 @@ @endif
    -
    {{ $row->name }}
    +
    {{ $row->name }} @if(isset($is_abo) && $is_abo) {!! get_abo_type_badge_by_product($product) !!} @endif
    {{ __('order.content') }}: {{ $product->contents }}
    {{ __('order.art_no') }}: {{ $product->number }}
    {{ __('weborder.delivery_time_1_3') }}
    @@ -359,7 +366,6 @@
    {!! Form::open(['url' => route('checkout.checkout_card_final'), 'class' => 'row clearfix', 'id'=>'checkout_card_final']) !!} - {!! Form::hidden('selected_country', '') !!} {!! Form::hidden('is_for', $shopping_user->is_for) !!} {!! Form::hidden('is_from', $shopping_user->is_from) !!} @@ -406,7 +412,7 @@
    - {!! HTMLHelper::getSalutation(($shopping_user->billing_salutation ? $shopping_user->billing_salutation : old('billing_salutation'))) !!} @if ($errors->has('billing_salutation')) @@ -508,7 +514,12 @@
    - {!! Form::email('billing_email', $shopping_user->billing_email, ['class' => 'form-control '.($errors->has('billing_email') ? 'error' : ''), 'id'=>'billing_email']) !!} + @if($is_for === 'ot-customer' || $is_for === 'abo-ot-customer') + {!! Form::email('billing_email', $shopping_user->billing_email, ['class' => 'form-control '.($errors->has('billing_email') ? 'error' : ''), 'id'=>'billing_email', 'readonly' => 'readonly']) !!} + {{ __('order.email_can_not_be_changed') }}. + @else + {!! Form::email('billing_email', $shopping_user->billing_email, ['class' => 'form-control '.($errors->has('billing_email') ? 'error' : ''), 'id'=>'billing_email']) !!} + @endif @if ($errors->has('billing_email')) @endif @@ -679,7 +690,7 @@ - {!! HTMLHelper::getSalutation(($shopping_user->shipping_salutation ? $shopping_user->shipping_salutation : old('shipping_salutation'))) !!} @if ($errors->has('shipping_salutation')) @@ -811,7 +822,7 @@ @endif {{-- PAYMENT METHOD --}}
    -

    @if(!$is_abo) {{ __('payment.payment_method') }} @else {{ __('order.payment_for_abo') }} @endif

    +

    @if(!$is_abo) {{ __('payment.payment_method') }} @else {{ __('abo.payment_for_abo') }} @endif


    @@ -897,20 +908,20 @@ {{-- ABO INFOS --}} @if($is_abo)
    -

    {{ __('order.abo_delivery') }}

    +

    {{ __('abo.abo_delivery') }}


    -

    {{ __('order.abo_order_info') }}

    +

    {{ __('abo.abo_order_info') }}

    {{ now()->format('d.m.Y') }}
    - {{ __('order.abo_start_date') }}: + {{ __('abo.abo_start_date') }}:
    -
    {{ HTMLHelper::getAboWeeksLang($abo_interval) }}
    +
    {{ HTMLHelper::getAboStrLang($abo_interval) }}
    - {{ __('order.abo_delivery_intervall') }}: + {{ __('abo.abo_delivery_intervall') }}:
    @endif @@ -980,11 +991,10 @@
    - {{-- --}} -
    @@ -1000,36 +1010,41 @@
    -
    - - {!! Form::text('cc_cardpan', '', ['class' => 'form-control', 'id'=>'cc_cardpan', 'placeholder'=>__('payment.credit_card_number')]) !!} -
    -
    - -
    - @php( $months = range(1, 12)) @foreach($months as $month) @php( $month = sprintf('%02d', $month) ) @endforeach -
    -
    - + @php( $years = range(date("Y"), date('Y', strtotime('+10 years'))) ) @foreach($years as $year) @endforeach -
    -
    - +
    + {!! Form::text('cc_cardcvc2', '', ['class' => 'form-control', 'id'=>'cc_cardcvc2', 'placeholder'=>'CVC*']) !!}
    + + + + +
    diff --git a/resources/views/web/user/layouts/application.blade.php b/resources/views/web/user/layouts/application.blade.php index 79f04fd..7b4f970 100644 --- a/resources/views/web/user/layouts/application.blade.php +++ b/resources/views/web/user/layouts/application.blade.php @@ -11,6 +11,7 @@ + diff --git a/routes/web.php b/routes/web.php index cf3d89d..5dab527 100755 --- a/routes/web.php +++ b/routes/web.php @@ -253,6 +253,11 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car Route::post('/user/team/load', 'User\TeamController@load')->name('user_team_load'); + Route::get('/user/abos/{view}', 'User\AboController@index')->name('user_abos'); + Route::get('/user/abos/detail/{view}/{id}', 'User\AboController@detail')->name('user_abos_detail'); + Route::post('/user/abos/update/{view}/{id}', 'User\AboController@update')->name('user_abos_update'); + Route::get('/user/abo/datatable/{id}', 'User\AboController@datatable')->name('user_abo_datatable'); + //user customers Route::get('/user/customers', 'User\CustomerController@index')->name('user_customers'); @@ -262,7 +267,7 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car Route::post('/user/customer/edit/{id}', 'User\CustomerController@store')->name('user_customer_edit'); Route::get('/user/customer/datatable', 'User\CustomerController@getCustomers')->name('user_customer_datatable'); - + //user order & do order Route::get('/user/orders', 'User\OrderController@index')->name('user_orders'); Route::get('/user/orders/datatable', 'User\OrderController@ordersDatatable')->name('user_orders_datatable'); @@ -281,6 +286,10 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car Route::get('/user/order/my/custom/payment/{identifier}', 'User\OrderController@customPayment')->name('user_order_my_custom_payment'); + Route::get('/user/order/payment/links', 'User\OrderPaymentController@index')->name('user_order_payment_links'); + Route::get('/user/orders/payment/datatable', 'User\OrderPaymentController@datatable')->name('user_order_payment_links_datatable'); + Route::get('/user/order/payment/detail/{identifier}', 'User\OrderPaymentController@detail')->name('user_order_payment_links_detail'); + Route::get('/user/order/payment/delete/{identifier}', 'User\OrderPaymentController@delete')->name('user_order_payment_links_delete'); //user homeparty Route::get('/user/homepartys', 'User\HomepartyController@index')->name('user_homepartys'); @@ -410,6 +419,13 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car Route::post('/admin/sales/store', 'SalesController@store')->name('admin_sales_store'); Route::post('/admin/sales/invoice', 'SalesController@invoice')->name('admin_sales_invoice'); + + Route::get('/admin/abos', 'Admin\AboController@index')->name('admin_abos'); + Route::get('/admin/abos/detail/{id}', 'Admin\AboController@detail')->name('admin_abos_detail'); + Route::post('/admin/abos/update/{id}', 'Admin\AboController@update')->name('admin_abos_update'); + Route::get('/admin/abos/datatable', 'Admin\AboController@datatable')->name('admin_abos_datatable'); + + //payments invoice // Rechnungen Route::get('/admin/payments/invoice', 'PaymentInvoiceController@index')->name('admin_payments_invoice'); Route::post('/admin/payments/invoice', 'PaymentInvoiceController@index')->name('admin_payments_invoice');