PHPackages                             userfrosting/support - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. userfrosting/support

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

userfrosting/support
====================

Support classes for UserFrosting and UF modules

4.5.0(5y ago)153.4k24MITPHPPHP &gt;=7.1

Since Jun 1Pushed 5y ago5 watchersCompare

[ Source](https://github.com/userfrosting/support)[ Packagist](https://packagist.org/packages/userfrosting/support)[ Docs](https://github.com/userfrosting/support)[ RSS](/packages/userfrosting-support/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (19)Used By (4)

Support module for UserFrosting 4
=================================

[](#support-module-for-userfrosting-4)

[![Latest Version](https://camo.githubusercontent.com/e618bed5a3a8d396e9b1b357a43790cb43676dcbed733ce4d160f61af1ba80d8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7573657266726f7374696e672f737570706f72742e737667)](https://github.com/userfrosting/support/releases)[![PHP Version](https://camo.githubusercontent.com/4ae6bec1d23ce042bb1793501e239f8587a0d9b000b701032c76fd6d1f044d70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7573657266726f7374696e672f737570706f72742e7376673f636f6c6f723d627269676874677265656e)](https://camo.githubusercontent.com/4ae6bec1d23ce042bb1793501e239f8587a0d9b000b701032c76fd6d1f044d70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7573657266726f7374696e672f737570706f72742e7376673f636f6c6f723d627269676874677265656e)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Join the chat at https://chat.userfrosting.com/channel/support](https://camo.githubusercontent.com/3ef275424b9a67f2277aea0eeb294f16f16660d8fc4073a0a988298d626d4c5a/68747470733a2f2f636861742e7573657266726f7374696e672e636f6d2f6170692f76312f736869656c642e7376673f6e616d653d5573657246726f7374696e67)](https://chat.userfrosting.com/channel/support)[![Donate](https://camo.githubusercontent.com/9b77bd2b1b19b6b8fcbff67c4cfa703b0ab2c936b33ce26d534e1222cbdcdea6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e253230436f6c6c6563746976652d446f6e6174652d626c75652e737667)](https://opencollective.com/userfrosting#backer)

BranchBuildCoverageStyle[master](https://github.com/userfrosting/support)[![](https://github.com/userfrosting/support/workflows/Build/badge.svg?branch=master)](https://github.com/userfrosting/support/actions)[![](https://camo.githubusercontent.com/35e647b302c740f0346be4225ebc1fbdbe59124a787bfc4735b70e9cafa5bdc0/68747470733a2f2f636f6465636f762e696f2f67682f7573657266726f7374696e672f737570706f72742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/userfrosting/support)[![](https://camo.githubusercontent.com/5da39946d87f161e9a2dcb963fce1560161e6c37a9f9d39bd104455a8371035b/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f36303133373532332f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://github.styleci.io/repos/60137523)[develop](https://github.com/userfrosting/support/tree/develop)[![](https://github.com/userfrosting/support/workflows/Build/badge.svg?branch=develop)](https://github.com/userfrosting/support/actions) [![](https://camo.githubusercontent.com/78c05c30864c0a1e626299587ca5b7109cf417932061b391d774c76a7afe6bfc/68747470733a2f2f636f6465636f762e696f2f67682f7573657266726f7374696e672f737570706f72742f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/userfrosting/support)[![](https://camo.githubusercontent.com/d5a76c0fe44b4050c4e32fe766b4eded91800f2323511d78a55d4ec15e3f18ed/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f36303133373532332f736869656c643f6272616e63683d646576656c6f70267374796c653d666c6174)](https://github.styleci.io/repos/60137523)This module contains support classes for UserFrosting and related modules.

Exception
---------

[](#exception)

`userfrosting/support` provides a number of custom exception types used by the main UserFrosting project:

- RuntimeException
    - FileNotFoundException
    - JsonException
- HttpException
    - BadRequestException
    - ForbiddenException
    - NotFoundException

### HttpException

[](#httpexception)

A large portion of UserFrosting's exception types inherit from the `HttpException` class.

The `HttpException` class acts like a typical exception, but it maintains two additional parameters internally: a list of messages (`UserMessage`) that the exception handler may display to the client, and a status code that should be returned with the response. As a simple example, consider the `BadRequestException`:

```
