Coder Social home page Coder Social logo

erhanurgun / demo-laravel-weather-api-ile-hava-durumu Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 265 KB

Weather API ile gelistirilen hava durumu gosterme projesi

Home Page: https://erho.dev/examples/wather-api

License: MIT License

PHP 75.70% JavaScript 0.19% Blade 24.10% CSS 0.01%
laravel laravel-example laravel-framework wather-api

demo-laravel-weather-api-ile-hava-durumu's Introduction

Laravel Logo

Weather API ile Hava Durumu

  • Laravel 10.x ve Weather API kullanılarak geliştirilmiştir.
  • Weather API için OpenWeather kullanılmıştır.

Kurulum

1. Projeyi klonlayın:

git clone https://github.com/erhanurgun/LARA19-weather-api-ile-hava-durumu.git lara-weather-app

2. Composer paketlerini yükleyin:

composer install

3. .env dosyasını oluşturun:

cp .env.example .env

4. Uygulama anahtarı oluşturun:

php artisan key:generate

4. .env dosyasını kendinize göre düzenleyin:

APP_NAME="Weather API ile Hava Durumu"
APP_URL=http://localhost:8000
APP_TIMEZONE=Europe/Istanbul
APP_LOCALE=tr
APP_FAKER_LOCALE=tr_TR

WEATHER_API_KEY=
WEATHER_API_URL=https://api.openweathermap.org/data/2.5

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

5. Veritabanı tablolarını oluşturun:

php artisan migrate

6. Uygulamayı çalıştırın:

php artisan serve
# veya
php artisan serve --host=laravel.test --port=8000
# veya
php -S localhost:8000 -t public
  • NOT: Eğer laravel.test şeklinde erişmek isterseniz;
    • Windows için C:\Windows\System32\drivers\etc\hosts dosyasına 127.0.0.1 laravel.test satırını ekleyin.
    • Linux için /etc/hosts dosyasına 127.0.0.1 laravel.test satırını ekleyin.
    • Mac için /private/etc/hosts dosyasına 127.0.0.1 laravel.test satırını ekleyin.

7. Uygulamaya tarayıcı üzerinden erişin:

http://localhost:8000
# veya
http://laravel.test

Kullanım Örneği

  • Ülke için:
http://laravel.test/weather?lang=en&cityOrCountry=Turkey
  • Şehir için:
http://laravel.test/weather?lang=tr&cityOrCountry=Ağrı
  • NOT: lang parametresi opsiyoneldir. Varsayılan değeri trdir.

Ekran Görüntüleri

Ülke İçin Hava Durumu Şehir İçin Hava Durumu JSON Çıktısı

Kullanılan Paket


Daha fazla bilgi için bu adresleri ziyaret edebilirsiniz:

demo-laravel-weather-api-ile-hava-durumu's People

Contributors

erhanurgun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.