Laravel Exception commonly used in big projects

Поділитися
Вставка
  • Опубліковано 8 лют 2025

КОМЕНТАРІ • 4

  • @DaniyalK-r2g
    @DaniyalK-r2g 3 місяці тому

    Praise the lord! My prayer has been answered 😎🙌

  • @muadzrosli
    @muadzrosli 2 місяці тому

    Hi sir. In the bootstrap/app.php file, in the exception part, why it use ->report(...) not ->render(...) method?

    • @TalksOnWeb
      @TalksOnWeb  2 місяці тому

      Hi @muadzrosli , you should use the "render" method to print something on the screen to the user. You should use the "report" method when you want to save the error to your DB or even email someone in customer support that a customer was trying to place an order and it didn't go through, etc. "report" method is used to either send emails(report) to let people know about the issue. Let me know if this answers the question.

    • @muadzrosli
      @muadzrosli 2 місяці тому +1

      @@TalksOnWeb understood. I was wondering because you used render() method in try catch in controller before refactor to global handler.