Download the PHP package thatobabusi/laravel-lastfm without Composer
On this page you can find all versions of the php package thatobabusi/laravel-lastfm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thatobabusi/laravel-lastfm
More information about thatobabusi/laravel-lastfm
Files in thatobabusi/laravel-lastfm
Package laravel-lastfm
Short Description Last.fm API client for Laravel 7-13
License MIT
Homepage https://github.com/thatobabusi/laravel-lastfm
Informations about the package laravel-lastfm
**[๐ฆ Packagist](https://packagist.org/packages/thatobabusi/laravel-lastfm)** ยท **[๐ Docs](#documentation)** ยท **[๐ Changelog](docs/CHANGELOG.md)** ยท **[๐ Last.fm API](https://www.last.fm/api)**
A modern, type-safe Last.fm API client for Laravel 7-13. Built with fluent interfaces, full type hints, and dependency injection support.
Documentation
Features
API Integration
- Fluent interface for all major Last.fm API endpoints
- User statistics and track information retrieval
- Weekly and overall chart data
- Now-playing track detection
Laravel Integration
- Auto-registration via package discovery (Laravel 5.5+)
- Dependency injection support
- Configuration publishing
- Service provider binding
Developer Experience
- Full type hints and strict mode
- Chainable query builder pattern
- Per-request period and limit filtering
- Tested against Laravel 7, 8, 9, 10, 11, 12, and 13
Requirements
- PHP >= 7.4
- Laravel >= 7.0
- Guzzle HTTP Client 6 or 7
Installation
Install via Composer:
Configuration
Add your Last.fm API key to your .env file:
Or publish and customize the configuration file:
For Laravel versions prior to 5.5, manually register the service provider in config/app.php:
Usage
Basic Example
Inject the Lastfm class into your controller or service:
Available Methods
User Statistics
userTopAlbums(string $username)โ Get user's top albumsuserTopArtists(string $username)โ Get user's top artistsuserTopTracks(string $username)โ Get user's top tracksuserInfo(string $username)โ Get user profile informationuserRecentTracks(string $username)โ Get user's recent tracks
Real-time Data
nowListening(string $username)โ Get currently playing track (orfalse)
Weekly Charts
userWeeklyTopAlbums(string $username, DateTime $startdate)โ Get weekly top albumsuserWeeklyTopArtists(string $username, DateTime $startdate)โ Get weekly top artistsuserWeeklyTopTracks(string $username, DateTime $startdate)โ Get weekly top tracksuserWeeklyChartList(string $username)โ Get list of available weekly charts
Filtering Results
Chain methods to customize your queries:
Time Periods
Use these constants with the ->period() method:
Getting an API Key
Create a Last.fm account and generate an API key at: http://www.last.fm/api/account/create
API Documentation
For complete Last.fm API reference, see: http://www.last.fm/api
Testing
Copy phpunit.xml.dist to phpunit.xml and configure your Last.fm API key, then run:
๐ค Contributing
Issues and pull requests are welcome for bug fixes, features, and documentation.
Please see CODE OF CONDUCT for details.
๐ Security
If you discover a security vulnerability, please email [email protected] instead of using the issue tracker.
๐ License
Open-sourced software licensed under the MIT license.
Built with โค๏ธ for the Laravel community.

Please see CODE OF CONDUCT for details.
๐ License
Open-sourced software licensed under the MIT license.
Built with โค๏ธ for the Laravel community.

Built with โค๏ธ for the Laravel community.
All versions of laravel-lastfm with dependencies
guzzlehttp/guzzle Version ^6.0 || ^7.0
illuminate/support Version ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0