Download the PHP package naymyomhan/hello-cat without Composer
On this page you can find all versions of the php package naymyomhan/hello-cat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download naymyomhan/hello-cat
More information about naymyomhan/hello-cat
Files in naymyomhan/hello-cat
Package hello-cat
Short Description Package to get random cat images from internet 😺
License MIT
Informations about the package hello-cat
Hello Cat
A simple Laravel package to get random cat images. This package provides two main functions to retrieve a single cat image or multiple images with optional breed filters.
Installation
To install the package via Composer, use:
After installation, publish the configuration file to set up your API key:
Set your CAT_API_KEY in the .env file:(optional)
Usage
This package provides two main classes: Cat and CatGroup.
1. Get a Single Random Cat Image
You can use the Cat class to fetch a single random cat image.
Example JSON Response
2. Get Multiple Random Cat Images
The CatGroup class allows you to retrieve multiple random cat images with optional breed filtering.
Example JSON Response
Credits
This package uses The Cat API to fetch random cat images. A big thank you to them for providing such an awesome service!
Error Handling
The CatGroup class allows you to retrieve multiple random cat images with optional breed filtering.
License
This package is open-source software licensed under the MIT license.
Additional Notes
- Make sure to replace
"your-cat-api-key-here"with an actual API key from The Cat API. - Customize the package configuration as needed, especially if you have more environment settings.
This README.md file provides clear instructions for installation, configuration, and usage of the package's two functions.