https://github.com/grohiro/laravel-now
Change datetime of Laravel application at runtime
https://github.com/grohiro/laravel-now
Last synced: 24 days ago
JSON representation
Change datetime of Laravel application at runtime
- Host: GitHub
- URL: https://github.com/grohiro/laravel-now
- Owner: grohiro
- Created: 2020-01-16T05:42:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T10:20:02.000Z (over 3 years ago)
- Last Synced: 2025-02-24T01:48:25.783Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel-Now
## Install
```sh
$ composer config repositories.laravel-now vcs https://github.com/grohiro/laravel-now
$ composer require grohiro/laravel-now dev-master
```
## Usage
Standalone Server
```sh
$ LARAVEL_NOW="1999-7-31 23:59:59" php artisan serve
```
Command
```sh
$ LARAVEL_NOW=1999-12-31 php artisan app:command
$ LARAVEL_NOW=yesterday php artisan app:daily-job
```
Tinker
```sh
$ LARAVEL_NOW="1999-7-31 23:59:59" php artisan tinker
Psy Shell v0.9.12 (PHP 7.2.9 — cli) by Justin Hileman
>>> \Carbon\Carbon::now()
=> Carbon\Carbon @933465599 {#3004
date: 1999-07-31 23:59:59.0 UTC (+00:00),
}
>>>
```