Laravel

Laravel is PHP based framework that helps in building large and small scale web applications. Its first release came out in 2011 and the current version is 9.

Install Bootstrap 5 in Laravel 10

This article guides you through the installation of Bootstrap 5 in Laravel 10, providing step-by-step instructions along with screenshots.

How to Get Client IP Address in Laravel 10?

In Laravel framework, we can retrieve client’s IP address through the ip() method from the Request object. It returns IP address as a string.

How to Create Route in Laravel 10?

In the Laravel, routes are used to define the URLs for the web application. When a user makes a request to the application, Laravel’s routing system determines which route matches the request and then calls the corresponding controller.

How to Create and Run Controller in Laravel 10?

In the Laravel framework, we can create a controller by using the artisan command which is php artisan make:controller YourControllerName

Laravel 10 Eloquent Mutators and Accessors

The mutator modifies the value before inserting it into the database, while the accessor modifies the value after fetching it from the database.

Laravel Pennant Package – Feature Flag Tutorial

Laravel 10 introduced a new package Pennant that manages your Laravel application’s features flags. It has the ability to hide and show the application’s features based on cases.

Laravel 10 Authentication with Breeze Tutorial

Breeze is a package that implements authentication features quickly and easily. It scaffolds authentication in your Laravel application with Blade, React, and Vue.

Laravel 10 Middleware Tutorial With Example

Middleware allows you to perform an action between request and response. It is Laravel’s component that has the ability to filter the request.

How to Check if Request Has File or Image in Laravel?

The hasFile() method from the Request class checks if the incoming request has a file or not. It takes the input field name as an argument and returns bool.

How to Delete File in Laravel Framework?

In Laravel, the delete() method from the Storage class deletes the file. It accepts both string and array in the parameter.

How to Upload File in Laravel Framework?

To upload a file in the Laravel framework, you will need to create a route, blade file, and controller.

Display Time Format with AM and PM in Carbon using Laravel

To display time with AM and PM we can use the format() method with characters that display time accordingly.

How to Count Weekend Days Between Two Dates in Laravel?

We can use carbon class to get the number of weekend days between two dates in the Laravel framework.

How to Get .env Variables in Laravel?

To get all environment variables from the .env file in Laravel we can use the PHP super global variable $_ENV. It returns all environmental variables in array format.

How to Update Multiple Records in Laravel?

To update multiple records with the same data you need to use the whereIn() function along with the update() function in the Laravel framework.

How to fetch Today’s Date Record in Laravel?

To fetch today’s record you need to use the whereDate() function in your query along with the now() method from the carbon class.

How to Check if a Key Exists in a Collection in Laravel 9

In the Laravel framework, you can use has() and contains() methods to check if a key and value exist in the collection.

How to get Headers Data From Incoming Requests in Laravel?

Laravel provides great features that help us to create API. Headers are the part of the API that carries information from the user end to the framework.

How to Import Excel Files in Laravel 9?

Importing excel file data into the Laravel framework is easy with the maatwebsite/excel package. In the previous article, we learned about exporting data in excel files.

How to Export Data in an Excel File in Laravel 9?

You can export data to an excel file through maatwebsite/excel package in the Laravel Framework. This well-reputed package is created by Patrick Brouwers.

How to use Scoped filesystem driver in Laravel 9?

In the latest release of the Laravel framework (Laravel 9.30), Frank de Jonge added a scoped filesystem driver that helps to reuse the disk configurations.

How to install Laravel 9 with Vite?

A major change can be seen in Laravel version 9.19 which is Vite. The new build tool Vite is a replacement for the Laravel mix that compiles the bundles faster.

What is Carbon in Laravel and How to use it?

Carbon is a PHP-based package that deals with date and time. It has simplified how to get dates and times with the desired format.

What is Laravel Pint and How to Use it?

Pint is a Laravel package that fixes coding styles to make the code more readable for developers. It is a package that is included in Laravel 9.x.x and it is built on top of the PHP-CS-Fixer package.

How to Create a Custom Blade Directive in Laravel 9?

In the Laravel framework, directives simply run predefined PHP code in the way in blade files. In this article we have learned to create conditional and helper directives.

How to access PHP variables in JavaScript using Laravel?

To access PHP variables into JavaScript in Laravel, you will need to pass data from the controller to view and then access through double curly braces.

Store JSON Format Data in Database using Laravel

Storing JSON formatted data into a database can save you from a lot of coding. But sometimes it adds difficulties to extend the feature. It can be good if you want to just save and show the data.

How to Create Migration in the Laravel Framework?

Migration allows to create, update, and delete tables through the PHP class-based code and command. Migration class has two methods which are up and down.

How to Print the Last Executed Query or Query Log in Laravel 9?

Backend developers often face issues in the queries which bring them for debugging. In Laravel, you can get the last executed query through the getQueryLog() method after enabling the query log.

How to deploy Laravel 9 on VPS Plesk?

Learn to deploy Laravel 9 applications on VPS (Virtual Private Server) Plesk. Deploying the Laravel application on the server looks challenging but in reality, it is easy.

Laravel 9 Redirect With Messages and Errors

In programming, we redirect class to class and also method to method based on data or conditions.

How to Add Form Validation in Laravel?

Laravel’s validator provides several rules that validate incoming data. These rules cover almost all data types and data formats for example integers, strings, float, email, etc.

How to use orWhere() clause in Laravel?

Laravel included eloquent that provides the orWhere() method that adds or where clauses into the query.

How to install Laravel Framework on Windows using Xampp?

This article covers all steps to installing fresh Laravel application on windows. Before getting started make sure that a few software is installed and configured well.

How to Create a Table Using Migration in Laravel?

In Laravel, the migration feature creates and edits tables. It has many functions that return code to create or edit table.

How to Generate an App Key in Laravel?

Laravel framework keeps APP_KEY in the .env the file that is located in the root directory. It is a random string used to encrypt cookies, sessions, and CSRF tokens.

Get URL Segments in Controller and Blade using Laravel

In this article, we will learn to get URL segments in controller and blade using the Laravel framework.

How to Pass Data to View in Laravel?

Learn how to pass data into view from the controller and then show it using HTML elements. This data comes from databases and APIs.

Upload File or Image on Laravel Through REST API

Learn how to create API that would upload files or images to Laravel. Also, it would validate, rename files and save them into the database.

Install and Use CKEditor 5 in Laravel 9

Learn to use CKEditor 5 in Laravel 9. It will also work with other Laravel versions. It has a user-friendly interface and excellent features.

External API Call in Laravel with HTTP Client and Services

Learn how to make external API calls with laravel’s HTTP client using the service. Service helps to keep the code organized and readable.