Discussions

Codacy BadgeStyleCILicenseTotal DownloadsTotal DownloadsLatest Stable Version

Discussions for Laravel Enso.

Watch the demo

click on the photo to view a short demo in compatible browsers

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

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 are cascade, restrict | default is cascade

    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 files
  • php artisan vendor:publish --tag=discussions-assets - the required js assets
  • php artisan vendor:publish --tag=enso-assets - a common alias for when wanting to update the assets, once a newer version is released, can be used with the --force flag

Depends on:

  • Quill for the wysiwyg editor

Contributions

are welcome. Pull requests are great, but issues are good too.

License

This package is released under the MIT license.

Last Updated: 11/12/2018, 4:35:32 PM