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

Separate logic of spark command #9

Closed
Propaganistas opened this issue Aug 12, 2015 · 5 comments
Closed

Separate logic of spark command #9

Propaganistas opened this issue Aug 12, 2015 · 5 comments

Comments

@Propaganistas
Copy link
Contributor

Hi

Could you please split out the generation logic of the spark command into a separate class so that it can be called from elsewhere more easily?

I'm building a Laravel wrapper for Optimus.

Thanks.

@jenssegers
Copy link
Owner

You should be able to call the Symfony console command from Laravel since Laravel command are Symfony commands as well. You will need to require phpseclib/phpseclib though.

@Propaganistas
Copy link
Contributor Author

Yes, but the generated numbers aren't available directly as they are immediately being consumed and then echo'ed.

It would be practical to get access the generated numbers directly?

@jenssegers
Copy link
Owner

True, but the spark is just a small helper to get started using the library quicker. I will take a look if I can find a decent structure to extract that logic. You could copy the logic of the command as well, there's no super magic stuff happening there :)

@cviebrock
Copy link

@Propaganistas did you ever publish your Laravel wrapper for this? I was looking to do the same, but if you've already done my job for me ... 😉

@Propaganistas
Copy link
Contributor Author

@cviebrock Yes, take a look here:

https://github.com/Propaganistas/Laravel-FakeId

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

3 participants