PHPackages                             ronnytorresmtz/comments - 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. [Admin Panels](/categories/admin)
4. /
5. ronnytorresmtz/comments

ActiveLibrary[Admin Panels](/categories/admin)

ronnytorresmtz/comments
=======================

A Laravel Nova resource tool.

v1.0.8(4y ago)235[1 issues](https://github.com/ronnytorresmtz/comments/issues)MITVuePHP &gt;=7.1.0

Since Jul 18Pushed 4y agoCompare

[ Source](https://github.com/ronnytorresmtz/comments)[ Packagist](https://packagist.org/packages/ronnytorresmtz/comments)[ RSS](/packages/ronnytorresmtz-comments/feed)WikiDiscussions master Synced today

READMEChangelog (9)DependenciesVersions (10)Used By (0)

Laravel Nova Comments Package
=============================

[](#laravel-nova-comments-package)

### Comments

[](#comments)

#### Allow to add comments for a resource by a user. It manages the pagination in the backend

[](#allow-to-add-comments-for-a-resource-by-a-user-it-manages-the-pagination-in-the-backend)

### How to use

[](#how-to-use)

```
    Comments::make()
        //->showOnlyMyComments(true)
        //->showOnlyMyComments(false)
        ->showOnlyMyComments() //default=true
        //->allowToShowAllCompaniesComments()  // Could be use for the system admin
        ->per_page(3),

```

### How to install

[](#how-to-install)

#### 1) Install the component with composer, run the below command:

[](#1-install-the-component-with-composer-run-the-below-command)

```
    composer require ronnytorres/comments

```

#### 2) Add in the User table the field company\_id, it could be null

[](#2-add-in-the-user-table-the-field-company_id-it-could-be-null)

```
    $table->bigInteger('company_id')->nullable();

```

#### 3) The componenet needs a Comment Model to be created.

[](#3-the-componenet-needs-a-comment-model-to-be-created)

```
