Over the next few lessons, we'll review various approaches for organizing your code. Consider the "send an email when a project is created" portion of the code. We could trigger this logic in multiple ways: through the controller, as an Eloquent model hook, as a custom event, etc. Let's begin reviewing these approaches while discussing the pros and cons of each.
Published on Nov 19th, 2018.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.