unauthorized

Function unauthorized 

Source
pub fn unauthorized<S: AsRef<str>>(message: S) -> ElifResponse
Expand description

Create an unauthorized response (401) with error message

Simple equivalent: return response()->json(['error' => 'Unauthorized'], 401)