PHP Classes

Laravel JSON Responses and Errors: Generate JSON for HTTP responses and exceptions

Recommend this page to a friend!
  Info   View files View files (16)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 19 This week: 1All time: 11,194 This week: 560Up
Version License PHP version Categories
laravel-jsonable 1.0MIT/X Consortium ...5HTTP, PHP 5, Language
Description 

Author

This package can generate JSON for HTTP responses and exceptions.

It can take several parameters to define values that will be include in a object that will be used to generate JSON data to be returned as the current HTTP request response.

Currently it can generate JSON response for successful requests or requests that triggered PHP exceptions.

Picture of Moamen Eltouny
  Performance   Level  
Name: Moamen Eltouny <contact>
Classes: 36 packages by
Country: Egypt Egypt
Age: 31
All time rank: 259926 in Egypt Egypt
Week rank: 52 Up1 in Egypt Egypt Up
Innovation award
Innovation award
Nominee: 20x

Details

<p align="center"><a href="https://pharaonic.io" target="_blank"><img src="https://raw.githubusercontent.com/Pharaonic/logos/main/jsonable.jpg"></a></p>

<p align="center"> <a href="https://php.net" target="_blank"><img src="https://img.shields.io/static/v1?label=PHP&message=%3E=7.2&color=blue&style=flat-square" alt="PHP Version : >= 7.4"></a> <a href="https://laravel.com" target="_blank"><img src="https://img.shields.io/static/v1?label=Laravel&message=%3E=8.0&color=F05340&style=flat-square" alt="Laravel Version : >= 8.0"></a> <img src="https://img.shields.io/static/v1?label=License&message=MIT&color=brightgreen&style=flat-square" alt="License"> <a href="https://liberapay.com/Pharaonic" target="_blank"><img src="https://img.shields.io/liberapay/receives/Pharaonic?color=gold&label=Support&style=flat-square" alt="Support"></a> <br> <a href="https://packagist.org/packages/Pharaonic/laravel-jsonable" target="_blank"><img src="https://img.shields.io/static/v1?label=Packagist&message=pharaonic/laravel-jsonable&color=blue&logo=packagist&logoColor=white" alt="Source"></a> <a href="https://packagist.org/packages/pharaonic/laravel-jsonable" target="_blank"><img src="https://poser.pugx.org/pharaonic/laravel-jsonable/v" alt="Packagist Version"></a> <a href="https://packagist.org/packages/pharaonic/laravel-jsonable" target="_blank"><img src="https://poser.pugx.org/pharaonic/laravel-jsonable/downloads" alt="Packagist Downloads"></a> </p>

<h3 align="center">Laravel Jsonable</h3> <h5 align="center">Well-Formated Responses & Exceptions.</h5>

Documentation

You can find the detailed documentation here in Laravel Jsonable Documentation.

Contributing

Thank you for considering contributing to this package! Be one of Pharaonic team.

Pharaonic Sponsors

We would like to extend our thanks to the following sponsors for funding Pharaonic packages development. If you are interested in becoming a sponsor, please visit the Pharaonic Liberapay page or Patreon page.

License

This package is an open-sourced software licensed under the MIT license.


  Files folder image Files  
File Role Description
Files folder imagesrc (3 files, 5 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageCommands (2 files, 1 directory)
Files folder imageExceptions (2 files, 1 directory)
Files folder imageFacades (1 file)
Files folder imageRequests (1 file)
Files folder imageResources (1 directory)
  Accessible without login Plain text file helpers.php Aux. Auxiliary script
  Plain text file Json.php Class Class source
  Plain text file JsonableServiceProvider.php Class Class source

  Files folder image Files  /  src  /  Commands  
File Role Description
Files folder imagestubs (2 files)
  Plain text file MakeRequest.php Class Class source
  Plain text file MakeResource.php Class Class source

  Files folder image Files  /  src  /  Commands  /  stubs  
File Role Description
  Plain text file request.stub Class Class source
  Plain text file resource.stub Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
Files folder imageAuth (1 file)
  Plain text file Exception.php Class Class source
  Plain text file ExceptionHandler.php Class Class source

  Files folder image Files  /  src  /  Exceptions  /  Auth  
File Role Description
  Plain text file AuthorizationException.php Class Class source

  Files folder image Files  /  src  /  Facades  
File Role Description
  Plain text file Json.php Class Class source

  Files folder image Files  /  src  /  Requests  
File Role Description
  Plain text file JsonableFormRequest.php Class Class source

  Files folder image Files  /  src  /  Resources  
File Role Description
Files folder imageJson (2 files)

  Files folder image Files  /  src  /  Resources  /  Json  
File Role Description
  Plain text file Resource.php Class Class source
  Plain text file ResourceCollection.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:19
This week:1
All time:11,194
This week:560Up