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.
This article guides you through the installation of Bootstrap 5 in Laravel 10, providing step-by-step instructions along with screenshots.
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.
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.
In the Laravel framework, we can create a controller by using the artisan command which is php artisan make:controller YourControllerName
The mutator modifies the value before inserting it into the database, while the accessor modifies the value after fetching it from the database.
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.
Breeze is a package that implements authentication features quickly and easily. It scaffolds authentication in your Laravel application with Blade, React, and Vue.
Middleware allows you to perform an action between request and response. It is Laravel’s component that has the ability to filter the request.
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.
In Laravel, the delete() method from the Storage class deletes the file. It accepts both string and array in the parameter.
To upload a file in the Laravel framework, you will need to create a route, blade file, and controller.
To display time with AM and PM we can use the format() method with characters that display time accordingly.
We can use carbon class to get the number of weekend days between two dates in the Laravel framework.
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.
To update multiple records with the same data you need to use the whereIn() function along with the update() function in the Laravel framework.
To fetch today’s record you need to use the whereDate() function in your query along with the now() method from the carbon class.
In the Laravel framework, you can use has() and contains() methods to check if a key and value exist in the collection.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
In programming, we redirect class to class and also method to method based on data or conditions.
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.
Laravel included eloquent that provides the orWhere() method that adds or where clauses into the query.
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.
In Laravel, the migration feature creates and edits tables. It has many functions that return code to create or edit table.
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.
In this article, we will learn to get URL segments in controller and blade using the Laravel framework.
Learn how to pass data into view from the controller and then show it using HTML elements. This data comes from databases and APIs.
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.
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.
Learn how to make external API calls with laravel’s HTTP client using the service. Service helps to keep the code organized and readable.