Request::getAcceptableContentTypes PHP Method

getAcceptableContentTypes() public static method

Gets a list of content types acceptable by the client browser.
public static getAcceptableContentTypes ( ) : array
return array List of content types in preferable order
        public static function getAcceptableContentTypes()
        {
            //Method inherited from \Symfony\Component\HttpFoundation\Request
            return \Illuminate\Http\Request::getAcceptableContentTypes();
        }

Usage Example

 public static function wantsHtml()
 {
     $acceptable = \Request::getAcceptableContentTypes();
     return isset($acceptable[0]) && $acceptable[0] == 'text/html';
 }
All Usage Examples Of Request::getAcceptableContentTypes