Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localized configurations #17

Open
robinwkurtz opened this issue Jun 21, 2018 · 5 comments
Open

Localized configurations #17

robinwkurtz opened this issue Jun 21, 2018 · 5 comments

Comments

@robinwkurtz
Copy link
Contributor

Hello! Thanks for the great package.

I was wondering if there was any interest in allowing the configuration to be local and therefore overwrite the global configuration. In my case I need to output multiple xml files with different template & rowNames.

Thanks!

@jailtonsc
Copy link
Owner

Hi, I'm sorry for the delay in answering, my computer is in trouble, I sent it to the concert.

Yes I have, could you develop and commit?

Att.

@robinwkurtz
Copy link
Contributor Author

Submitted a PR #18 to replace the class variables form private to protected so I can extend the XmlResponse class and override the construct function.

Thanks!

@jailtonsc
Copy link
Owner

Sorry for the delay, these days I'm without a computer at home.

I made the merge.

@robinwkurtz
Copy link
Contributor Author

No worries! Thanks for the merge :)

@jailtonsc
Copy link
Owner

Hello,

I made the local setting adjustment, make sure the setting suppresses your need.

You are in version 3.0

Example

$config = [
'template' => '',
'rowName' => 'name'
];

Route::get('/', function () {
return response()->xml(User::all(), 200, $config);
});

Att.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants