Download the PHP package mariale098/quotes without Composer
On this page you can find all versions of the php package mariale098/quotes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mariale098/quotes
More information about mariale098/quotes
Files in mariale098/quotes
Package quotes
Short Description A Laravel package for interacting with the DummyJSON Quotes API
License MIT
Informations about the package quotes
Mariale098 Quotes Package
A Laravel package for interacting with the DummyJSON Quotes API. This package provides a simple way to fetch and display quotes with caching and rate limiting.
Installation
-
Create a new Laravel project:
-
Install the package via Composer:
-
Publish the configuration file:
-
Publish the assets:
-
Publish the quotes-styles:
- Configure your Laravel project's
.envfile with the following settings:
These settings are essential for the proper functioning of the quotes package, as they:
- Enable session management for user interactions
- Provide caching capabilities for API responses
- Ensure synchronous processing of quote operations
Usage
API Endpoints
The package provides the following API endpoints:
GET /api/quotes/random- Fetches a random quote from the APIGET /api/quotes- Retrieves a paginated list of quotes (supportslimitandskipparameters)GET /api/quotes/{id}- Gets a specific quote by its ID
Vue Component Integration
The package includes a Vue.js component for displaying quotes. Follow these steps to integrate it into your application:
-
Update your
welcome.blade.phpview to include the Vue app container and necessary assets: -
Import and mount the component in your
resources/js/app.js: -
Configure Vite by updating your
vite.config.js: -
Install Vue.js dependencies and build the assets:
- Start the Laravel development server to test your application:
Features
- Random Quote Display: Shows a random quote that changes on page reload
- Quote Search: Search for quotes by their ID
- Paginated Quotes List: Browse through quotes with pagination
- Error Handling: User-friendly error messages
- Responsive Design: Mobile-friendly interface
- Caching: Built-in caching for API responses
- Rate Limiting: Protection against API abuse
Configuration
Customize the package behavior by modifying the config/quotes.php file:
Author
Maria Alejandra Garcia Raiola ([email protected])
All versions of quotes with dependencies
illuminate/support Version ^12.0
guzzlehttp/guzzle Version ^7.0
illuminate/cache Version ^12.0