Skip to content

Commit

Permalink
Feature: Get rid of the addiction to Laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejehrlich committed Nov 24, 2022
1 parent 2af24b7 commit 8364e28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Basic usage of this package is simple. Here is an example.

```php
use Snadnee\ABOGenerator\ABOGenerator;
use Carbon\Carbon;

$senderParams = [
'bankAccount' => '11-123456789/0600',
Expand All @@ -17,7 +18,7 @@ $senderParams = [

$paymentGroups = [
'group1' => [
'dueDate' => now(),
'dueDate' => Carbon::now(),
'payments' => [
[
'amount' => 1.5,
Expand Down Expand Up @@ -54,6 +55,7 @@ Each payment has an amount, a variable, specific, constant symbol, a message and

```php
use Snadnee\ABOGenerator\ABOGenerator;
use Carbon\Carbon;

$ABOGenerator = new ABOGenerator('Company name');

Expand All @@ -62,7 +64,7 @@ $file->setSenderBank(0600);

$group = $file->addGroup();
$group->setSenderAccount(1234567890)
->setDate(now());
->setDate(Carbon::now());

// AccountNumber, amount, variable symbol
$group->addPayment("111-987654321/0300", 14323.43, 2220009813)
Expand Down
2 changes: 1 addition & 1 deletion src/ABOGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function setSecurityKey(string $fixed, string $securityCode): self
public function setDate(?string $date = null): self
{
if ($date == null) {
$date = now()->format('dmy');
$date = Carbon::now()->format('dmy');
}

$this->date = $date;
Expand Down

0 comments on commit 8364e28

Please sign in to comment.