From 5c96aff4bc24cf255391ad2d9541098aafaf185b Mon Sep 17 00:00:00 2001 From: kevin olson Date: Fri, 11 Jan 2019 16:06:40 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20allow=20for=20data=20to=20be=20pass?= =?UTF-8?q?ed=20into=20the=20success=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MetApiController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/MetApiController.php b/src/MetApiController.php index c2ee1a9..a6219b5 100644 --- a/src/MetApiController.php +++ b/src/MetApiController.php @@ -169,9 +169,14 @@ protected function abort() { * @param Array * @return \Illuminate\Http\Response */ - protected function success($message='Successful',$replace=[]) + protected function success($message='Successful',$replace=[],$data=[]) { - return $this->render(['success' => true,'type' => 'success', 'message' => __($message,$replace)], 200, true); + return $this->render([ + 'success' => true, + 'type' => 'success', + 'message' => __($message,$replace), + 'data' => $data, + ], 200, true); } /**