June 3, 2020 — VS Code extensions are a great way to enhance the experience of the already great editor of recent times. I tend to experiment different sort of extensions which can improve my workflow or help me fix some of the pain points.
June 2, 2020 — There comes a scenario when you might want to check which operating system the device is running. For instance, when you want to set device-specific download links. For windows,
.exe file, for macOS,
.dmg file and so on.
June 1, 2020 — With PHP 5, the core team had introduced type declarations (also known as type-hinting) that allow functions to require that parameters are of a certain type at call time. If the given value is of the incorrect type, then an error is generated: in PHP 5, this will be a recoverable fatal error, while PHP 7 will throw a TypeError exception.
May 31, 2020 — Sometimes, all you want to do is a custom type populated with a set of predefined strings which can be used to restrict a variable to only have values from this set of strings.
May 28, 2020 — The usual way of validating request attributes in Laravel is by making
Illuminate\Support\Facades\Validator instance with your static rules that never change like so.
May 27, 2020 — In TypeScript, you assign types to variables and function parameters to catch type related errors early, even before you run the code. But TypeScript doesn’t warn you when you assign
undefined to the variables of common types.
May 21, 2020 — If you’re using GitHub repository’s web URL as its remote and if you’ve two-factor authentication turned on for your account, you’re going to face an issue in authenticating your account while doing certain git actions such as
May 20, 2020 — Laravel comes with a multitude of ways to validate request parameters. For instance, you could use
Illuminate\Http\Request’s validate method where you can specify all the fields that you would want to get validated inside controller’s action. You can do it like so.
Follow me elsewhere