This Package helps developers to easily make response for API . Add extra data to collection response . Short magic method that use your translate files to set messages .
composer require novaday-co/laravel-api-response
Api::success("Successful Action")->response();
Api::success("Successful Action")->response();
Api::failure("Failed")->response();
Api::customResponse(201,'Created Successfully',['key'=>'value'])->response();
Api::success('Ok',['key'=>'value'])->response();
Api::success('Ok',[ User::all() ])->withData([ Customer::first() ])->response();
Api::success('Ok',[ User::all() ])->with([ 'Customers' => Customer::all() ])->response();
Api::updated()->response();