Download the PHP package carropublic/discussion without Composer
On this page you can find all versions of the php package carropublic/discussion. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carropublic/discussion
More information about carropublic/discussion
Files in carropublic/discussion
Package discussion
Short Description Discussion like comments
License MIT
Homepage https://github.com/carropublic/discussion
Informations about the package discussion
Discussion
Discussion is nested discussion with approve/disapprove feature. Discussion inside the discussion, like the above image.
Take a look at contributing.md to see a to do list.
Installation
Via Composer
The package will automatically register itself.
You can publish the migration with:
After the migration has been published you can create the media-table by running the migrations:
You can publish the config-file with:
Usage
Get lists of discussions which approve.
Get lists of discussions which got disapprove.
Get lists of discussions for both approve and disapprove.
Register the Model
In order to receive/retrieve discussions from the specific model, add the HasDiscussion
trait to the model class. In our case we choose Post
as main discussion.
Create Discussions
To create a discussion to your discussable models (in this case Post model), you can use discussion
method like the following.
You can also use discussAsUser
method which need to pass the user object. See example in the following.
Retrieving Discussion
After you finish creating discussion, You can retrieve all your discussion like the following.
You can filter only by approve or disapprove like the following.
Change log
Please see the changelog for more information on what has changed recently.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
- Carro
- All Contributors
- Laravel Comment
Take Lots of reference from Laravel Comment package. And modify base on what our need.
License
license. Please see the license file for more information.
-