PHP function is built in PHP function, that returns the values from a single column in the input array. Basically, return the single column of the array based on the provided by the program.
Sometimes your project needs to set default values to some fields if it’s not set from the form/another source. In Larvel there are two ways to set default values to the DB column.
How would you make sure a route parameter is always a numeric value. Most of the time an parameter will be an integer value. So today’s tutorial we will show how to globally constrain a parameter to a regular expression.
Introduction Microsoft frameworks are strongly considered for their security features. Some of the astonishing features include authentication-authorization management, HTTPS enforcement, error management with Global Exception Handling support in ASP.NET Core, CORS management, etc.
Adding a default current timestamp, in MySql via Laravel migration. $table->timestamp(‘created_at’)->default(DB::raw(‘CURRENT_TIMESTAMP’));
Why we need to use AlpineJS, a simple answer is to that is create a better experience. Over the years, we use jQuery to create an event listener on the button clicks, form submits, or other manipulations on the web page. It works perfectly for our requirements, but an imperative method ( asking the browser…Continue Reading
This post focused on the data that includes list of countries and country code in different formats such as sql, json, php etc. You can click on the download link to download the files Download Countries SQL File
One of the common debugging option still remains in PHP is to print the values in the browser using or .
Variable interpolation is adding a variable inside a string in PHP. The main thing to note is, PHP interpolation works only in double-quoted strings and the heredoc syntax. If you use interpolation inside a string with single quotes, it will just print back the same variable. In fact, the single-quoted string can not parse the interpolated…Continue Reading
Looking for top website ideas to make money online, you are in the right place to start with. It’s not rare that people searching online for the best website ideas to make money. In today’s world, everybody in need of creating a passive income, but so many of them found their steady passive income using…Continue Reading
Whether you want a blog, business website, sell online courses or an online store, you can create it using WordPress. WordPress is a content management system that allows users to develop websites. During its establishment, WP was a blog platform but has since become a global CMS for all users. So, as a web designer,…Continue Reading
Today’s tutorial I will show you how to work on ajax file upload with progress bar in Laravel. File uploads are pretty much everywhere in today’s web/mobile applications. For example, in Facebook profile users want to add a photo, or in twitter handle users want to show an event picture etc. Let’s start with create…Continue Reading
Thumbnail is the preview of an image, of a group of entities such as a movie, image gallery etc. The advantages of the thumbnail is, reduced size of image, when compared to the original image used to represent something. A website or app that has thumbnails will have faster page loads rather than showing the…Continue Reading
Most of the people working on the linux environment definitely stuck in this question, how to pass arguments in a bash/shell script. The good news is you can pass any number of arguments to your script while it is executed. In this article, I will show you how to pass an argument using Linux/Mac shell…Continue Reading
As like any other PHP frameworks Laravel has certain ways to filter the data by date. Let’s say you need to filter data set based on today. So I assume you have a field created_at in your database table. Consider this simple set of functions below, it fetches all the records dated today. Apparently, this…Continue Reading
This article helps you to create a custom helper function in Laravel. You may have noticed some functions in Larave do not need to import the classes, and it’s not attached with any class name, such as optional(), route() etc. These are so called helper functions.
Laravel Timezone is a great package by James Mills which sets users timezone in an application and show it based on their timezone. This package listens for the event and will automatically set a timezone on your user model. This brillaint package uses the torann/geoip package which looks up the users location based on their…Continue Reading
Secured URLs has a key role to secure your web application in many ways. In my opinion, you should always serve the content via a secure URL and this is one of many ways to prevent from exploits. Oftentimes, applications will have a secure URL and URL without HTTPS. So our application needs to decide…Continue Reading
I have faced a strange porblem that when I run command, it is not fetching all the remote branches available. In that case I am not able to checkout to other team member’s branches. In simple words fetch command in git doesn’t get all branches.
It’s very common thing that clearing cache when we have something wrong with our softwares and which is not only help to save space on the device, but to ensure smooth working of the software. Below are the steps you need to follow to clear the cache of the Microsoft Teams communication software. Right Click…Continue Reading
Today’s article, we will remove multiple elements by key in a PHP array. Using PHP we can delete multiple keys from an Array. In PHP there is no built in method to achieve this, but we can combine several PHP functions to achieve this. In this article we will be demonstrating two methods to remove…Continue Reading
Did you ever hit Enter, thinking of a new line in Microsoft Teams and send a half prepared message. If then this article is for you. It’s very normal that you will have to add multiple lines in your messages. Some people uses a different text editor to type the long message and copy paste…Continue Reading
Laravel comes with a lot of helper functions to interact with Database efficiently . There are Eloquent which composes an ORM model, and helps to write expressive relations and queries. But some cases that’s not enough, we have to have some raw queies need to write to achieve the results. So in this article we…Continue Reading
laravel.log is a file that contains logs from various actions in laravel framework. This file is usually located in To clear laravel.log you could use the below methods easily.
Problem When I ran just command on Ubuntu 20.04 LTS, it throws an error like below. But it was fine when I used .
Laravel’s Aritsan(command-line interface) is well known among developers as commands are always very handy to achieve results. Laravel is not different, comes with very good setup for extending their core command interface. In Laravel, commands are generally saved in the folder. In this article, you’ll learn how to create a custom command for artisan easily…Continue Reading
Using a proper piece of background music that perfectly matches the video is very helpful for creating a mood. The good news is that it is not a daunting task to add music to video. In this article, you will learn 2 simple methods to add background music, popular songs, or an audio recording, to…Continue Reading