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

Where is the documentation for using this package? #1

Open
marlongichie opened this issue Mar 22, 2015 · 1 comment
Open

Where is the documentation for using this package? #1

marlongichie opened this issue Mar 22, 2015 · 1 comment

Comments

@marlongichie
Copy link

No description provided.

@stevendesu
Copy link
Owner

stevendesu commented Mar 25, 2015

Good question. I haven't made any documentation yet (and you're welcome to help me build some if you'd like).

I'm brand new to Laravel and even newer to Composer, so as I was working on a project that required simple distance calculations using longitude and latitudes I saw it as a good opportunity to get more familiar with Composer. This was mostly a tool that I built for myself as a learning exercise, and posted on packagist to get a better understanding for how packagist works and how the submission process works.

As such I never sat down to write a documentation for it. If you're interested in a brief documentation for the time being, it's essentially:

  1. Add this package to your composer.json ("stevendesu/world-distance": "dev-master" -- if you can teach me how to publish official versions I would be appreciative because I would prefer "0.1.0" to "dev-master")
  2. Install the service provider (edit /config/app.php and add "Stevendesu\WorldDistance\WorldDistanceServiceProvider" to your service providers then add "WorldDistance" => "Stevenesu\WorldDistance\WorldDistanceFacade" to your facades)
  3. Run php artisan vendor:publish to copy the default config file (this specifies the radius of the earth and inherently specifies the desired units of the output)
  4. To use: WorldDistance::getDistance( [$lat1, $lng1], [$lat2, $lng2] ) within your app (will return the distance between two points on the globe)

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