PHPackages                             ashkan/comment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ashkan/comment

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ashkan/comment
==============

bilingual comment package (persian and english language)

27Blade

Since Jun 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ashkan-k/Bilingual-Laravel-Package)[ Packagist](https://packagist.org/packages/ashkan/comment)[ RSS](/packages/ashkan-comment/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PreView
-------

[](#preview)

[![Bilingual-Laravel-Package](src/assets/Documention/Comment3.png?raw=true "Screenshot")](src/assets/Documention/Comment3.png?raw=true)

Bilingual Comment Laravel Package
=================================

[](#bilingual-comment-laravel-package)

( Made with Laravel Blade(bootstrap) And VUE JS )

Free Bilingual Comment Package For having a complte comment part in your project with a FRONTED SIDE.

Installation and Dependencies
-----------------------------

[](#installation-and--dependencies)

```
composer require ashkan/comment
```

Install or Enable 'gd' extension:
---------------------------------

[](#install-or-enable-gd-extension)

```
;extension=gd
```

Publish Package

```
php artisan vendor:publish --provider="Ashkan\Comment\CommentServiceProvider"
php artisan migrate
```

Set requirements

```
Add  'use HasComments;' to COMMENTER model like 'User'

use Ashkan\Comment\Traits\CanComment;

class User extends Authenticatable
{
    use HasFactory, Notifiable;

    # important
    use CanComment;

    protected $fillable = [
        'name',
        'email',
        'password',
    ];
```

```
Add  'use HasCommentable;' to COMMENTABLE model like 'Post , Article ,...'

use Ashkan\Comment\Traits\HasComments;

class Post extends Model
{
    use HasFactory;

    # important
    use HasComments;

    protected $fillable = [
        ...
    ];
}
```

Usage
-----

[](#usage)

To use this package, render this line in your codes and you should pass your model\_object( Post , Article , Course ... ) into the parameters of this line of code

### Example :

[](#example-)

```
@include('comment.partials.Comment' , ['obj' => $article])
```

### You can use 'Comment' model in where ever you want:

[](#you-can-use-comment-model-in-where-ever-you-want)

```
use Ashkan\Comment\Models\Comment;
use Ashkan\Comment\Models\Likes_And_DisLikes;

Comment::create();
Comment::all();
Comment::paginate(10);
,...

Likes_And_DisLikes::create();
Likes_And_DisLikes::all();
Likes_And_DisLikes::paginate(10);
,...
```

### Or use methods of 'CommentFacade' and 'LikeDisLikeFacade' (see methods of facades in repository classes):

[](#or-use-methods-of-commentfacade-and-likedislikefacade-see-methods-of-facades-in-repository-classes)

```
Ashkan\Comment\Repositories\CommentRepository
Ashkan\Comment\Repositories\LikeDisLikeRepository
```

Customize Package &amp; Config ( Config and Options of Package with your own dependencies )
-------------------------------------------------------------------------------------------

[](#customize-package--config--config-and-options-of-package-with-your-own-dependencies-)

You can customize options and events of package in **'comment.php'** in **'config'** folder

### Example :

[](#example--1)

**to change Editor of 'textarea' you can select your favorite option :**

```
return [
            #  Editor Options :
                        #      1 => 'CKEDITOR' (Default)
                        #      2 => 'Tiny MCE'
                        #      3 => 'Without Editor'   ( simple textarea )
        'Editor' => 1,

      ]
```

**to enable or disable 'like and dislike' or 'loading' or 'pagination' you can change :**

```
return [
        'Has_Like_And_DisLike' => true,

        'Loading' => true,

             #  Pagination Options :
                        #      1 => 'Material Icons' (Default)
                        #      2 => 'Bootstrap'
                        #      3 => 'Without Pagination'
        'Pagination' => 1,
        'PaginationDefaultNumber' => 8,

     ]
```

**to change timezone of datetime (Example 'Persian') :**

```
set 'timezone' in 'config/app.php' to 'Asia/Tehran'
```

**to customize theme (card and form and functions) , you can change them in 'resources/views/comment' files :**

```

                 {{ __('comment.title') }}

                 {{ __('comment.content') }}

                @if(config('comment.options.Editor') == 1)

                @elseif(config('comment.options.Editor') == 2)

                @else

                @endif

                @{{ ButtonText() }}

            &nbsp &nbsp

             {{ __('comment.Back') }}

      ##########################################################################################################################################

       new Vue({
        el: "#app",
        data() {
            return {
                TinyMCE_settings: {
                    menubar: '',
                    plugins: '',
                    directionality: "rtl",
                    toolbar: 'fontsizeselect | forecolor backcolor | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent',
                    fontsize_formats: '8pt 10pt 11pt 12pt 14pt 18pt 24pt 36pt',
                },

                comment_id: null,
                type: 'create',

                loading: null,
                EnabledShowLoading: false,

                comments: [],

                results: [],
            }
        },

        methods: {

            HideLoading() {
                if (this.EnabledShowLoading) {
                    this.loading.hide()
                }
            },

            ButtonText() {
                if (this.type === 'create') {
                    return '{{ __('comment.Submit Comment') }}'
                } else if (this.type === 'edit') {
                    return '{{ __('comment.Edit') }}'
                }

                return '{{ __('comment.Answer Comment') }}'
            },

            DisplayUserName(user) {
                if (user) {
                    return user.{{ config('comment.options.Commenter Display Name Field') }}
                }
                return '{{ __('comment.Anonymous') }}'
            },

            , ...
        }
    })

```

Screens UI
----------

[](#screens-ui)

**Cards**

[![Alt text](src/assets/Documention/Comment.png?raw=true "Screenshot")](src/assets/Documention/Comment.png?raw=true)

**Forms**

[![Alt text](src/assets/Documention/Comment2.png?raw=true "Screenshot")](src/assets/Documention/Comment2.png?raw=true)

### Contact us

[](#contact-us)

- Instagram : [https://www.instagram.com/ashkann\_k](https://www.instagram.com/ashkann_k) | ashkann\_k
- Telegram : [https://t.me/ashk@n\_k](https://t.me/ashk@n_k) | @ashk@n\_k

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0aed97a91ff103e8e2a46852fc6df2a80671324aa7e5aa2d5b539dd21439567b?d=identicon)[ashkan karimi](/maintainers/ashkan%20karimi)

---

Top Contributors

[![ashkan-k](https://avatars.githubusercontent.com/u/67740600?v=4)](https://github.com/ashkan-k "ashkan-k (8 commits)")[![karimiashkan8186-cmyk](https://avatars.githubusercontent.com/u/261889121?v=4)](https://github.com/karimiashkan8186-cmyk "karimiashkan8186-cmyk (1 commits)")

### Embed Badge

![Health badge](/badges/ashkan-comment/health.svg)

```
[![Health](https://phpackages.com/badges/ashkan-comment/health.svg)](https://phpackages.com/packages/ashkan-comment)
```

###  Alternatives

[rybakit/arguments-resolver

ArgumentsResolver allows you to determine the arguments to pass to a function or method.

26107.7k7](/packages/rybakit-arguments-resolver)[league/flysystem-adapter-decorator

A base implementation of a flysystem adapter decorator

17136.3k1](/packages/league-flysystem-adapter-decorator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
