If you are using named routes you are sure that this view belongs to a certain route, so you may use the route's name instead.
Edit: this method is like a workaround, so if you have standalone (ready to be included) components that you want to know their names, it won't really work, it will work on global views that are tied to routes.
This will make a variable $view_name accessible in all blade views.
You could use it for some logic then.
Let us know if this helps with your use case.