Category Archives: Laravel

Laravel Tutorials

How to Get Current User Location in Laravel 8

In this How to Get Current User Location in Laravel 8 tutorial I will show you how to get user location information using user IP address in laravel 8. In this tutorial you will learn to get country name, country code, city name, and address from user IP address in laravel 8. When you working on web development project you come to situation where you may want to fetch user information such as country Name, country Code, region Code, region Name, city Name, zip Code, iso Code, postal Code, latitude, longitude, metro Code, metro Code from ip address in laravel 8. In this example I will help you to fetch user info from IP their ip address. We will be using stevebauman/location package in this example to fetch country name, country code, city name, and address from IP address.

How to Get Current User Location in Laravel 8

In this tutorial you will learn how to get current user location with ip address using stevebauman location package. The stevebauman/location laravel package is used to get users location data by their IP Address. This helps in retrieving user’s location information from IP address. The location library helps in retrieving following location information:

  • Country name and code
  • Region name and code
  • City name
  • Zipcode
  • ISO code
  • Postal code
  • Latitude and longitude
  • Metro code

Laravel 8 Get Current User Location Tutorial

  • Step 1 – Download Laravel 8 Application
  • Step 2 – Connecting App to Database
  • Step 3 – Install stevebauman/location Package
  • Step 4 – Create Route
  • Step 5 – Create Controller By Artisan Command
  • Step 6 – Create Blade View
  • Step 7 – Run Development Server

Step 1 – Download Laravel 8 Application

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

Step 2 – 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.

Step 3 – Install stevebauman/location Package

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

Then, Go to config directory and open app.php file. And register this package into laravel 8 app by adding the following code into your app.php file:

Step 4 – 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

Step 5 – Create Controller By Artisan Command

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

Now, go to app\Http\Controllers and open UserController.php file. Then put the following code into your UserController.php file:

Step 6 – Create Blade View

In this step we will create blade view file. Go to resources/views directory and create user.blade.php. Then add the following code into it:

Step 7 – 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 8 Custom Email Verification System

In this Laravel 8 Custom Email Verification System Tutorial I will show you how to implement custom email verification for newly registered users in laravel. In this tutorial you will learn to enable custom email verification for account activation in laravel. Laravel comes with built-in email verification system for newly registered user. Using this, newly registered user will get an email with an account activation link. This activation link is used for account verification. When activation link is clicked, this will make user account verified and active for the application. Once user account is activated then it will be allowed to access protected routes; which can be accessible only by verified accounts.

Laravel 8 Custom Email Verification System

In this step by step tutorial, we’ll show you how to setup custom email verification system for newly registered user in laravel. Please follow the instruction given below:

  • Step 1 – Install Laravel 8 App
  • Step 2 – Configuration Database and Email
  • Step 3 – Install Laravel UI
  • Step 4 – Install Bootstrap Auth Scaffolding
  • Step 5 – Install Npm Packages
  • Step 6 – Run PHP artisan Migrate
  • Step 7 – Configure Model, Route And Controller
  • Step 8 – Run Development Server

Step 1 – Install Laravel 8 App

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

Step 2 – Configuration Database and Email

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.

Now we will setup SMTP credential in .env to send emails. We are using mailtrap SMTP credential in this example.

Step 3 – Install Laravel UI

In this step we will install laravel ui package using following command:

Step 4 – Install Bootstrap Auth Scaffolding

Now we need to enable bootstrap authentication scaffolding in laravel.

Step 5 – Install Npm Packages

Now we will instal npm dependencies using following command:

Then type the following command on cmd to run npm:

Step 6 – Run php artisan Migrate

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

Step 7 – Configure Model, Route And Controller

Visit app/Models and open User.php file and add the following code into it:

Then visit routes directory and open web.php and add the following rotues into it:

Aftert that, visit app/Http/Controllers and open HomeController.php and add the following code into it:

Step 8 – 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 8 maddhatter/laravel-fullcalendar Tutorial with Example

In this Laravel 8 maddhatter/laravel-fullcalendar Tutorial with Example I’ll show you how to install and use fullcalendar using maddhatter/laravel-fullcalendar package in laravel. In this tutorial you will learn to display events on the calendar using maddhatter/laravel-fullcalendar package in laravel 8. This tutorial you will also learn to show dynamic event, task or booking data on calendar using fullcalendar components in laravel 8. Fullcalendear package is mainly used appointment booking, event scheduling, task management application development in laravel.

Laravel 8 maddhatter/laravel-fullcalendar Tutorial with Example

In this step by step tutorial I will demonstrate you how to install and integrate fullcalendar components in laravel 8. Please follow instruction given below:

  • Step 1 – Install Laravel App
  • Step 2 – Connecting App to Database
  • Step 3 – Build Migration & Model
  • Step 4 – Install maddhatter/laravel-fullcalendar and Build Routes
  • Step 5 – Create Controller Using Artisan Command
  • Step 6 – Create Blade View
  • Step 7 – Run Development Server
  • Step 8 – Test This App

Step 1 – Install Laravel App

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

Step 2 – 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.

Step 3 – Build 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 name Book and also create a migration file for the Events table. Now go to database/migrations folder and open create_books_table.php file. Then put the following code into create_books_table.php file, as follow:

Now, go to app/models and open Book.php file and add the following code into it:


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

Step 4 – Install maddhatter/laravel-fullcalendar and Build Routes

In this step, we will install maddhatter/laravel-fullcalendar Package via the composer dependency manager. Use the following command to install maddhatter/laravel-fullcalendar Package.

Now, open “config/app.php” file and register this package, as shown below:

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

Step 5 – Create Controller Using Artisan Command

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

After successfully create controller, visit app/http/controllers directory and open FullCalendarController.php file.

Step 6 – Create Blade view

In this step we will create blade view file. Go to resources/views directory and create a blade view file named calendar.blade.php. And add the following code into it:

Step 7 – 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 8 Generate PDF File using DomPDF Tutorial

In this Laravel 8 Generate PDF File using DomPDF Tutorial I will show you how to generate pdf file using DomPDF in laravel. In this tutorial you will learn to generate or convert a pdf file using DomPDF in laravel. In this example we will be using DomPDF library to generate pdf file. In this article I will show you how to install and use DomPDF package to generate pdf file in laravel. You will also learn to install DomPDF with laravel. Before starting with this tutorial you are required to install DomPDF package in laravel.

Laravel 8 Generate PDF File using DomPDF Tutorial

In this step by step tutorial I will demonstrate you how to install DomPDF  package in laravel. As well as I will also show you how to generate pdf file using DomPDF package in laravel. Please follow the instruction given below:

  • Step 1 – Download Laravel 8 Application
  • Step 2 – Install DomPDF Package
  • Step 3 – Register DOMPDF Package
  • Step 4 – Create PDF Routes
  • Step 5 – Create PDF Controller By Artisan Command
  • Step 6 – Create Blade View File
  • Step 7 – Run Development Server

Step 1 – Download Laravel 8 Application

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

Step 2 – Install domPDF Package

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

Step 3 – Register DOMPDF Package

Now we will register this package in laravel application. So, Open the providers/config/app.php file and register the DOMPDF provider and aliases.

Step 4 – Create PDF 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

Step 5 – Create PDF Controller By Artisan Command

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

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

Step 6 – Create Blade File

Now, create blade view file for generate pdf from view. So, Go to resources/views and create testPDF.blade.php and update the following code into it:

Step 7 – 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 8 Flash Message Example Tutorial

In this Laravel 8 Flash Message Example Tutorial I will show you how to create or implement flash message in laravel 8 application. In this tutorial you will learn to implement flash message in laravel. While working with laravel application we come to situations where we want to show/display various flash success and error messages. In this example we will be using sweet alert js to display various type of flash messages or notifications.

Laravel 8 Flash Message Example Tutorial

In this step by step guide I will demonstrate you how you can implement success or error messages with sweet alert js in your laravel application.

Flash Messages in Laravel 8

In this tutorial we will learn to following types of flash messages

  • Success Flash Message
  • Error Flash Message
  • Warning Flash Message
  • Info Flash Message
  • Sweet Alert Flash Success Message
  • Sweet Alert Flash Error Message

1 – Success Flash Message

Below is example to display success flash message:

The second thing, When you send the success message. So you can use the below code in your controller:

The success flash message will look like:

2 – Error Flash Message

Below is example to display error flash message:

The second thing, add the below code in your controller, where you want to send the warning message:

3 – Warning Flash Message

Below is example to display warning flash message:

The second thing, add the below code in your controller, where you want to send the error message:

4 – Info Flash Message

Below is example to display info flash message:

The second thing, add the below code in your controller, where you want to send the info message:\

5 – Sweet Alert Flash Success Message

Below is example to sweet alert flash success message:

If you use the above code for a success message, this message automatically hides after 5 seconds.

6 – Sweet Alert Flash Error Message

Below is example to sweet alert flash error message:

If you use the above code for an error message, this message automatically hides after 5 seconds.

Laravel 8 Resource Route Controller Example Tutorial

In this Laravel 8 resource route, controller example tutoria I will show you how to create a resource route, controller, API resource route, and API resource controller in laravel 8. In this tutorial you will learn to create resource route, controller, API resource route and API resource controller in laravel. You will also learn to use resource controller and routes in laravel 8. In this article I will also show you how to create resource routes and controllers using the PHP artisan make command in laravel 8.

Laravel Resource Route and Controller

With laravel resource controller and resource route you can quick and easily CRUD operation in laravel. In order to create CRUD operation for any resource you have to create resource routes and controller. First you need to create resource route and then need to create resource controller to generate method for insert, update, view and delete operation for any resource.

Laravel 8 Resource Route Controller Example Tutorial

  • Controller Using Artisan Command
    • Create a Simple Controller
    • Create a Resource Controller
    • Create a Resource Controller with Model
  • Routes
    • Create Simple Routes
    • Create Resource Routes
  • API Controller and Routes

1:- Controller Using Artisan Command

Use the following command to create simple and resource controller in laravel 8 app.

Create a Simple Controller

Use the following artisan command to create simple controller in laravel:

The above command will create a simple controller file inside app/http/controllers directory. When you open newly created controller file it will look like:

Create a Resource Controller

Use the following artisan command to create resource controller in laravel:

The above command will create a resource controller file inside app/http/controllers directory. When you open newly created resource controller file it will look like:


The resource controller contains by default index (), create (), edit (), update (), destroy () method inside it.

Create a Resource Controller with Model

Use the following artisan command to create a resource controller with model file in laravel:

The above command will create resource controller along with a model file. The controller file has located inside app/http/controllers directory. And Model file is located inside app/Models directory.

If you open Model file, you will look like:

2:- Routes

Lets open “routes/web.php” file and add the following routes in it.

Create Simple Routes

Create Resource Routes

Then open terminal and run the following command on it:

The following command will display resource routes methods:

3:- API Controller and Routes

Create Resource Controller

Use the following artisan command to create a API resource controller:

The above command will create a simple controller file inside app/http/controllers/API directory. When you open newly created resource controller file it will look like:

Define Resource API Route

Lets open “routes/api.php” file and add the following routes in it.

routes/api.php

Laravel 8 Drag and Drop File/Image Upload using Dropzone JS

In this Laravel 8 Drag & Drop Image 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. In this tutorial you will learn to implement drag and drop image file upload using dropzone package in laravel. In this article you will learn to upload multiple image file with drag and drop using dropzone js in laravel. After upload we will be saving image files with unique name in database.

Laravel 8 Drag and Drop File/Image 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. Please follow the instruction given below:

  • Step 1 – Download Laravel 8 Application
  • Step 2 – Setup Database with App
  • Step 3 – Create Model & Migration
  • Step 4 – Create Routes
  • Step 5 – Generate Controller By Artisan Command
  • Step 6 – Create Blade View
  • Step 7 – Implement javascript Code for Dropzone Configuration
  • Step 8 – Create Images Directory inside Public Directory
  • Step 9 – Run Development Server

Step 1 – Download Laravel 8 Application

First of all we need to create a fresh laravel project, download and install Laravel 8 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.

Step 3 – 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:

Step 4 – 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

Step 5 – 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:

Step 6 – 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 8. Go to resources/views and create dropzone.blade.php and update the following code into it:

Step 7 – Implement javascript Code for Dropzone Configuration

Step 8 – Create Images Directory inside Public Directory

Do remember to create images directory inside public directory.

Step 9 – 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 8 Middleware Example Tutorial

In this Laravel 8 Middleware Example Tutorial, I will show you how to create custom middleware and to use in laravel application. In this tutorial you will learn to create and use custom middlewalre in laravel. In this article I will share example to create simple custom middleware to check user status.

Laravel 8 Middleware Example Tutorial

In this step by step laravel middleware tutorial I will demonstrate you with example of active or inactive users. Now we will call middleware in routes to restrict logged user to access that routes.

  • Step 1: Create Middleware
  • Step 2 – Register Middleware
  • Step 3 – Implement Logic Into Your Middleware File
  • Step 4 – Add Route
  • Step 5 – Add Method in Controller

Step 1: Create Middleware

In this step we will first create a custom middleware in laravel based project. So let’s open your command prompt and run following command :

Step 2 – Register Middleware

Now, go to app/http/kernel.php and register your custom middleware here :

app/Http/Kernel.php

Step 3 – Implement Logic Into Your Middleware File

After successfully register your middleware in laravel project, go to app/http/middleware and implement your logic here :

app/Http/Middleware/CheckStatus.php

Step 4 – Add Route

Now, we will add some route with middleware as following

Step 5 – Add Method in Controller

Now we will create a method to check active or inactive users.

app/Http/Controllers/HomeController.php

Laravel 8 Charts JS Example Tutorial

In this Laravel 8 Charts JS Example Tutorial I will show you how to implement Charts JS in laravel 8 application. In this tutorial you will learn to implement Charts JS in laravel 8. In this example I will demonstrate the use of Charts JS in laravel application. In this example we will create pie chart using a chart js in laravel 8 application.

ChartJS is easy to use and simple HTML5 based JavaScript charts library. With Chart js we can create animated, interactive graphs in our laravel application.

Laravel 8 Charts JS Example Tutorial

In this step by step tutorial I will demonstrate you to fetch the last 7 days data and display it on pie chart using charts js in laravel. Please follow the instruction given below:

  • Step 1: Create a route
  • Step 2: Create Controller
  • Step 3: Create Blade View File and Integrate Chart js Library
  • Step 4: Start Development Server

Step 1: Create a route

In the first step we will define routes in “routes/web.php” file. Lets open “routes/web.php” file and add the following routes in it.

routes/web.php

Step 2: Create Controller

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

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

app/Http/Controllers/ChartJSController.php

 

Step 3: Create Blade View File and Integrate Chart js Library

Now, we will create a blade view file. Go to the resources/views/chart-js.blade.php and put the below javascript and HTML code for displaying the chart. So go to the resources/views/ and update the below javascript and HTML code for displaying the chart using chart js library:

Remember to include highchart js libraries on your blade file:


Use below javascript as per requirement :

Step 4: 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 –

How to Install Ckeditor in Laravel 8

In this How to Install Ckeditor in Laravel 8 tutorial I will show you how to install and use CKEditor in laravel. In this tutorial, you will learn to install CKEditor in laravel using the command line. In this article I will guide you through how to install and upload images and files using CKEditor in laravel.

While creating forms we come to situation where we may text editor field so that we can insert and save html and other text into database. The CKEditor editor is feature rich wysiwyg html editor allows us to integrate text editor fields in html form.

How to Install Ckeditor in Laravel 8

In this step by step tutorial I will demonstrate you how to install and use CKEditor editor in laravel 8 application. Please follow the instruction given below:

  • Step 1: Install Laravel 8 App
  • Step 2: Connecting App to Database
  • Step 3: Create Post Model & Migration
  • Step 4: Add Fillable Property in Model
  • Step 5: Make Route
  • Step 6: Create Controller
  • Step 7: Create Blade Views File
  • Step 8: Start Development Server

Step 1: Install Laravel 8 App

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

Step 2: 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.

Step 3: Create Post Model & Migration

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

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

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

Step 4: Add Fillable Property in Model

In this step, add the fillable property in Post model, which is located inside app/models directory:

Step 5: Make Route

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

Step 6: Create Controller

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

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

app/Http/Controllers/PostController.php

Step 7: Create Blade Views File

In this step we will create blade view file. Go to resource/views direcotry and create two files name posts.blade.php and create.blade.php file. Create a blade view file name posts.blade.php and put the following code into it:

posts.blade.php


Now, create a blade view file name create.blade.php and put the following code into it:

create.blade.php


Note that, Don’t forget to add the following cdn file to your blade view file:

Step 8: 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 8 Livewire Load More On Page Scroll Example

In this Laravel 8 Livewire Load More On Page Scroll Example Tutorial I’ll show you how to implement infinity scroll or dynamix ajax load more pagination on page scroll in laravel using livewire. In this tutorial you will learn to implement dynamic load more pagination in laravel using livewire package. In this step by step guide I’ll share example of ajax load more or infinity scroll in laravel using livewire package.

Laravel 8 Livewire Load More On Page Scroll Example

In this step by step tutorial I will demonstrate you with example to create dynamix ajax load more pagination on page scroll in laravel using livewire. Please follow the instruction given below:

  • Step 1: Install Laravel 8 App
  • Step 2: Connecting App to Database
  • Step 3: Run Migration and Add Dummy Data
  • Step 4: Install Livewire Package
  • Step 5: Create Load More Component using Artisan
  • Step 6: Make Route
  • Step 7: Create Blade View File
  • Step 8: Run Development Server

Step 1: Install Laravel 8 App

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

Step 2: 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.

Step 3: Run Migration and Add Dummy Data

Now, run following command to migrate database schema.

Now, run the following command to generate fake data using laravel faker as follow:

Then

Step 4: Install Livewire Package

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

Step 5: Create Load More Component using Artisan

Now, we will create a livewire load more component using following artisan command:

The above command will create a component on the following path:

Now, go to app/Http/Livewire folder and open LoadMoreUserList.php file. Then add the following code into your LoadMoreUserList.php file:


Now, go to resources/views/livewire folder and open load-more-user-list.blade.php file. Then add the following code into your load-more-user-list.blade.php file:

Step 6: Make Route

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

Step 7: Create View File

In this step we will create a blade view file. Go to resources/views/folder and create a blade view files that name lists.blade.php file. Then put the following code into your lists.blade.php file:

Step 8: 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 8 Livewire Datatables Tutorial

In this Laravel 8 livewire dataTable example tutorial I will show you how to install and use livewire datatable in laravel 8 application. In this tutorial you will learn to install and use livewire datatable in your laravel project. In this article I will share example to install and use livewire datatable in laravel. We will be using mediconesystems/livewire-datatables package packge to use livewire datatable in laravel.

Laravel 8 Livewire Datatables Tutorial

In this step by step tutorial I will guide you through the process to install and use livewire datatable in your project. Please follow the instruction given below:

  • Step 1 – Download Laravel 8 App
  • Step 2 – Connecting App To Database
  • Step 3 – Install Livewire & DataTable Livewire
  • Step 4 – Build User DataTable Livewire Component
  • Step 5 – Create Routes
  • Step 6 – Update UserDataTable Component File
  • Step 7 – Update Welcome Blade File
  • Step 8 – Start Development Server

Step 1 – Download Laravel 8 App

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

Step 2 – 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.

Step 3 – Install Livewire & DataTable Livewire

In this step, we will install livewire and Livewire DataTable Package via the composer dependency manager. Use the following command to install livewire and Livewire DataTable Package.

Now, run the following command to build your assets:

To run npm:

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

Step 4 – Build User DataTable Livewire Component

In this step we will be creating livewire datatable component using following command:

The above command will create two files:

Step 5 – 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

Step 6 – Update UserDataTable Component File

Now, update the UserDatatables.php component file with the following code, which is placed on app/Http/Livewire directory:

Step 7 – Update Welcome Blade File

In this step we will create blade view file. Open welcome.blade.php file and update the following code into it, which is placed on resources/views/ directory:

Now, run the following command to create dummy records in database:

Step 8 – 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 –