What is routing in Laravel?

Routing in Laravel

In this article, I will discuss those aspects of Laravel’s route that are essential for creating a Laravel web application. We can learn about routing in Laravel in detail from the documentation of Laravel and its URL is: https://laravel.com/docs/10.x/routing. Overview In Laravel, route is used to create a request URL in our application. In Laravel, … Read more

What is service container in Laravel?

What is service container in Laravel

In this article we will learn what is service container in Laravel, how it works, and what are its benefits. Service Container in Laravel Overview The service container is a core component in Laravel. The service container allows us to manage class dependencies and perform dependency injection in Laravel. By default, Laravel allows us to … Read more

What is service provider in Laravel?

What is service provider in Laravel

The service provider in Laravel are one of the core functionalities of Laravel. In this article I am going to discuss about Laravel’s service providers. Service provider in Laravel Service providers are used to configure our application. Service providers are used to register services, such as middleware, routes, database connections, and more. Service providers are … Read more

What is middleware in Laravel?

What is middleware in Laravel

Middleware in Laravel The Middleware provides an easy way to inspect and filter HTTP requests that enter our application. In other words, Middleware in Laravel acts as a bridge between HTTP requests and responses That is, in simple words, as an example of middleware, it can be said that if a user wants to browse … Read more

How to create disk at runtime and store file in Laravel?

How to create disk at runtime and store file in Laravel

In this article first we will know about Laravel driver and disk. Then we will know how to create disk at run time. What is driver and disk in Laravel? Laravel filesystem integration has drivers to work with local filesystems, FTP, SFTP, and Amazon S3. In Laravel filesystem the supported Drivers are: “local”, “ftp”, “sftp”, … Read more

How to write custom if statements in Laravel?

How to write custom if statements in Laravel

In this article I will create custom blade directive for blade template in Laravel. Laravel blade overview Blade is Laravel’s easy-to-use, high-performance templating tool. We can write simple PHP code inside our blade templates. In the case of blade template files, the file extension is .blade.php and they are usually located in resources/views directory. We … Read more

How to create event in Laravel?

How to create event in Laravel

In this article we will learn how to create event in Laravel with examples. Laravel event overview Laravel events have a straightforward observer pattern implementation. We can subscribe and listen to different events that happen in our application. The event class contains the information about the event. The event classes are stored in the app/Events … Read more

How to add custom cast type in Laravel?

How to add custom cast type in Laravel

What is casting in Laravel? With casting we can transform Eloquent attribute values when retrieving or set them on model instances. Casting does not require to define any additional methods on model. The $casts property is an array. The key of the array is the name of the attribute being cast and the value of … Read more