Skip to content
Advertisement

laravel observers are not working

I am trying to listen to model events using laravel observers .The problem is when i submit my form (update or creating new records), nothing happened at all .Do i miss something ?

app.php

JavaScript

CasesManagerServiceProvider.php

JavaScript

CasesObserver.php

JavaScript

Cases.php

JavaScript

Advertisement

Answer

Ok i have found my answer . All the problem was when I added use appObserversCasesObserver; in CasesManagerServiceProvider.php instead of use AppObserversCasesObserver; . Yes the Camel case of App was the problem, so i changed to App and all things are working fine now.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement