Middleware and Component in Laravel app

Middleware and component are two handy tricks in Laravel to break down coding in simple re-useable chucks of code. ‘Middleware’ belongs to back-end side whereas ‘component’ is related to front-end side. As we have UI components like button, message pop-up, modal etc. which can be reused anywhere in layout, middleware represents a chunk of re-useable … Read more

Simple user roles in Laravel app

It’s a common requirement for web-apps to have some kind of user roles defined. Although there are purpose-built packages for incorporating roles and permissions in Laravel app (e.g. Spatie Laravel-permission), however, in most of the cases the user roles requirement is as simple as categorizing users in different groups such as Admin, Manager, User etc. … Read more

Using through() function in Laravel to manipulate collection

In this tutorial we’ll look into through() function for manipulating data inside Laravel collection. As we’ve seen in previous article that map() and filter() are two important functions which are used to manipulate and filter data of a collection. However, these functions return Collection type and Collection does not have paginate() function (well, we need … Read more

Laravel collection manipulation, filtering and pagination

In this tutorial we’ll look into a couple of important functions to manipulate or filter out data from a Laravel collection along with their impact on pagination. First, we’ll setup a Laravel 9 app with relevant data, routes and view, then we’ll use collection’s map() and filter() functions to demonstrate their functionality and pagination behavior … Read more

Using faker in Laravel 9 to generate test / dummy data

It’s obviously cumbersome to enter all the data in the tables in your app for testing purposes. That’s where factories and faker come handy in generating tons of data on the fly. So, in this tutorial we’ll use factory and faker in Laravel 9 in order to generate fake / dummy data for testing purposes. … Read more

Top programming languages 2022-2025

This article will highlight what actually matters right now and how programming languages landscape is shaping up in shorter to medium term. The article will only cover the real programming languages, therefore just set aside HTML, CSS, SQL, Bash / shell script etc. for a while. So, without further ado, let’s go! Here are top … Read more

Data Analysis using Python – A Quick Exercise

Let’s start data analysis with Python right away. Open up the browser and enter following URL: https://www.anaconda.com/products/distribution Press on Download button. After download is complete, open the Downloads folder in your computer and find the file named Anaconda3… now start installation. Just click Next on each screen. Once installation in finished, press Start button of … Read more

Simple search in Laravel 9 app using Livewire

In previous article we employed Fetch API to make AJAX calls from within Alpine.js in order to dynamically update the data table from backend database. Now let’s make life easier by introducing Livewire. In this article, we’ll incorporate simple search capability utilizing Livewire component in Laravel 9 app. So, let’s buckle up! Laravel 9.x requires … Read more

AJAX search field in Laravel 9 app using Alpine.js

What we learned in previous article is simple search within the data which is already available to client; let’s up the ante and employ Fetch API to make AJAX calls from within Alpine.js in order to dynamically update the data table from backend database. Laravel 9.x requires a minimum PHP version of 8.0. This tutorial … Read more

Simple search in Laravel 9 app using Alpine.js

In this tutorial we’ll build simple search / filter capability using Alpine.js in a Laravel 9 app, so that when you start typing in the search input field, the data presented in the data table is filtered in accordance with the input. Laravel 9.x requires a minimum PHP version of 8.0. This tutorial assumes that … Read more