Skip to content

Commit

Permalink
✨ allow for data to be passed into the success method
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Jan 11, 2019
1 parent cdd9076 commit 5c96aff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/MetApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 5c96aff

Please sign in to comment.