With the recent **Laravel 5.8 release**, it is now a lot easier to listen for **Eloquent Pivot** events. There are a lot of ways on how you can listen to Pivot Events and here's one way using Model Observers. Also, if you did not know, you can define a model for your pivot table using the following command `php artisan make:model PivotModelName --pivot`. An Eloquent model will be generated which you can use to define relationships back to owning Models. **ProTip:** This is really useful especially if you have 3 or more owning Models in a Pivot table. ![Pivot Model Events](https://marvinquezon.com/storage/Nr0j7qg3VQGlMBj0eq10zw892c5bvx5sQZ9PwGk1.jpeg)
Enter a search term to find articles.