Skip to content

Commit

Permalink
fix add config method
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Nov 6, 2024
1 parent 6dd566d commit ae6dfad
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 7 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@
Cash on delivery (COD) is a type of transaction in which the recipient makes payment for a good at the time of delivery. If the purchaser does not make payment when the good is delivered, the good is returned to the seller. The COD method is used by many businesses that sell goods through a catalog or online.




# How to Install


```
NexaMerchant\CheckoutCod\Providers\CheckoutCodServiceProvider::class,
```
Add it to config/app.php $providers

# How to Publish
# How to Install with Composer

```
composer require nexa-merchant/checkoutcod
```
```

# How to Publish the Config file

```bash
php artisan vendor:publish --provider="NexaMerchant\CheckoutCod\Providers\CheckoutCodServiceProvider"
```

10 changes: 8 additions & 2 deletions src/Config/CheckoutCod.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
*
* The version of the package
*/
'version' => '1.0.3',
'version' => '1.0.4',
/**
*
* The version number of the package
*/
'versionNum' => '103',
'versionNum' => '104',

/**
*
Expand Down Expand Up @@ -85,4 +85,10 @@
'email' => '[email protected]',
'issues' => 'https://github.com/xxl4'
],

/**
*
* financial_status pending
*/
'financial_status' => 'pending',
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
//
Schema::create("orders_cod", function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger("order_id")->comment("Order ID");
// add create and update datetime
$table->timestamps();
$table->foreign("order_id")->references("id")->on("orders")->onDelete("cascade");
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::dropIfExists("orders_cod");
}
};

0 comments on commit ae6dfad

Please sign in to comment.