Tutorial

Flatten Array using Arr::flatten() in Laravel

This tutorial explains with syntax and an example of how to flatten a multi-dimensional array based on the value of depth specified in the Laravel framework.

An Intro to HTML <kbd> Tag

Use the HTML kbd semantic tag instead of code tag to denote our text as a keyboard input. Great for preparing documentations...

How To Reset An HTML Form With JavaScript

JavaScript allows us to programmatically reset an HTML form. This tutorial explains with an example of how to do it with vanilla or pure JavaScript.

How To Move Record From One Table To Another In Laravel

This tutorial explains with an example of how to move a record from one database table to another in PHP Laravel framework.

How To Drop Composite Indexes With Migration In Laravel

This tutorial explains how to create and drop composite keys with migration in PHP Laravel framework with syntax and example

How To Create Composite Indexes With Migration In Laravel

This tutorial explains how to create composite keys with migration in PHP Laravel framework with syntax and example

Ways to declare unsigned columns in the Laravel migrations

Laravel allows developers to declare unsigned columns in different ways. As it's required to handle the relationship between tables by just associating models with each other.

How to create collapsible content using HTML5 details tag

HTML5 provides <details>...</details> tag for the purpose of show and hide the contents on demand. Instead of showing large content on single page where user has to scroll explicitly, details widget comes handy to decrease your view length and looks much cleaner

How To Change Model Default Timestamps Column Names In Laravel

There will be a situation where you’ve to continue using your old or legacy database which might differ with Laravel’s way of naming column names in tables. Laravel provides few default timestamps fields such as created_at, updated_at and deleted_at.

How to build query string from an array with http_build_query in PHP

PHP has built in function http_build_query that can be used to prepare a query string from an array. Instead of explicitly appending elements to string, this function comes handy, which takes cares of generating URL-encoded query string either from an associative or indexed array.

How to build query string from an array using Laravel helper

Laravel provide a helper Arr::query() to build query string from an array, an alternative to core php http_build_query() method. Tested with Laravel versions 5.8, 6 and 7. Kindly check for your version on official helpers page.

Short Circuit Conditionals With Logical OR(||) Operator - JavaScript

The main purpose of short circuiting is to stop the further execution of a program based on boolean operations. For Logical OR(||) operator, if the true value of an expression has already been determined, than the further execution will not continue.