PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
No Result
View All Result
Home Web Dev

Time Travel PHP Library – Laravel News

May 24, 2020
in Web Dev
274 18
Time Travel PHP Library – Laravel News


Travel is a small PHP library by Rachid Laasri that wraps around Carbon PHP to help you travel to a specific point in time and back again in a simple, readable way.

Just released a small PHP package to help you work with dates in your tests.

Check it out: https://t.co/kVC66l0oiw pic.twitter.com/qEreDSWHCo

— Rachid Laasri (@RashidLaasri) May 17, 2020

The readme outlines the usage, which is designed to be simple and readable:

Travel::to('November 5, 1955');

// Stop Biff

// Get back to the future
Travel::to('October 26, 1985');

My favorite example is running some time-sensitive code in a closure, and then time goes back to the current date after the closure executes:

Travel::to('-5 minutes', function() {
    // Do something.
});

If you start time traveling, make sure you come back to avoid disrupting the time-space continuum:

Travel::back();

You can learn more about this package, get full installation instructions, and view the source code on GitHub at rashidlaasri/travel.

Filed in:
News





Source link

Share219Tweet137Share55Pin49

Related Posts

On Auto-Generated Atomic CSS | CSS-Tricks
Web Dev

On Auto-Generated Atomic CSS | CSS-Tricks

Robin Weser’s “The Shorthand-Longhand Problem in Atomic CSS” in an interesting journey through a tricky problem. The point is...

January 15, 2021
How to Add Commas Between a List of Items Dynamically with CSS
Web Dev

3 Approaches to Integrate React with Custom Elements

In my role as a web developer who sits at the intersection of design and code, I am drawn...

January 15, 2021
Community Resources, Weekly Newsletter, And Boosting Skills Online — Smashing Magazine
Web Dev

Smashing Workshops & Audits — Smashing Magazine

About The AuthorJuggling between three languages on a daily basis, Iris is known for her love of linguistics, arts,...

January 15, 2021
4 Lessons Web App Designers Can Learn From Google — Smashing Magazine
Web Dev

The Report — Smashing Magazine

About The AuthorSuzanne Scacca is a former WordPress implementer, trainer and agency manager who now works as a freelance...

January 15, 2021
Next Post
Setting TypeScript For Modern React Projects Using Webpack And Babel — Smashing Magazine

Can Data Visualization Improve The Mobile Web Experience? — Smashing Magazine

web.dev at I/O 2019

web.dev at I/O 2019

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Rendering Spectrum | CSS-Tricks

Rendering Spectrum | CSS-Tricks

November 25, 2020
What is Developer Experience (DX)?

What is Developer Experience (DX)?

June 16, 2020
How to import arcade fonts as sprites [spectrum]

How to import arcade fonts as sprites [spectrum]

October 25, 2020
Auto-growing inputs

Auto-growing inputs

May 25, 2020

Categories

  • AWS
  • Big Data
  • Database
  • DevOps
  • IoT
  • Linux
  • Web Dev
No Result
View All Result
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In