Laravel 5: Checking if an Array Contains an Element With has
The has helper method will return a boolean value that indicates if the given $key exists in the supplied $array , using dot notation. This method is incredibly useful when checking if an array has a specific key at an arbitrary depth.