A simple weather application built with Laravel 10 that utilizes the OpenWeather API to provide real-time weather information.
- Current Weather: Get the current weather conditions for a specific location.
- Forecast: Retrieve a 5-day weather forecast for a given location.
- PHP >= 7.4
- Composer
- Laravel CLI
-
Clone the repository:
git clone https://github.com/your-username/your-weather-app.git
-
Navigate to the project directory:
cd your-weather-app
-
Copy the .env.example file to .env and configure your API key:
cp .env.example .env
-
Open the .env file and set your OpenWeather API key:
OPENWEATHER_API_KEY=your-api-key
-
Run the migrations:
php artisan migrate
-
Serve the application
php artisan serve
Visit http://localhost:8000 in your browser.
Navigate to the home page. Enter the city name or coordinates. Click on the "Search" button to retrieve current conditions or forecasts.
Contributions are welcome! Feel free to open an issue or submit a pull request.