A simple way to incorporate DISQUS into your Laravel application.
- Laravel v3
- Disqus Account
First get your DISQUS shortname in your account setting page.
You can install this bundle by running the following CLI command:
php artisan bundle:install laravel-disqus
Add the below code into your application/bundles.php
file if you want to autoload the bundle
'laravel-disqus' => array('auto' => true),
Add the below code into your controller.
Bundle::start('laravel-disqus');
$disqus = new Disqus('short_name_goes_here');
// Generated HTML is called as below
$disqus->get_html();
This will embed the JavaScript which loads and displays DISQUS on your site.
This is the first bundle that I have made so feel free to give me any feedback/advice/guidance. Concept borrowed from Codeigniter Disqus Spark.