Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Jobinja/json-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jobinja Json Response Utils

Jobinja json responses daily used utils

Installation

composer require morilog/json-utils

JRes

  • validation
  • store
  • update
  • index
  • pagination
  • error
  • errorException
final class MyAction extends Controller
{
    public function action()
    {
        try {
            $users = User::paginate();
            
            return JRes::pagination($users)->getResponse();
        } catch (\Exception $e) {
            return JRes::errorException($e)->getResponse();
        }
    }
}

Packages

No packages published

Languages