diff --git a/.env.example b/.env.example deleted file mode 100644 index a0701a99..00000000 --- a/.env.example +++ /dev/null @@ -1,48 +0,0 @@ -APP_NAME=Laravel -APP_ENV=local -APP_KEY= -APP_DEBUG=true -APP_URL=http://localhost - -LOG_CHANNEL=stack - -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=laravel -DB_USERNAME=root -DB_PASSWORD= - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -QUEUE_CONNECTION=sync -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_MAILER=smtp -MAIL_HOST=smtp.mailtrap.io -MAIL_PORT=2525 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS=null -MAIL_FROM_NAME="${APP_NAME}" - -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" - -JWT_SECRET= diff --git a/app/Classes/Modules/Wallets/ControllersLogic/CreateWalletLogic.php b/app/Classes/Modules/Wallets/ControllersLogic/CreateWalletLogic.php index bc0803d8..d0401218 100644 --- a/app/Classes/Modules/Wallets/ControllersLogic/CreateWalletLogic.php +++ b/app/Classes/Modules/Wallets/ControllersLogic/CreateWalletLogic.php @@ -84,7 +84,7 @@ class CreateWalletLogic extends AbstractControllerLogic DB::beginTransaction(); - $object = new WalletObject($request->input('currency'), $request->input('company_id'), $this->generatesWalletCode->execute()); + $object = new WalletObject($request->input('currency_id'), $request->input('company_id'), $this->generatesWalletCode->execute()); $this->canCreateCompanyWallet->passes($object); diff --git a/app/Classes/Modules/Wallets/DataTransferObjects/WalletObject.php b/app/Classes/Modules/Wallets/DataTransferObjects/WalletObject.php index e24fe2f9..29924744 100644 --- a/app/Classes/Modules/Wallets/DataTransferObjects/WalletObject.php +++ b/app/Classes/Modules/Wallets/DataTransferObjects/WalletObject.php @@ -11,7 +11,7 @@ class WalletObject implements DataTransferObject private $company_id; /** @var int */ - private $currency; + private $currency_id; /** @var int */ private $code; @@ -25,7 +25,7 @@ class WalletObject implements DataTransferObject public function __construct(int $company_id, int $currency, int $code) { $this->company_id = $company_id; - $this->currency = $currency; + $this->currency_id = $currency; $this->code = $code; } @@ -42,7 +42,7 @@ class WalletObject implements DataTransferObject */ public function getCurrency(): int { - return $this->currency; + return $this->currency_id; } /** diff --git a/app/Classes/Modules/Wallets/Services/CreatesWallet.php b/app/Classes/Modules/Wallets/Services/CreatesWallet.php index c76113c7..720049cb 100644 --- a/app/Classes/Modules/Wallets/Services/CreatesWallet.php +++ b/app/Classes/Modules/Wallets/Services/CreatesWallet.php @@ -17,7 +17,7 @@ class CreatesWallet extends AbstractUpdateRecord $model = new Wallet(); $model->company_id = $object->getCompanyId(); $model->code = $object->getCode(); - $model->currency = $object->getCurrency(); + $model->currency_id = $object->getCurrency(); return $this->handler($model); diff --git a/app/Classes/Modules/Wallets/Standards/Validators/CompanyWalletValidation.php b/app/Classes/Modules/Wallets/Standards/Validators/CompanyWalletValidation.php index 5d4cea89..5bd1f698 100644 --- a/app/Classes/Modules/Wallets/Standards/Validators/CompanyWalletValidation.php +++ b/app/Classes/Modules/Wallets/Standards/Validators/CompanyWalletValidation.php @@ -16,7 +16,7 @@ class CompanyWalletValidation extends AbstractValidation { return [ 'company_id' => $object->getCompanyId(), - 'currency' => $object->getCurrency(), + 'currency_id' => $object->getCurrency(), ]; } @@ -27,7 +27,7 @@ class CompanyWalletValidation extends AbstractValidation { return [ 'company_id' => 'required', - 'currency' => 'required', + 'currency_id' => 'required', ]; } diff --git a/app/Http/Resources/WalletResource.php b/app/Http/Resources/WalletResource.php index 567e5db0..37ff5dbd 100644 --- a/app/Http/Resources/WalletResource.php +++ b/app/Http/Resources/WalletResource.php @@ -17,7 +17,7 @@ class WalletResource extends JsonResource return [ 'id' => $this->id, 'code' => $this->code, - 'currency' => $this->currency, + 'currency_id' => $this->currency_id, 'amount' => (double) $this->amount, 'company_id' => (int) $this->company_id ]; diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 00000000..911a7b8b --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,7 @@ +include.path=${php.global.include.path} +php.version=PHP_70 +source.encoding=UTF-8 +src.dir=. +tags.asp=false +tags.short=false +web.root=. diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 00000000..05ea1cf9 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.php.project + + + laravel + + + diff --git a/routes/wallet.php b/routes/wallet.php index b80135ce..3c63ac88 100644 --- a/routes/wallet.php +++ b/routes/wallet.php @@ -2,7 +2,7 @@ use Illuminate\Support\Facades\Route; -Route::group(['prefix' => 'wallet', 'namespace' => 'Wallet', 'as' => 'wallet.'], function () { +Route::group(['prefix' => 'wallets', 'namespace' => 'Wallets', 'as' => 'wallet.'], function () { Route::post('/create', 'CreateWalletController@create')->name('create');