use AppUser; use AppHttpResourcesUser as UserResource; Route::get('/user', function () { return (new UserResource(User::find(1))) ->response() ->setStatusCode(200); });
php artisan make:resource ResourceName