File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ # MSSQL Dateformat Fixer
2+
3+ There is an international date format Y-m-d that is supposed to be universal, however the MSSQL implementation is flawed
4+ and is not universal and incorrect interprets it as Y-d-m which is beyond idiotic.
5+ Laravel uses Y-m-d as their international format, which can lead to errors depending on SQL SERVER Settings.
6+ This command checks the vendor directory for the file and updates it if required.
7+
8+ ## Installation
9+
10+ Install with composer
11+
12+ ```` dotenv
13+ composer require tobya/laravel-mssql-dateformat
14+ ````
15+ ### To Run
16+
17+ Run by calling the larvel command
18+
19+ ```` dotenv
20+ artisan mssql:check-universal-date --update
21+ ````
22+ You can run without ` --update ` to do the check without patching the file.
23+
24+ ## Configuration
25+
26+ It is suggested that you add the following to your project ` composer.json ` file so this command is automatically run
27+ on install and update.
28+
29+ ```` dotenv
30+
31+ "scripts": {
32+ "post-update-cmd": [
33+ "@php artisan mssql:check-universal-date --update"
34+ ],
35+ "post-install-cmd": [
36+ "@php artisan mssql:check-universal-date --update"
37+ ]
38+ }
39+ ````
40+ This is due to the fact that whenever ` composer update ` or ` composer install ` is run and the illuminate package
41+ is updated it will overwrite the ` SqlServerGrammar.php ` with the origional version, so it is necessary to call
42+ the command whenever this has the potential of happening. If no change has been made to the file it will
43+ not be modified.
You can’t perform that action at this time.
0 commit comments