From 5baaf5c7bff0a72ae49982d1550b408835cfd247 Mon Sep 17 00:00:00 2001 From: Iman Date: Fri, 15 Dec 2023 18:35:35 +0330 Subject: [PATCH 1/3] Create check_imports.yml --- .github/workflows/check_imports.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/check_imports.yml diff --git a/.github/workflows/check_imports.yml b/.github/workflows/check_imports.yml new file mode 100644 index 0000000..25c56e2 --- /dev/null +++ b/.github/workflows/check_imports.yml @@ -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 From 4d969acf9c2dcf875c1fdd4cb93ec33938ddffa3 Mon Sep 17 00:00:00 2001 From: Iman Date: Fri, 15 Dec 2023 18:38:37 +0330 Subject: [PATCH 2/3] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b5f6bf8..3b503da 100644 --- a/composer.json +++ b/composer.json @@ -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" From f4cae2ae4cac9cb0541bdb471cbbcb85e2ad5c9b Mon Sep 17 00:00:00 2001 From: Iman Date: Fri, 15 Dec 2023 18:46:50 +0330 Subject: [PATCH 3/3] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3ac2671..9517cb6 100644 --- a/README.md +++ b/README.md @@ -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 @@ -27,9 +29,7 @@ | x.x | | | | | | | -## Installation - - +## Installation: - **Step 1:** You can install the package via composer: @@ -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 @@ -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;