In Laravel 5.5 We can set API through resources (https://laracasts.com/series/whats-new-in-laravel-5-5/episodes/20), but how can we send STATUS CODE?
Also how should I set status dynamically which is defined in with()
//namespace App\Http\Resources;
//use Illuminate\Http\Resources\Json\Resource;
//class User extends Resource
public function with($request)
{
return [
'status' => 'success',
];
}