diff --git a/README.md b/README.md new file mode 100644 index 0000000..0bb1281 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# Laravel Leaflet JS - Example + +This is an example project for [Leaflet JS](https://leafletjs.com){:target="_blank"} and [OpenStreetMap](https://www.openstreetmap.org){:target="_blank"} built with Laravel 5.7. + +![Laravel Leaflet JS Project Example](public/screenshots/leaflet-map-01.jpg) + +## Features + +In this project, we have an Outlet Management (CRUD) with localtion/coordinate point that shown in map. We also have coordinate entry with direct map pointing on Outlet Create and Edit form. + +## Installation Steps + +Follow this instructions to install the project: + +1. Clone this repo. `$ git clone git@github.com:nafiesl/laravel-leaflet-example.git` +2. `$ cd laravel-leaflet-example` +3. `$ composer install` +4. `$ cp .env.example .env` +5. Set **database config** on `.env` file +6. `$ php artisan key:generate` +7. `$ php artisan migrate` +8. `$ php artisan serve` +10. Open `https://localhost:8000` with browser. + +### Demo Records + +If we need some outlet demo records, we can use model factory within tinker: + +```bash +$ php artisan tinker +>>> factory(App\Outlet::class, 30)->create(); +``` + +### Leaflet config + +We have a `config/leaflet.php` file in this project. Set our zoom_level, and map center default coordinate here. + +```php + 13, + 'detail_zoom_level' => 16, + 'map_center_latitude' => '-3.313695', + 'map_center_longitude' => '114.590148', +]; +``` + +> Please not that this is not an official or required config file from Leaflet JS, it is just a custom config for this project. + +## Testing + +Run PHPUnit to run feature test: + +```bash +$ vendor/bin/phpunit +``` + +## License + +Copyright (C) 2018 Nafies Luthfi. +Please use and re-use however you want. diff --git a/public/screenshots/leaflet-map-01.jpg b/public/screenshots/leaflet-map-01.jpg new file mode 100644 index 0000000..fa277b5 Binary files /dev/null and b/public/screenshots/leaflet-map-01.jpg differ diff --git a/readme.md b/readme.md deleted file mode 100644 index 98a3e64..0000000 --- a/readme.md +++ /dev/null @@ -1,68 +0,0 @@ -

- -

-Build Status -Total Downloads -Latest Stable Version -License -

- -## About Laravel - -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as: - -- [Simple, fast routing engine](https://laravel.com/docs/routing). -- [Powerful dependency injection container](https://laravel.com/docs/container). -- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. -- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). -- Database agnostic [schema migrations](https://laravel.com/docs/migrations). -- [Robust background job processing](https://laravel.com/docs/queues). -- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). - -Laravel is accessible, yet powerful, providing tools needed for large, robust applications. - -## Learning Laravel - -Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of any modern web application framework, making it a breeze to get started learning the framework. - -If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 1100 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library. - -## Laravel Sponsors - -We would like to extend our thanks to the following sponsors for helping fund on-going Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell): - -- **[Vehikl](https://vehikl.com/)** -- **[Tighten Co.](https://tighten.co)** -- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** -- **[64 Robots](https://64robots.com)** -- **[Cubet Techno Labs](https://cubettech.com)** -- **[British Software Development](https://www.britishsoftware.co)** -- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** -- [UserInsights](https://userinsights.com) -- [Fragrantica](https://www.fragrantica.com) -- [SOFTonSOFA](https://softonsofa.com/) -- [User10](https://user10.com) -- [Soumettre.fr](https://soumettre.fr/) -- [CodeBrisk](https://codebrisk.com) -- [1Forge](https://1forge.com) -- [TECPRESSO](https://tecpresso.co.jp/) -- [Runtime Converter](http://runtimeconverter.com/) -- [WebL'Agence](https://weblagence.com/) -- [Invoice Ninja](https://www.invoiceninja.com) -- [iMi digital](https://www.imi-digital.de/) -- [Earthlink](https://www.earthlink.ro/) -- [Steadfast Collective](https://steadfastcollective.com/) -- [We Are The Robots Inc.](https://watr.mx/) -- [Understand.io](https://www.understand.io/) - -## Contributing - -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). - -## Security Vulnerabilities - -If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. - -## License - -The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).