Download the PHP package usamamuneerchaudhary/daftravel without Composer
On this page you can find all versions of the php package usamamuneerchaudhary/daftravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download usamamuneerchaudhary/daftravel
More information about usamamuneerchaudhary/daftravel
Files in usamamuneerchaudhary/daftravel
Package daftravel
Short Description Laravel package for Daftra API integration
License MIT
Informations about the package daftravel
Daftravel - Laravel Package for Daftra API
A comprehensive Laravel package for integrating with the Daftra API. This package provides a clean, fluent interface for all Daftra API endpoints including products, customers, invoices, purchases, payments, and more.
Features
- Complete API Coverage: All Daftra API endpoints are supported
- Laravel Integration: Native Laravel service provider and facade
- Error Handling: Comprehensive exception handling with specific error types
- Caching: Built-in caching support for GET requests
- Retry Logic: Automatic retry mechanism for failed requests
- Logging: Configurable request/response logging
- Testing: Full test coverage with PHPUnit
- Type Safety: Well-structured services with consistent interfaces
Installation
Install the package via Composer:
Publish the configuration file:
Configuration
Add your Daftra API credentials to your .env
file:
Usage
Using the Facade
Using Dependency Injection
Available Services
All services support the following basic CRUD operations:
all()
- Get all recordsfind($id)
- Find a specific record by IDcreate($data)
- Create a new recordupdate($id, $data)
- Update an existing recorddelete($id)
- Delete a recordpaginate($page, $limit)
- Paginate results
Note: Search functionality varies by endpoint. Some endpoints may support search via query parameters, while others may not. Check the official Daftra API documentation for endpoint-specific search capabilities.
Query Parameters
Common Parameters (Most Endpoints)
limit
- Number of records per page (integer [1..1000], default: 20)page
- Page number (integer >= 1, default: 1)
Path Parameters
format
- Format of the output (string, default: ".json") - Only for GET operations
Endpoint-Specific Parameters
Each endpoint may support additional parameters. Check the official Daftra API documentation for complete parameter lists.
Examples:
Note: The format parameter is automatically handled by the client for GET operations. All GET endpoints default to JSON format (.json
). POST, PUT, and DELETE operations do not use the format parameter.
Supported Endpoints
The following endpoints are supported by this package. Each endpoint supports basic CRUD operations (all, find, create, update, delete):
Endpoint | Service Method | Common Parameters |
---|---|---|
/products |
products() |
limit, page |
/clients |
customers() |
limit, page |
/invoices |
invoices() |
limit, page |
/categories |
categories() |
limit, page |
/suppliers |
suppliers() |
limit, page |
/stores |
stores() |
limit, page |
/purchases |
purchases() |
limit, page |
/payments |
payments() |
limit, page |
/expenses |
expenses() |
limit, page |
/reports |
reports() |
limit, page |
/users |
users() |
limit, page |
/taxes |
taxes() |
limit, page |
/currencies |
currencies() |
limit, page |
/price_lists |
priceLists() |
limit, page |
/inventory |
inventory() |
limit, page |
/transactions |
transactions() |
limit, page |
/client_appointments |
appointments() |
limit, page |
/follow_ups |
followUps() |
limit, page |
/notes |
notes() |
limit, page |
/time_tracking |
timeTracking() |
limit, page |
/work_orders |
workOrders() |
limit, page |
/credit_notes |
creditNotes() |
limit, page |
/refund_receipts |
refundReceipts() |
limit, page |
/client_payments |
clientPayments() |
limit, page |
/journals |
journals() |
limit, page |
/incomes |
incomes() |
limit, page |
/purchase_refunds |
purchaseRefunds() |
limit, page |
/stock_transactions |
stockTransactions() |
limit, page |
/treasuries |
treasuries() |
limit, page |
/client_attendance |
clientAttendance() |
limit, page |
/site_info |
siteInfo() |
limit, page |
/listing |
listings() |
limit, page |
Important: Each endpoint may support additional parameters beyond the common ones listed above. Always check the official Daftra API documentation for the complete list of parameters supported by each endpoint.
Products
Customers
Invoices
Categories
Suppliers
Stores
Purchases
Payments
Expenses
Reports
Users
Taxes
Currencies
Price Lists
Inventory
Transactions
Appointments
Follow-ups
Notes
Time Tracking
Work Orders
Credit Notes
Refund Receipts
Client Payments
Journals
Incomes
Purchase Refunds
Stock Transactions
Treasuries
Client Attendance
Site Info
Listings
Error Handling
The package provides specific exception classes for different error scenarios:
Configuration Options
The package provides extensive configuration options:
Testing
Run the tests with:
Or run PHPUnit directly:
Requirements
- PHP 8.2+
- Laravel 11.0+ or 12.0+
- Guzzle HTTP 7.0+
License
The MIT License (MIT). Please see License File for more information.
Contributing
Please see CONTRIBUTING.md for details.
Security
If you discover any security related issues, please email the author instead of using the issue tracker.
Credits
- Usama Muneer Chaudhary
- All Contributors
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
All versions of daftravel with dependencies
illuminate/support Version ^12.0
illuminate/http Version ^12.0
guzzlehttp/guzzle Version ^7.0