Trying to return a proper object from laravel controller to front end.