Skip to content

Commit 13f2ce8

Browse files
committed
remove nesbot/carbon
1 parent 75bc75c commit 13f2ce8

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
### Removed
1919
- Strong typing (models, interfaces, etc.)
2020
- all deprecated methods are removed
21+
- `nesbot/carbon` is no longer needed for the library to work
2122

2223
## [4.2.0] - 2020-03-08
2324

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"php": "^7.2|^8.0",
2929
"ext-pdo": "*",
3030
"illuminate/database": "^6.0|^7.0",
31-
"nesbot/carbon": "^2.0",
3231
"doctrine/dbal": "^2.8",
3332
"ramsey/uuid": "^3.0"
3433
},

database/migrations_v2/2018_11_15_124230_create_wallets_table.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
use Bavix\Wallet\Models\Transaction;
44
use Bavix\Wallet\Models\Wallet;
5-
use Carbon\Carbon;
65
use Illuminate\Database\Eloquent\Collection;
76
use Illuminate\Database\Migrations\Migration;
87
use Illuminate\Database\Schema\Blueprint;
@@ -48,8 +47,8 @@ public function up(): void
4847
->selectRaw('? as name', [$default])
4948
->selectRaw('? as slug', [$slug])
5049
->selectRaw('sum(amount) as balance')
51-
->selectRaw('? as created_at', [Carbon::now()])
52-
->selectRaw('? as updated_at', [Carbon::now()])
50+
->selectRaw('? as created_at', [DB::raw('now()')])
51+
->selectRaw('? as updated_at', [DB::raw('now()')])
5352
->groupBy('holder_type', 'holder_id')
5453
->orderBy('holder_type');
5554

0 commit comments

Comments
 (0)