- User Authentication – Token-based authentication with Laravel Sanctum.
- Payments & Withdrawals – Handle user transactions, including deposits and withdrawals.
- Invoice Management – Handle invoices creation and edit.
- Balance Tracking – Update the user balances.
git clone https://github.com/YOUR_USERNAME/laravel-payments-manager.git
cd laravel-payments-manager
./vendor/bin/sail composer install
cp .env.example .env
./vendor/bin/sail artisan key:generate
./vendor/bin/sail artisan migrate --seed
./vendor/bin/sail up -d
This project uses Laravel Sanctum for authentication. To access protected routes, include a Bearer Token in the request header.
Authorization: Bearer YOUR_ACCESS_TOKEN
Method | Endpoint | Description |
---|---|---|
POST | /api/login | Log in and get a token |
POST | /api/logout | Log out and revoke token |
Method | Endpoint | Description |
---|---|---|
POST | /api/transactions | Create a payment or withdrawal |
GET | /api/transactions | Get user transactions |
Method | Endpoint | Description |
---|---|---|
POST | /api/invoices | Create an invoice |
GET | /api/invoices | List all invoices |
PUT | /api/invoices/{id} | Update an invoice |
DELETE | /api/invoices/{id} | Delete an invoice |
Method | Endpoint | Description |
---|---|---|
GET | /api/dashboard | Return user financial dashboard |
To run PHPUnit tests:
./vendor/bin/sail artisan test