when i use (auth()->user()->hasRole(\'User\')) or (Auth::user()->hasRole(\'User\')) in service provider it gives me this error:
Call to a member func