API response

Submitted by obiefy - 3 weeks ago

A few days ago I released a new package called obiefyapi-response, It is simple api response wrapper for laravel, you can give it try from GitHub URL: https://github.com/obiefy/api-response

// simple way to return success response
// api()->ok($message, $data);
public function profile()
{
    return api()->ok('User profile', [
        'user' => auth()->user()
    ]);
}