lukapeharda.com
homenowprojectsarticlestiltalksabout

TIL

A collection of small tidbits of knowledge I learned developing software. Ones that are too short for an article but worth saving. Inspired by jbranchaud/til.

* TIL is an acronym for Today I Learned.

PHP

Advanced typed array types

Laravel

Easily raise validation error with custom message
Extend core Laravel bidings
Specify Columns While Eager Loading
Use CarbonInterval instead of magic numbers for setting up TTL
Use Builder::toBase method to return stdClass object from your query
Use Eloquent's Model::getChanges method to check for model changes
Easily dump or log DB queries
Request fingerprinting

MacOS

Have folders before files in Finder

React

useRef instead of useState hook for input fields
Use React Router NavLink component instead of Link to specify active navigation link

Twitter

Bookmark a tweet

VS Code

Allow VS Code to administer your computer
Usefull VSCode Keyboard Shortcuts

WordPress

Unit testing plugins using WP CLI