Skip to content

Commit

Permalink
Merge pull request #3 from imanghafoori1/main
Browse files Browse the repository at this point in the history
Add import checker to github actions - update composer
  • Loading branch information
HPWebdeveloper authored Dec 15, 2023
2 parents b2ce4ed + f4cae2a commit 62d0141
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check_imports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check Imports

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Check Imports
run: ./vendor/bin/check_imports
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
[![Latest Version on Packagist](https://img.shields.io/packagist/v/hpwebdeveloper/laravel-pay-pocket.svg?style=flat-square)](https://packagist.org/packages/hpwebdeveloper/laravel-pay-pocket)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/hpwebdeveloper/laravel-pay-pocket/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/hpwebdeveloper/laravel-pay-pocket/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/hpwebdeveloper/laravel-pay-pocket/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/hpwebdeveloper/laravel-pay-pocket/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Imports](https://github.com/HPWebdeveloper/laravel-pay-pocket/actions/workflows/imports.yml/badge.svg?branch=main)](https://github.com/HPWebdeveloper/laravel-pay-pocket/actions/workflows/imports.yml)


**Laravel Pay Pocket** is a package designed for Laravel applications, offering the flexibility to manage multiple wallet types within two dedicated database tables, `wallets` and `wallets_logs`.

**Note:** This package does not handle payments from payment platforms, but instead offers the concept of virtual money, deposit and withdraw.
**Note:** This package does not handle payments from payment platforms, but instead offers the concept of virtual money, deposit, and withdrawal.

* **Author**: Hamed Panjeh
* **Vendor**: hpwebdeveloper
Expand All @@ -27,9 +29,7 @@
| x.x | | | | | | |


## Installation


## Installation:

- **Step 1:** You can install the package via composer:

Expand Down Expand Up @@ -57,7 +57,7 @@ This command will automatically publish the `WalletEnums.php` file into your app

### Prepare User Model

To use this package you need to implements the `WalletOperations` into `User` model and utlize the `ManagesWallet` trait.
To use this package you need to implement the `WalletOperations` into `User` model and utilize the `ManagesWallet` trait.

```php

Expand All @@ -74,7 +74,7 @@ class User extends Authenticatable implements WalletOperations

In Laravel Pay Pocket, you have the flexibility to define the order in which wallets are prioritized for payments through the use of Enums. The order of wallets in the Enum file determines their priority level. The first wallet listed has the highest priority and will be used first for deducting order values.

For example, consider the following wallet types defined in the Enum class (published in the step 3 of installation):
For example, consider the following wallet types defined in the Enum class (published in step 3 of installation):
```php
namespace App\Enums;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"imanghafoori/php-imports-analyzer": "1.0.*",
"spatie/laravel-ray": "^1.26"
},
"autoload": {
"psr-4": {
"HPWebdeveloper\\LaravelPayPocket\\": "src/",
"HPWebdeveloper\\LaravelPayPocket\\": "src/",
"HPWebdeveloper\\LaravelPayPocket\\Database\\Factories\\": "database/factories/",
"HPWebdeveloper\\LaravelPayPocket\\Tests\\Database\\Factories\\": "tests/database/factories"
Expand Down

0 comments on commit 62d0141

Please sign in to comment.