0

Hi I want to record a lot of models before and after modification.

Yeah. I know there is dirty() and isclean() things.

But I have to record all data before and after , so I could check which model has problem to updateOrCreate.

I do this.

 Log::info( $myModel );

it is written on log file.

local.INFO: {"id":90638719,"target_id":1,"time":1595178000,.... } 

I want make it pretty ..

Does someone have an idea about this?

Thanks.

binggle
  • 25
  • 1
  • 5
  • 1
    What exactly do you mean by __check which model has problem to updateOrCreate__? To print the object prettier in logs you can use `Log::info(json_encode($myModel, JSON_PRETTY_PRINT));`. Check [this answer](https://stackoverflow.com/a/9120871/3226121) – ljubadr Jul 17 '20 at 02:31
  • Thanks... What is what I looking for. – binggle Jul 17 '20 at 04:36

0 Answers0