Filter – High order function used to filter any array with the help of the callback function it uses same argument as map only difference is the return type is either true or false. It return type is true value…
Author: Bhaskar Chaudhary
What are Laravel View Composer?
Sometimes we need to pass similar type of data to different view files or partials and later changing them is a pain point as you have to change every single one of them, hence to fix this issue view composers…
What is Short-Circuit Evaluation in JS?
Logical operators (&&, ||, &, |) are used to reduce the complexity which can be used concisely. ANDoperator (&&) returns first false for false value and last true for true values. But, OR operator (||) returns first true for truely…
How to Require Function Parameter in JS?
In es6 default parameter were added which is a welcome change, but what if you want to throw error if a parameter was not provided. Well you can do it by calling a closure in default parameter which can throw…
How to get CLI Input in PHP?
Php Uses I/O Stream To Get input. So to get a input from user in cli. You can run the php file by opening your CMD in a Windows machine or Terminal in Linux based machine And Getting to the…
How to Install LAMP stack in linux?
LAMP stack consist of four layers: Linux – which you clearly have. Apache– Its a Free & open source web server software. MySql – It is a relational Database system. Php – Most commonly used Server side language To install…
What Are Linux distros?
Linux an open-source Unix inspired Operating system. It is typically packaged in Linux Distribution. Disto is IT vernacular of Distribution There are several Distros available with having a huge community support Some of which are Debian After being release in…
How to add Helper file in Laravel?
To create custom helpers.php file in laravel we need to edit composer.json file in laravel. In autoload object add the following file array:- After adding this we need to run the following command Make sure composer is installed. This will…
Types of Indexes In MongoDB.
Indexes in MongoDB are just like indexes in the book. Instead of going page by page in a Book one can get to any Topic by searching on the index. In MongoDB, these indexes are made of btree. These btree…
Laravel Group routing
For common prefixes in a url, Laravel uses url grouping. In the above route addresses abc.com/my-profile In GET and POST method you can use print GET route as :- And, POST route as:-