Modify connection to SQL Server from Laravel 5.5 to manipulate dates

0

According to what Taylor says here in this commentary: link

  

You probably need to override the database link in the IoC and inject a custom ConnectionFactory implementation into the database administrator.

Who can help me to do this? Greetings and thank you in advance.

    
asked by Renato Tapia 27.10.2017 в 00:44
source

1 answer

0

You translated the answer too literal, it is referring to the "sqlsrv" configuration "config / database" array, but you also do not have to worry about the dates to deal with them and they will be parsed to a "Carbon" object which You can treat the same in any database and adapt to anything you need. Even so, if you want to modify the default format of the dates, just add this function with the desired format.

  

public function getDateFormat () {return 'Y-m-d H: i: s.0000000'; }

    
answered by 27.10.2017 в 08:37