Download the PHP package shamithewebdeveloper/laravel-nytimes-api without Composer
On this page you can find all versions of the php package shamithewebdeveloper/laravel-nytimes-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-nytimes-api
Laravel NYTimes API Package
A lightweight Laravel package to easily integrate the New York Times API into your Laravel applications. Fetch the latest news, articles, and top stories directly from NYTimes with simple and elegant syntax.
🚀 Features
- Simple integration with the New York Times API
- Supports Top Stories, Most Popular, and Article Search endpoints
- Built-in Facade (NYTimes) and helper methods
- Powered by GuzzleHTTP for secure API requests
- Compatible with Laravel 8, 9, 10, 11, and 12
📦 Installation
🔧 Configuration
-
Publish the config file:
- Add your NYTimes API Key(Public Key) in .env:
NYTIMES_API_KEY=your_api_key_here
-
Add this to the service provider:
- If you want to use the NYTimes directly in view files (Optional):
Add this to app/config.php (For Laravel 8,9, and 10)
For Laravel 11 or greater, add this to app/Providers/AppServiceProvider.php in register() function
📝 Usage
Retrive Data From API
Get a full response from GuzzleHttp
Get API Request URL
For the views
Examples
For Article Search:
For Archive:
For Most Popular:
For Books (Overview)
For Books (List)
For Times Newswire
For Times Newswire (Get News By URL)
Get News Sections
For Top Stories
For RSS
📌 Requirements
PHP >= 7.4
Laravel 8, 9, 10, 11 or 12
NYTimes API Key (Free – Get one here (https://developer.nytimes.com)
🤝 Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request to improve this package.
📜 License
This package is open-sourced software licensed under the MIT license.
All versions of laravel-nytimes-api with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0