The variable $request does not exist. Did you forget to declare it?
This check marks access to variables or properties that have not been declared yet. While PHP
has no explicit notion of declaring a variable, accessing it before a value is assigned
to it is most likely a bug.
Accessing unreadNotifications on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a
concrete implementation of the interface.
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.