All Projects → risul3 → Laravel Like Comment

risul3 / Laravel Like Comment

Licence: mit
Ajax based site wide like and commenting system for laravel.

Projects that are alternatives of or similar to Laravel Like Comment

Fileuploader
Beautiful and powerful HTML file uploading tool. A jQuery, PHP and Node.js plugin that transforms the standard input into a revolutionary and fancy field on your page.
Stars: ✭ 111 (+5.71%)
Mutual labels:  laravel, ajax
Rapid.js
An ORM-like Interface and a Router For Your API Requests
Stars: ✭ 700 (+566.67%)
Mutual labels:  laravel, ajax
Laravel Dusk Select2
Select2.js support for the Laravel Dusk testing
Stars: ✭ 31 (-70.48%)
Mutual labels:  laravel, ajax
Asset Cdn
Serve Laravel Assets from a Content Delivery Network (CDN)
Stars: ✭ 101 (-3.81%)
Mutual labels:  laravel
Socialnetwork
Laravel and Vue.JS powerd social network
Stars: ✭ 101 (-3.81%)
Mutual labels:  laravel
Laravel Stats
📈 Get insights about your Laravel or Lumen Project
Stars: ✭ 1,386 (+1220%)
Mutual labels:  laravel
Collect
A Collections-only split from Laravel's Illuminate Support
Stars: ✭ 1,433 (+1264.76%)
Mutual labels:  laravel
Collapsible Resource Manager
A custom sidebar menu with collapsible groups
Stars: ✭ 100 (-4.76%)
Mutual labels:  laravel
Laravel Dashboard Chart Tile
Create all the charts you want for your laravel dashboard
Stars: ✭ 102 (-2.86%)
Mutual labels:  laravel
Laravel Json Schema
Create all your migrations and models from one JSON schema file.
Stars: ✭ 101 (-3.81%)
Mutual labels:  laravel
Anvel
Angular 2 Laravel Starter Kit
Stars: ✭ 102 (-2.86%)
Mutual labels:  laravel
Laravel Reddit
Reddit clone built with Laravel 5
Stars: ✭ 101 (-3.81%)
Mutual labels:  laravel
Laravel Skeleton
Laravel Application skeleton for me.
Stars: ✭ 103 (-1.9%)
Mutual labels:  laravel
Sarala
Javascript library to communicate with RESTful API built following JSON API specification. inspired by Laravel’s Eloquent
Stars: ✭ 101 (-3.81%)
Mutual labels:  laravel
Laravel Factory Prefill
Prefills factories with faker method suggestions to increase productivity
Stars: ✭ 104 (-0.95%)
Mutual labels:  laravel
Laravel Table
Generate tables from Eloquent models.
Stars: ✭ 101 (-3.81%)
Mutual labels:  laravel
Laravel Translatable
Making Eloquent models translatable
Stars: ✭ 1,390 (+1223.81%)
Mutual labels:  laravel
Roles
Powerful package for handling roles in Laravel
Stars: ✭ 102 (-2.86%)
Mutual labels:  laravel
Docker Laravel
🐳 Docker Images for Laravel development
Stars: ✭ 101 (-3.81%)
Mutual labels:  laravel
Generators
Laravel File Generators with config and publishable stubs
Stars: ✭ 102 (-2.86%)
Mutual labels:  laravel

Latest Stable Version Total Downloads License

Laravel like comment

laravel-like-comment is an ajax based like and commenting system for laravel. Which can be used with anything like page, image, post, video etc. User needs to be loged in to be able to like or comment.

Features

  • Like
  • Dislike
  • Comment
  • Comment voting
  • User avatar in comment

Demo

Try it

Watch

Installation

Run

composer require risul/laravel-like-comment

Configuration

Add

risul\LaravelLikeComment\LikeCommentServiceProvider::class

in your service providerr list.

To copy views and migrations run

php artisan vendor:publish

Run

php artisan migrate

It will create like and comment table.

Add this style links to your view head

    <link href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/components/icon.min.css" rel="stylesheet">
    <link href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/components/comment.min.css" rel="stylesheet">
    <link href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/components/form.min.css" rel="stylesheet">
    <link href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/components/button.min.css" rel="stylesheet">
    <link href="{{ asset('/vendor/laravelLikeComment/css/style.css') }}" rel="stylesheet">

Add jquery and script

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
    <script src="{{ asset('/vendor/laravelLikeComment/js/script.js') }}" type="text/javascript"></script>

In config/laravelLikeComment.php add user model path

'userModel' => 'App\User'

Add following code in your user model

    /**
     * Return the user attributes.

     * @return array
     */
    public static function getAuthor($id)
    {
        $user = self::find($id);
        return [
            'id'     => $user->id,
            'name'   => $user->name,
            'email'  => $user->email,
            'url'    => '',  // Optional
            'avatar' => 'gravatar',  // Default avatar
            'admin'  => $user->role === 'admin', // bool
        ];
    }

Usage

Add this line at where you want to integrate Like

@include('laravelLikeComment::like', ['like_item_id' => 'image_31'])

like_item_id: This is the id of the item,page or model for which the like will be used

Add this line where you want to integrate Comment

@include('laravelLikeComment::comment', ['comment_item_id' => 'video_12'])

comment_item_id: This is the id of the item, page, or model for which the comment will be used

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].