2017 © Pedro Peláez
 

library laravel-macros-response-customised

Customised Response Macro's for Laravel

image

freniz/laravel-macros-response-customised

Customised Response Macro's for Laravel

  • Sunday, July 22, 2018
  • by Freniz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 3 % Grown

The README.md

laravel-macros-response-customised

laravel package to control the response and customise the dataname as per the requirement., (*1)

Installation

This package can be installed using composer. Find the comand below, (*2)

``` bash composer require abdulnizam/laravel-macros-response-customised, (*3)


## Usage ### Custom To use custom run this comand to config the custom variables ``` bash cp 'vendor/abdulnizam/laravel-macros-response-customised/config/laravelmacros.php' config/laravelmacros.php

path : config/laravelmacros.php, (*4)

custom => array('status', 'message'), (*5)

custom_error => array('status', 'errors'), (*6)

then, (*7)

``` php return response()->custom([1, 'Welcome to the laravel macros']);, (*8)


Result ``` json { "status": 1, "message": "Welcome to the laravel macros" }

``` php return response()->custom_error([0, 'Welcome to the laravel macros']);, (*9)


Result ``` json { "status": 0, "errors": "Welcome to the laravel macros" }

Message

``` php return response()->message('Welcome to laravel macros", 200);, (*10)


Result ``` json { "message": "Welcome to laravel macros" }

With the Http Status Code: 200, (*11)

Error

``` php return response()->error('Error message to be displayed', $statuscode = 400);, (*12)


Result ``` json { "message": "Error message to be displayed" }

With the Http Status Code: 400, (*13)

Success

``` php return response()->success(['dataname' => 'data'], $statuscode = 200);, (*14)


Result ``` json { "data": {"dataname": "data"} }

With the Http Status Code: 200, (*15)

PDF

PDF responses., (*16)

php return response()->pdf($pdfcontent, 'name.pdf', $download = false);, (*17)

License

The MIT License (MIT). Please see License File for more information., (*18)

The Versions

22/07 2018

dev-master

9999999-dev http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

laravel php response macros freniz customised abdulnizam

28/01 2018

v3.2

3.2.0.0 http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

laravel php response macros freniz customised

28/01 2018

v3.1

3.1.0.0 http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

laravel php response macros freniz customised

28/01 2018

v3.0

3.0.0.0 http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

laravel php response macros freniz customised

28/01 2018

v2.1

2.1.0.0 http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

laravel php response macros freniz customised

28/01 2018

v2.0

2.0.0.0 http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

laravel php response macros freniz customised

28/01 2018

v1.2

1.2.0.0 http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

laravel php response macros freniz customised

27/01 2018

v1.1

1.1.0.0 http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

laravel php response macros freniz customised

27/01 2018

v1.0

1.0.0.0 http://www.freniz.com

Customised Response Macro's for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel php response macros freniz customised