Created
March 6, 2019 10:07
-
-
Save jakewtaylor/49486a238c2c032dee742bfd021be622 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This will still be mutable | |
*/ | |
use Carbon\Carbon; | |
$date = Carbon::now(); | |
/* | |
* This will also still be mutable - it's just an alias Laravel provides | |
*/ | |
use Illuminate\Support\Carbon; | |
$date = Carbon::now(); | |
/* | |
* This will get us an immutable date object | |
*/ | |
use Illuminate\Support\Facades\Date; | |
$date = Date::now(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment