Download the PHP package meisam-mulla/laravel-openfda without Composer
On this page you can find all versions of the php package meisam-mulla/laravel-openfda. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download meisam-mulla/laravel-openfda
More information about meisam-mulla/laravel-openfda
Files in meisam-mulla/laravel-openfda
Package laravel-openfda
Short Description Simplified OpenFDA API for Laravel
License MIT
Informations about the package laravel-openfda
Laravel OpenFDA
The Laravel OpenFDA package simplifies accessing the openFDA APIs, allowing users to query the API with ease. While this package is designed to be used with Laravel, it can also be used independently.
You can use this API without an API key however you will be limited to 1,000 requests per day. You can get a free API key from openFDA directly
Installation
You can install the Laravel OpenFDA package via Composer by running the following command:
Usage
To use the Laravel OpenFDA package, follow the example below:
With Laravel
Without Laravel
Available Methods
The following methods are available for querying the openFDA APIs:
Method | Description |
---|---|
use(string $endpoint): OpenFDA |
Set the API endpoint to be used. |
search(string $query): OpenFDA |
Set the search query. |
sort(string $sort): OpenFDA |
Set the sorting criteria. |
count(int $count): OpenFDA |
Set the number of results to be counted. |
limit(int $limit): OpenFDA |
Set the maximum number of results to be returned. |
skip(int $skip): OpenFDA |
Set the number of results to skip. |
get(): stdClass |
Send the API request and retrieve the response. |
Available Endpoints
The Laravel OpenFDA package provides access to the following openFDA API endpoints:
Endpoint | Description |
---|---|
ANIMAL_DRUG_EVENT |
Animal and Veterinary Drug Event |
DRUG_EVENT |
Drug Event |
DRUG_LABEL |
Drug Label |
DRUG_NDC |
Drug NDC |
DRUG_ENFORCEMENT |
Drug Enforcement |
DRUG_FDA |
Drug FDA |
DEVICE_501K |
Device 510k |
DEVICE_CLASSIFICATION |
Device Classification |
DEVICE_ENFORCEMENT |
Device Enforcement |
DEVICE_EVENT |
Device Event |
DEVICE_PMA |
Device PMA |
DEVICE_RECALL |
Device Recall |
DEVICE_REGISTRATION |
Device Registration Listing |
DEVICE_COVID19 |
Device COVID-19 Serology |
DEVICE_UDI |
Device UDI |
FOOD_ENFORCEMENT |
Food Enforcement |
FOOD_EVENT |
Food Event |
TOBACCO_PROBLEM |
Tobacco Problem |
Configuration
To configure the package, you can set the OPENFDA_APIKEY
variable in your .env
file. If the variable is set, it will be included as an authorization header in the API requests.
You can use this API without an API key however you will be limited to 1,000 requests per day. You can get a free API key from openFDA directly
Contributing
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue on GitHub.
License
The Laravel OpenFDA package is open-source software licensed under the MIT license.
Acknowledgements
This package is built upon the openFDA APIs. We would like to express our gratitude to the openFDA team for providing this valuable resource.
Contact
If you have any questions or need further assistance, feel free to contact the package maintainer at [email protected].