Category Archives: Laravel

Laravel Tutorials

Laravel 9 Auth Scaffolding using Jetstream Tutorial

In this Laravel 9 Auth Scaffolding using Jetstream Tutorial I will show how to create login, register, logout, forget password, profile and reset password page using laravel jetstream authentication scaffolding without using laravel 9 make:auth command. Jetstream auth with livewire is laravel package that enable us to generate default laravel authentication scaffolding. Laravel jetstream auth includes fully functional login, register, logout, reset password, forget password, email verification, two-factor authentication, session management.

In this laravel 9 jetstream auth scaffolding tutorial I will show you how to use jetstream and livewire package to create auth scaffolding in laravel 9. Jetstream auth will include login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file.

Laravel 9 Auth Scaffolding using Jetstream Tutorial

In this step by step Laravel 9 Auth Scaffolding using Jetstream Tutorial I will demonstrate you to implement jetstream authentication scaffolding in laravel 9. Please follow the instruction given below:

  • Install Laravel 9
  • Database Configuration
  • Install Auth Scaffolding Jetstream
  • Install Livewire Package
  • Jetstream Configuration
  • Run PHP artisan Migrate
  • Install Npm Packages
  • Run Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Database Configuration

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Install Auth Scaffolding Jetstream

In this step, we will install Jetstream Package via the composer dependency manager. Use the following command to install Jetstream.

Install Livewire Package

Now run following command to create basic authentication scaffolding login, register, logout and email verification views file:

Jetstream Configuration

Next, we will open fortify.php file and will enable and disable option of jetstream package as per requirement, which is located inside config directory.

Run php artisan Migrate

Now, run following command to migrate database schema.

Install Npm Packages

Then type the following command on cmd to run npm:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Login with Facebook Account Example

In this Laravel 9 Login with Facebook Account Example tutorial I’ll show you how to integrate facebook login in laravel 9 using socialite package. Integrating Facebook login in Laravel 9 using socialite package is much easier. Allowing users to login with their social media accounts makes registration/login process much easier, it also encourages more users to register for your application.

Laravel 9 Login with Facebook Account Example

In this step by step tutorial, you will learn to integrate Facebook login with your laravel 9 application. Please follow the steps give below:

  • Install Laravel 9
  • Configure Database With App
  • Configure Facebook App
  • Install Socialite & Configure
  • Add Field In Table Using Migration
  • Install Jetstream Auth
  • Build Routes
  • Create Facebook Login Controller By Command
  • Integrate FB Login Button In Login Page
  • Start Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Configure Database In .env file

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

.env

Configure Facebook App

Step 1:-

Go to Facebook’s developers site https://developers.facebook.com/ and log in with your Facebook account. There in Facebook developers Dashboard you have option to Create App. Lets create a Facebook Login App simply providing App Name and Contact Email.

Step 2:-

After creating the facebook app, go to setting->advanced and set redirect url

Step 3:-

Then, go to Facebook Login -> Settings and scroll down to “Valid OAuth Redirect URL” and set your callback URL

Step 4:-

After creating app, go to Settings -> Basic and get your newly created App ID and App Secret.

Now, go to config directory and open service.php file and add the client id, secret and callback url:

Install Socialite Package via Composer

After Installing ‘socialite’ package, we need to add service provider and alias in config/app.php file as following.

config/app.php

Add Field In Table Using Migration

Now, use the following command to create a migration file to add a column in database table:

Once this command is executed you will find a migration file created under “database/migrations”. lets open migration file and put following code in it –

After successfully add field in database table. Then add fillable property in User.php model, which is found inside app/Models/ directory:

Now, run following command to migrate database schema.

Install Jetstream Auth

In this step, install jetstream laravel auth scaffolding package with livewire. We have provided a complete guide in this Laravel 9 Auth Scaffolding using Jetstream Tutorial.

Build Routes

After this, we need to add following routes in “routes/web.php” file along with a resource route. Lets open “routes/web.php” file and add following route.

routes/web.php

Create Facebook Login Controller

Now, lets create a controller for facebook login. Create a controller named FacebookSocialiteController using command given below –

Once the above command executed, it will create a controller file FacebookSocialiteController.php in app/Http/Controllers/ directory. Open the FacebookSocialiteController.php file and put the following code in it.

app/Http/Controllers/FacebookSocialiteController.php

Integrate FB Login Button In Login Page

Now, we will add facebook login button into login.blade.php file. So, open login.blade.php, which is found inside resources/views/auth/ directory:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Vue Auth Tutorial with Example

In this Laravel 9 Vue Auth Tutorial with Example Tutorial I will show how to create login, register, logout, forget password, profile and reset password page using Vue Auth Scaffolding without using laravel 9 make:auth command. Vue Auth Scaffolding enable us to generate default laravel authentication scaffolding. Vue Auth Scaffolding includes fully functional login, register, logout, reset password, forget password, email verification, two-factor authentication, session management.

In this laravel 9 Vue Auth Scaffolding tutorial I will show you how to use Vue Auth Scaffolding to create auth scaffolding in laravel 9. React Auth Scaffolding will include login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file.

Laravel 9 Vue Auth Tutorial with Example

In this step by step laravel 9 Vue auth example tutorial we will learn how to implement or generate Auth Scaffolding using laravel ui and Vue auth. Please follow the instruction given below:

  • Install Laravel 9
  • Database Configuration
  • Install Laravel UI
  • Install Vue Auth Scaffolding
  • Install Npm Packages
  • Run PHP artisan Migrate
  • Run Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Database Configuration

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Install Laravel UI

Now, switch the laravel project directory and run the following composer command to install laravel/ui package. Laravel UI is an official library that offers selective or predefined UI components. The laravel/ui package comes with the login and registration scaffolding for React, Vue, jQuery, and Bootstrap layouts. Run the following composer command to install Laravel/UI.

Install Vue Auth Scaffolding

Use the following artisan command to Install Vue auth scaffolding.

Now, you have successfully installed Vue auth in your laravel 8 project, you can see your resource directory js folder.

Install Npm Packages

Now, you need to install the bootstrap package and the related frontend dependencies such as jquery from npm using the following command:

Then type the following command on cmd to run npm:

Run php artisan Migrate

Now, in this step we will create model and migration file. Please run the following command:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 React Auth Tutorial with Example

In this Laravel 9 React Auth Tutorial with Example Tutorial I will show how to create login, register, logout, forget password, profile and reset password page using React Auth Scaffolding without using laravel 9 make:auth command. React Auth Scaffolding enable us to generate default laravel authentication scaffolding. React Auth Scaffolding includes fully functional login, register, logout, reset password, forget password, email verification, two-factor authentication, session management.

In this laravel 9 React Auth Scaffolding tutorial I will show you how to use React Auth Scaffolding to create auth scaffolding in laravel 9. React Auth Scaffolding will include login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file.

Laravel 9 React Auth Tutorial with Example

In this step by step laravel 9 react auth example tutorial we will learn how to implement or generate Auth Scaffolding using laravel ui and react auth. Please follow the instruction given below:

  • Install Laravel 9
  • Database Configuration
  • Install Laravel UI
  • Install React Auth Scaffolding
  • Install Npm Packages
  • Run PHP artisan Migrate
  • Run Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Database Configuration

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Install Laravel UI

Now, switch the laravel project directory and run the following composer command to install laravel/ui package. Laravel UI is an official library that offers selective or predefined UI components. The laravel/ui package comes with the login and registration scaffolding for React, Vue, jQuery, and Bootstrap layouts. Run the following composer command to install Laravel/UI.

Install React Auth Scaffolding

Use the following artisan command to Install React auth scaffolding.

Now, you have successfully installed react auth in your laravel 8 project, you can see your resource directory js folder.

Install Npm Packages

Now, you need to install the bootstrap package and the related frontend dependencies such as jquery from npm using the following command:

Then type the following command on cmd to run npm:

Run php artisan Migrate

Now, in this step we will create model and migration file. Please run the following command:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Authentication with Breeze Tutorial Example

In this Laravel 9 Authentication with Breeze Tutorial Example I will show how to install and use breeze authentication in laravel 9 application. In this tutorial you will learn to install and use breeze authentication in laravel 9. In this example we will be using breeze auth to implement user authentication in laravel application. The breeze auth will be used to create login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file. The laravel 9 breeze auth create simple and lightweight authentication scaffolding.

Laravel 9 Authentication with Breeze Tutorial Example

In this step by step tutorial I will demonstrate you with example to implement user authentication using breeze authentication in laravel 9 application. Please follow instruction given below:

  • Install Laravel 9
  • Connecting App to Database
  • Install breeze Auth Scaffolding
  • Run PHP artisan Migrate
  • Install Npm Packages
  • Run Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Connecting App to Database

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Install breeze Auth Scaffolding

In this step, we will install breeze auth Package via the composer dependency manager. Use the following command to install breeze auth Package.

Now you have to install laravel breeze for simple auth scaffolding. so let’s run bellow command:

Run php artisan Migrate

Now, run following command to migrate database schema.

Install Npm Packages

Now run following command to install node js and npm dependencies:

Then type the following command on cmd to run npm:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Auth Scaffolding using Livewire Jetstream Tutorial

In this Laravel 9 Auth Scaffolding using Livewire Jetstream Tutorial I will show how to create login, register, logout, forget password, profile and reset password page using laravel jetstream authentication scaffolding without using laravel 9 make:auth command. Jetstream auth with livewire is laravel package that enable us to generate default laravel authentication scaffolding. Laravel jetstream auth includes fully functional login, register, logout, reset password, forget password, email verification, two-factor authentication, session management.

In this laravel 9 jetstream auth scaffolding tutorial I will show you how to use jetstream and livewire package to create auth scaffolding in laravel 9. Jetstream auth will include login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file.

Laravel 9 Auth Scaffolding using Livewire Jetstream Tutorial

In this step by step Laravel 9 Auth Scaffolding using Jetstream Tutorial I will demonstrate you to implement jetstream authentication scaffolding in laravel 9. Please follow the instruction given below:

  • Install Laravel 9
  • Database Configuration
  • Install Auth Scaffolding Jetstream
  • Install Livewire Package
  • Jetstream Configuration
  • Run PHP artisan Migrate
  • Install Npm Packages
  • Run Development Server

Install Laravel 8 App

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Database Configuration

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Install Auth Scaffolding Jetstream

In this step, we will install Jetstream Package via the composer dependency manager. Use the following command to install Jetstream.

Install Livewire Package

Now run following command to create basic authentication scaffolding login, register, logout and email verification views file:

Jetstream Configuration

Next, we will open fortify.php file and will enable and disable option of jetstream package as per requirement, which is located inside config directory.

Run php artisan Migrate

Now, run following command to migrate database schema.

Install Npm Packages

Then type the following command on cmd to run npm:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Bootstrap Auth Scaffolding Example

In this Laravel 9 Bootstrap Auth Scaffolding Example Tutorial I will show how to create login, register, logout, forget password, profile and reset password page using Bootstrap Auth Scaffolding without using laravel 9 make:auth command. Bootstrap Auth Scaffolding enable us to generate default laravel authentication scaffolding. Bootstrap Auth Scaffolding includes fully functional login, register, logout, reset password, forget password, email verification, two-factor authentication, session management.

In this laravel 9 Bootstrap Auth Scaffolding tutorial I will show you hot to use Bootstrap Auth Scaffolding to create auth scaffolding in laravel 9. Bootstrap Auth Scaffolding will include login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file.

Laravel 9 Bootstrap Auth Scaffolding Example

In this step by step laravel 9 bootstrap auth example tutorial we will learn how to implement or generate Auth Scaffolding using laravel ui and bootstrap auth. Please follow the instruction given below:

  • Install Laravel 9
  • Database Configuration
  • Install Laravel UI
  • Install Bootstrap Auth Scaffolding
  • Install Npm Packages
  • Run PHP artisan Migrate
  • Run Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Database Configuration

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Install Laravel UI

Now, switch the laravel project directory and run the following composer command to install laravel/ui package. Laravel UI is an official library that offers selective or predefined UI components. The laravel/ui package comes with the login and registration scaffolding for React, Vue, jQuery, and Bootstrap layouts. Run the following composer command to install Laravel/UI.

Install Bootstrap Auth Scaffolding

Use the following artisan command to Install the auth scaffoldings with Bootstrap.

Now, you have successfully installed bootstrap in your laravel 8 project, you can see your resource directory js folder.

Install Npm Packages

Now, you need to install the bootstrap package and the related frontend dependencies such as jquery from npm using the following command:

Then type the following command on cmd to run npm:

Run php artisan Migrate

Now, in this step we will create model and migration file. Please run the following command:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Drag and Drop File Upload using Dropzone JS

In this Laravel 9 Drag and Drop File Upload using Dropzone JS Example tutorial, I will show you how to create drag and drop image file upload functionality using dropzone js in laravel 9. In this tutorial you will learn to implement drag and drop image file upload using dropzone package in laravel 9. In this article you will learn to upload multiple image file with drag and drop using dropzone js in laravel 9. After upload we will be saving image files with unique name in database.

Laravel 9 Drag and Drop File Upload using Dropzone JS

In this step by step tutorial I will demonstrate you with example to create drag and drop image file upload using dropzone js in laravel 9. Please follow the instruction given below:

  • Install Laravel 9
  • Setup Database with App
  • Create Model & Migration
  • Create Routes
  • Generate Controller By Artisan Command
  • Create Blade View
  • Implement javascript Code for Dropzone Configuration
  • Create Images Directory inside Public Directory
  • Run Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Setup Database Credentials

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Create Model & Migration

Now, in this step we will create model and migration file. Please run the following command:

Now, open create_photos_table.php file inside LaravelImage/database/migrations/ directory. And the update the function up() with following code:


Now, run the migration to create database table using following artisan command:

Create Routes

After this, we need to define routes in “routes/web.php” file. Lets open “routes/web.php” file and add the following routes in it.

routes/web.php

Generate Controller By Artisan Command

Now, lets create a controller named DropzoneController using command given below –

Now, go to app/http/controllers and open DropzoneController.php file. And put the following code into it:


The following line of code will upload an image into the images directory:

Create Blade View

Now, create drag and drop multiple image file upload form in blade view file to display image upload form and submit to the database using dropzone js in laravel. Go to resources/views and create dropzone.blade.php and update the following code into it:

Implement javascript Code for Dropzone Configuration

Create Images Directory inside Public Directory

Do remember to create images directory inside public directory.

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Autocomplete Search with jQuery UI

In this Laravel 9 Autocomplete Search using Jquery UI tutorial I will show you how to create autocomplete input or search box using jquery ui in laravel 9. In this tutorial you will learn to create autocomplete input box using jquery ui in laravel 9. In this example we will be using autocomplete jquery ui plugin. The jquery autocomplete plugin is used to create dynamic autocomplete input with several options. In this example you will learn how to implement jquery autocomplete in laravel 9.

Laravel 9 Autocomplete Search with jQuery UI

In this article, I will show you to create a dynamic database driven ajax jquery autocomplete in Laravel 9. You will also learn to create a dynamic search dropdown autocomplete which will fetch options from database table using jquery autocomplete.

  • Install Laravel 9
  • Database Configuration Database
  • Make Model and Migration
  • Make Routes
  • Create Controller
  • Create Blade View
  • Implement jQuery Ajax Code
  • Run Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Database Configuration Database

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Make Model and Migration

Now, in this step we will create model and migration file. Please run the following command:

Once above command is executed there will be a migration file created inside database/migrations/ directory, just open migration file and update the function up() method as following:

Next, go to app/Models/Product.php file and add the $fillable property in the Product model as following.

Make Routes

After this, we need to define routes in “routes/web.php” file. Lets open “routes/web.php” file and add the following routes in it.

routes/web.php

Create Controller

Now, lets create a controller named AutoCompleteController using command given below –

Once the above command executed, it will create a controller file AutoCompleteController.php in app/Http/Controllers/ directory. Open the AutoCompleteController.php file and put the following code in it.

app/Http/Controllers/AutoCompleteController.php

Create Blade View

In this step we will create a blade file. Go to app/resources/views and create one file name autocomplete-search.blade.php

Implement jQuery Ajax Code

Next, go to public directory and create one file name auto.js. Open auto.js file and add the following code in auto.js file:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Add Text Overlay Watermark on Image Example

In this Laravel 9 Add Text Overlay Watermark on Image Example tutorial I will show you how to add text overly watermark on Image in laravel 9. In this tutorial you will learn to add or create text overly watermark on Image in laravel 9 application. In this article I will share example to create watermark on image in laravel 9. We will be using PHP image intervention library to create text overly watermark on Image. The PHP image intervention library is helpful in creating images with copyright information, digital signature and any important information on it. In laravel we will using intervention package for adding text overly watermark on Image.

Laravel 9 Add Text Overlay Watermark on Image Example

In this step by step tutorial I will demonstrate you with example how to add text overly watermark on Image in laravel 9. Please follow instruction given below:

    • Install Laravel 9
    • Connecting App to Database
    • Install PHP Image Intervention Package
    • Add Routes
    • Create Controller
    • Create Blade View
    • Make Folder
    • Start Development Server

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Connecting App to Database

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Install PHP Image Intervention Package

In this step, we will install Image intervention Package via the composer dependency manager. Use the following command to install image intervention Package.

After Installing Image intervention package, we need to add service provider and alias in config/app.php file as following.

config/app.php

Now, run following command to migrate database schema.

Add Routes

After this, we need to define routes in “routes/web.php” file. Lets open “routes/web.php” file and add the following routes in it.

routes/web.php

Create Controller

Now, lets create a controller named ImageFileController using command given below –

Then visit to app/controllers/ImageFileController.php and add the following code into it:

Create Blade View

In this step we will create blade view file. Go to /resources/views and create one file my-images.blade.php and add the following code into it:

Make Folder

In this step, Visit the public directory and create one folder or directory name upload.

Start Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 jQuery Ajax File Upload Progress Bar Example

In this Laravel 9 jQuery Ajax file upload with progress bar tutorial I’ll show how to implement Ajax File Upload with progress bar in laravel 9. In this tutorial you will learn to implement progress bar along with ajax file upload. In this article I will share example to show you how to upload file using jquery ajax with progress bar in laravel 9. We will be using jquery ajax to upload file in laravel 9. We will also add progress bar with file uploading to display file upload progress.

Laravel 9 jQuery Ajax File Upload Progress Bar Example

In this step by step tutorial I’ll demonstrate you how to upload file using jquery ajax with progress bar in laravel 9. Please follow the instruction given below:

  • Install Laravel 9
  • Connecting App to Database
  • Create Migration & Model
  • Add Routes
  • Create Controller by Artisan
  • Create Blade View
  • Run Development Server
  • Test This App

Install Laravel 8 App

First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command

Connecting App to Database

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Create Migration & Model

Now, in this step we will create model and migration file. Please run the following command:

The above command will create a model Doc.php and a migration file for Docs table. Then go to database/migrations folder and open create_docs_table.php. Then put the following code into create_docs_table.php:

Now, run the migration to create database table using following artisan command:

Create Route For File

After this, we need to define routes in “routes/web.php” file. Lets open “routes/web.php” file and add the following routes in it.

routes/web.php

Generate Controller by Artisan

Now, lets create a controller named UploadFileController using command given below –

Once the above command executed, it will create a controller file UploadFileController.php in app/Http/Controllers/ directory. Open the UploadFileController.php file and put the following code in it.

app/Http/Controllers/UploadFileController.php

Create Blade View

In this step we will create blade view file. Now create a blade view file progress-bar-file-upload.blade.php. Go to /resources/views and create a file progress-bar-file-upload.blade.php. Then put the following code into progress-bar-file-upload.blade.php file:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –

Laravel 9 Guzzle HTTP GET & POST Example

In this Laravel 9 Guzzle HTTP Client Requests Example tutorial I’ll show you how to create GET or POST request using Guzzle HTTP Client Requests in laravel 9. In this tutorial you will learn to use Guzzle HTTP Client to create GET and POST request in laravel 9. In this article I will share example to use Guzzle HTTP Client for making GET and POST requests in Laravel 9.

Guzzle HTTP

The guzzle http client is used to call external or internal APIs in your laravel application. The guzzle http client makes it easy to call external APIs in laravel 9 with get and post request.

Laravel 8 Guzzle HTTP GET & POST Example

In this step by step guzzle http GET and POST request laravel 9 tutorial I will demonstrate you how to use http guzzle http client package for calling external or internal apis in your laravel 9. Please follow the instruction given below:

  • Install Laravel 9
  • Database Configuration
  • Install guzzlehttp/guzzle Package
  • Make Routes
  • Create Controllers By Artisan
  • Run Development Server.

Install Laravel 9

First of all we need to create a fresh laravel project, download and install Laravel 8 using the below command

Database Configuration

Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.

Install guzzlehttp/guzzle Package

In this step, we will install guzzlehttp/guzzle Package via the composer dependency manager. Use the following command to install guzzlehttp/guzzle Package.

Make Routes

After this, we need to define routes in “routes/web.php” file. Lets open “routes/web.php” file and add the following routes in it.

routes/web.php

Create Controllers by Artisan

Now, lets create a controller named PostGuzzleController using command given below –

The above command will create PostGuzzleController. Now, go to app/http/controller and open PostGuzzleController.php.Then update the following methods into your controller file:

Run Development Server

Now we are ready to run our example so lets start the development server using following artisan command –

Now, open the following URL in browser to see the output –