| Package Data | |
|---|---|
| Maintainer Username: | d-te |
| Maintainer Contact: | denis.temchenko@gmail.com (Denys Temchenko) |
| Package Create Date: | 2015-01-11 |
| Package Last Update: | 2015-01-15 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-04 15:03:00 |
| Package Statistics | |
|---|---|
| Total Downloads: | 45 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 1 |
| Total Forks: | 3 |
| Total Open Issues: | 0 |
Disqus comments for laravel 4
Add the package in your composer.json file and run composer update.
{
"require": {
"d-te/laravel-discus": "dev-master"
}
}
Register the service provider within the providers array found in app/config/app.php:
'providers' => array(
// ...
'Dte\Disqus\DisqusServiceProvider'
)
Add an alias within the aliases array found in app/config/app.php:
'aliases' => array(
// ...
'Disqus' => 'Dte\Disqus\Facades\Disqus',
)
Create configuration file for package using artisan command
$ php artisan config:publish d-te/laravel-disqus
Add 'disqus_shortname' to app/config/packages/d-te/laravel-disqus/config.php.
You can find your disqus shortname afer signing up and visiting https://disqus.com/admin/settings/
In your template add :
{{ \Disqus::comments() }}
There are some disqus configuration variables:
Example of usage:
{{ \Disqus::comments(
array(
'disqus_identifier' => '/december-2010/the-best-day-of-my-life/',
'disqus_title' => 'Some title',
'disqus_url' => 'http://example.com/helloworld.html',
'disqus_category_id' => 123456
) ) }}
There are two ways how to change disqus locales:
in app/config/packages/d-te/laravel-disqus/config.php set
'auto_set_language' => true,
{{ \Disqus::comments(array('language' => 'de')) }}
Sometimes discus locale could not corresponde to your app locale.
To convert your app locale to discus locale just add supported locales to config app/config/packages/d-te/laravel-disqus/config.php example:
'discus_languages' => array(
'ua' => 'uk',
'fr' => 'fr_CA',
)