I’m getting into api controllers and am wondering if this index function: inside my api controller has to be returned with response()->json() or if it is OK to just return the variable: Both seem to work. Are there reasons to use the former one? Answer the return $data will just convert the $data into a json response. no header will