kcdev/disqus

Laravel - Disqus Integration | Integrating your application with Disqus platform.

v1.0 2018-11-08 03:39 UTC

This package is auto-updated.

Last update: 2024-05-08 15:42:52 UTC


README

Latest Stable Version Total Downloads License

Integrating your application with Disqus platform.

Installation

Via composer

composer require kcdev/disqus

Setup

In app/config/app.php add the following :

  • The ServiceProvider to the providers array :
Kcdev\Disqus\DisqusServiceProvider::class,
  • The class alias to the aliases array :
'Disqus' => Kcdev\Disqus\Facades\Disqus::class,
  • Publish the config file
php artisan vendor:publish --provider="Kcdev\Disqus\DisqusServiceProvider"

Configuration

Add DISQUS_USERNAME in .env file :

DISQUS_USERNAME=your_disqus_user_name

(You can obtain them from here)

Usage

Display disqus form :

{!! Disqus::display() !!}

With custom config (page.url and page.identifier) :

{!! Disqus::display(['data-url' => 'http://some.url/request', 'data-identifier' => 'your.identifier.id']) !!}

Without Laravel

Checkout example below:

<?php

require_once "vendor/autoload.php";

$username  = 'your_disqus_username';
$disqus = new \Kcdev\Disqus\Disqus($username);

?>
<body>
    <?php echo $disqus->display(); ?>
</body>

Security Vulnerabilities

If you discover a security vulnerability within our library, please send an e-mail to Amiruddin Marmul via amiruddinmarmul@gmail.com. All security vulnerabilities will be promptly addressed.

License

Lavavel - Disqus Integration is open-sourced software licensed under the MIT license.