Discussions
Discussions for Laravel Enso.
This package works exclusively within the Enso ecosystem.
The front end assets that utilize this api are present in the accessories package.
For live examples and demos, you may visit laravel-enso.com
click on the photo to view a short demo in compatible browsers
Installation
Comes pre-installed in Enso.
Features
- discussions are grouped around topics
- users can tag other users in their posts
- the tagged users receive notifications (WIP)
- users can show their appreciation for topics that they like with 'claps'
- powerful what-you-see-is-what-you-get text editor, based on the excellent Quill library
- within Enso, the Discussions module is integrated with the Activity Log
- can be attached to any other model, via a polymorphic relationship
- a
Discussible
trait is available, in order to make it easy to add discussions to a model - changes to the discussions and posts are enforced through policies, where changes can be made by the original poster or an administrator
- uses its own suite of specialized Bulma styled VueJS components for smooth integration with the rest of the application
Usage
Configuration
The config/enso/discussions.php
configuration file, lets you customize the following:
onDelete
, string, option that manages the case when the commentable entity is deleted and it has attached discussions. Valid options arecascade
,restrict
| default iscascade
With the cascade option, when a discussable model is deleted, the discussions attached to it are also deleted. With the restrict option, when attempting to delete a discussable model with attached discussions, an exception is thrown.
loggableMorph
, the list of entities using the discussable functionality, each mapped to its respective loggable attribute For example:'discussable' => [ Company::class => 'name', ],
This configuration is used for activity logging.
Publishes
php artisan vendor:publish --tag=discussions-config
- configuration filesphp artisan vendor:publish --tag=discussions-factory
- the factory used for discussionsphp artisan vendor:publish --tag=enso-factories
- a common alias for when wanting to update the factories once a newer version is released, usually used with the--force
flag
Contributions
are welcome. Pull requests are great, but issues are good too.
License
This package is released under the MIT license.
← DataImport Documents →