I have an observer, and it's not hit on update.
In "AppServerProvider.php" :
public function register()
{
die('this is hit');
Link::observe(LinkObserver::class);
}
The "die" works here. So I comment this line.
But then I add this "die" in "LinkOberver.php" :
public function __construct()
{
die('HIT');
}
This "die" is not even hit. Why ?
In LinkController, I have this :
if (!$link->exists) {
$link->save();
//$link->update([ //refactored , moved to model observer
// 'code' => $link->getCode(),
//]);
}
Upon save, the observer created method is not hit.