laravel resource set status code

Solutions on MaxInterview for laravel resource set status code by the best coders in the world

showing results for - "laravel resource set status code"
Valentin
13 Apr 2018
1use App\User;
2use App\Http\Resources\User as UserResource;
3
4Route::get('/user', function () {
5    return (new UserResource(User::find(1)))
6               ->response()
7               ->setStatusCode(200);
8});