Create a Forum in Laravel 5.8 Using Chatter


  • Brijpal Sharma

    February 03rd, 2019 , Posted On:- Web Development

    laravel html css


This topic is creating a forum in Laravel 5.8 using Chatter, I will show you how easy it is to create your own Laravel Forum using the Chatter Package

In this post, we create a Laravel forum using Chatter package. Chatter package provides us with a very easy function to create a forum for Laravel. In this application, we will use Laravel 5.7.

We create the final Laravel 5.7 forum application as below.

Create a Forum in Laravel 5.8 Using Chatter

Step:1 Create a new Laravel application

First, we need to create a  new Laravel project to create a following this command.

laravel new chatter

 

Step: 2 Connect with Database 

After creating a project we connect our application with database. Here we using new Laravel project so make sure to install the default user authentication provided with Laravel. 

php artisan make:auth

 

Step: 3 Install Package

Install Chatter package into your Laravel application using the following command.

composer require "devdojo/chatter=0.2.*"

 

Step: 4 Update the service provider

Add the service provider to your config/app.php provider's array:

DevDojo\Chatter\ChatterServiceProvider::class,

 

Step: 5 Publish the Vendor

Publish the Vendor using the following command.

php artisan vendor:publish --provider="DevDojo\Chatter\ChatterServiceProvider"

 

After that, we need to be published a few new files to our application we need to reload them with the following command.

composer dump-autoload

Create a Forum in Laravel 5.8 Using Chatter

 

Step: 6 Run Your migrations

You can see the many files in the migrations folder.

Create a Forum in Laravel 5.8 Using Chatter

Now migrate all files using this command.

php artisan migrate

 

Step:7 Seed Your Database

We need some data to test our Laravel forum application so we will use the following command to seed some little data.

php artisan db:seed --class=ChatterTableSeeder

 

Step:8 Add yield in Master page

Add yield into master page app.blade.php file include a header and footer yield. Inside the head of your app.blade.php add the following.

Add style into the head.

@yield('css')

And add js yield at the bottom of the body.

@yield('js')

 

Now, finally, we complete this tutorial Create a Forum in Laravel 5.8 Using Chatter to see our new Laravel forum application visit your http://localhost:8000/forums/ and you should see your new forum in front of you!


About Author
  • user profile
    Brijpal Sharma

    brijpalsharma99@gmail.com, January 29th, 2018

    Hi, I am a web developer, I working on Laravel and CodeIgniter framework, I love to share knowledge and tutorials so I here...


0 Comment


You must be logged in to post a comment.


You may also be interested in...
Laravel 5.7 Route Tutorial Step by Step for Beginners
10 Difference Between React.js and React Native
How to Use Angular Material in Angular 7
Laravel 5.7 Passport API Authentication With Example
Create a Forum in Laravel 5.8 Using Chatter
How to Install Python on Windows Pycharm IDE
How to use Charts In Laravel 5.7 Using Charts Package
MEVN Stack Tutorial From Scratch for the beginner
Login with Google in Laravel 5.7
Prevent Block Multiple Logins Of Same Credentials in Laravel 5.7