What is middleware in laravel

In Laravel, middleware provides a mechanism to filter HTTP requests entering your application. It acts as a bridge between the incoming request and the application logic. Middleware can be used for tasks like authentication, logging, request modification, or CORS handling. Here’s how middleware works in Laravel

January 2025 · 6 min · Pavan Kushvaha

What is middleware in expressjs

In Express.js, middleware functions are used to handle HTTP requests and responses. Middleware can execute code, modify the request and response objects, end the request-response cycle, or pass control to the next middleware function in the stack

January 2025 · 4 min · Pavan Kushvaha

How to Retrieve Raw SQL Query Strings from Laravel Query Builder

To Retrieve Raw SQL Query Strings from Laravel Query Builder in Laravel, the query builder can output its raw SQL query as a string using the toSql() method. Here is the possible methods that can retrive SQL Query Strings.

January 2025 · 3 min · Pavan Kushvaha

How to create custom helper functions in Laravel

In Laravel, creating custom helper functions can be a convenient way to reuse logic or functionality across your application. Here’s a step-by-step guide on how to create and use custom helper functions in Laravel

January 2025 · 4 min · Pavan Kushvaha

How to use multiple databases in laravel

Using multiple databases in Laravel is straightforward and can be achieved by configuring database connections in config/database.php and using them in models, queries, and migrations.

January 2025 · 7 min · Pavan Kushvaha

Make Rest Apis in laravel Step by Step Guide

Building REST APIs in Laravel involves setting up routes, controllers, models, and middleware. Below is a step-by-step guide to creating a RESTful API in Laravel 11.

January 2025 · 4 min · Pavan Kushvaha