CRUD Operations In Laravel 8

This tutorial is created to illustrate the basic CRUD (Create , Read, Update, Delete) operation using SQL with Laravel 8. Laravel is one of the fastest-growing frameworks for PHP. Laravel 8 continues the improvements made in the previous stable release. Refer release notes to see the changes made in Laravel 8. In this tutorial, You’ll learn to create the basic CRUD operations in Laravel. Follow the step-by-step guide to implement CRUD in Laravel 8. What is…

Connecting Multiple Databases in Laravel 5.8

This tutorial is created to implement multiple database connections using mysql. Let’s see how to configure multiple database connections in Laravel 5.8. # Laravel 5.8Laravel 5.8 continues the improvements made in the previous release (version 5.7). Refer release notes to see the changes made in Laravel 5.8. Install Laravel 5.8 First, let's install Laravel 5.8 using the following command (Make sure to have composer installed in your PC) to Install Composer. composer create-project…

Clearing Route, View, Config Cache in Laravel 5.8

Sometimes you may face an issue that the changes to the Laravel Project may not update on the web. This occures when the application is served by the cache. In this tutorial, You'll learn to Clear Application, Route, Config, Browser Cache in Laravel Project. Go to your Laravel Project and open the Terminal. Here you can type the commands to clear cache as show below : Clear Route Cache Type the following command to clear…

Integrating Google ReCaptcha in Laravel 5.8

reCAPTCHA is a free service from Google. It's a CAPTCHA-like system designed to recognize that the user is human and, at the same time, assist in the digitization of books. It helps to protects your website from spam and abuse. Note : If you're running the Laravel Project at your Local Server. It's also acceptable for testing Google reCAPTCHA. In this tutorial, You'll learn to integrate Google reCAPTCHA in your Laravel Project.…

CRUD in Laravel 5.8

This tutorial is created to illustrate the basic CRUD (Create , Read, Update, Delete) operation using SQL with Laravel 5.8. Laravel is one of the fastest growing frameworks for PHP built by Taylor Otwell. # Laravel 5.8 Laravel 5.8 continues the improvements made in the previous release (version 5.7). Refer release notes to see the changes made in Laravel 5.8. In this tutorial, You'll learn the Basic CRUD operation in Laravel. Follow the step…

Import, Export from Excel to Database in Laravel 5.8, 5.7, 5.6.

This tutorial is created to Import, Export data from an excel sheet to database in Laravel Framework using maatwebsite/excel package. It provides an easy way to import and export using database model. It will work with Laravel 5.8, 5.7, 5.6. Laravel Import, Export - Excel CSV Install Laravel First, let's install Laravel using the following command (Make sure, You have installed composer in your PC). Click on Install Composer If you haven't installed Composer…

Facebook Login with Socialite in Laravel 5.8

The tutorial is created to implement facebook login using Socialite in Laravel 6.0, 5.8 , 5.7 and 5.6. Using Facebook Auth to log and register into your Laravel Application. Follow the steps below to implement laravel socialite facebook login. Install Laravel 5.8 First, let install Laravel 5.8 using the following command (Make sure you have installed composer in your PC). Click on Install Composer If you haven't installed Composer on your PC.…

Laravel 5.8 Form Request Validation

There are plenty of validation methods available to validate the form data request with Laravel 5.8. By default Laravel's base controller class uses a ValidatesRequests trait which provides a way to validate incoming HTTP request with many validation rules. # Form Request Validation For more complex validation scenarios, you may wish to create a "form request". Form requests are custom request classes that contain validation logic. Refer more about form request validation to see…

How to build an API with Laravel 5.8 using Sqlite

This tutorial focuses on setting up REST API in Laravel 5.8 using PHPUnit and SQLITE. If you’re new to Laravel or PHPUnit, Check out the Laravel Getting Started Guide and PHPUnit Documentation for more information. Install Laravel 5.8 First, let install Laravel 5.8 using the following command (Make sure you have installed composer in your PC). Click on Install Composer If you haven't installed Composer on your PC. composer create-project --prefer-dist laravel/laravel restApiApplication Install & Configure Database You…

Laravel Cheat Sheet for Eloquent ORM

ORM (Object-relational mapping) is used to make database CRUD operations easier. Laravel comes with Eloquent ORM. This tutorial is created to provide some of the frequently used cheat sheet for Laravel Eloquent ORM Ordering Eloquent hasMany() relationship Add ->orderBy() to the hasMany relationship to get ordered output of a specified column. return $this->hasMany('Detail::class')->orderBy('column'); Eloquent's where() method Here are some useful cheat sheet for eloquent's where() method. $detail = Detail::where("id","!=",50)->get(); // Any of the…